Build U-Boot From Source Code tutorial fails at Apply the Necessary Patches


I am currently trying to complete the Build U-Boot From Source Code tutorial, because I have to make some changes on the fec setup on my Verdin SOM.

So far I’ve made it to “Get and Apply the necessary patches” but there the git am command fails.

I’ve cloned the git:// repository where I’ve checked out the toradex_imx_lf_v2022.04 branch
From I’ve checked out the Hashes for Version 6.1.0, 6.2.0, 6.3.0 and 6.4.0 all with the same outcome.

once I execute the git am ... command I get the following error response:

git am 0001-toradex-tdx-cfg-block-use-only-snprintf.patch \
0002-toradex-tdx-cfg-block-use-defines-for-string-length.patch \
0003-toradex-tdx-cfg-block-extend-assembly-version.patch \
0004-toradex-tdx-cfg-block-add-new-toradex-oui-range.patch \ \
0006-toradex-common-Remove-stale-comments-about-modules-a.patch \
0007-toradex-common-Use-ARRAY_SIZE-macro.patch \
0008-toradex-tdx-cfg-block-Cleanup-interactive-cfg-block-.patch \
0009-toradex-common-Remove-stale-function-declaration.patch \
0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch \
0011-toradex-tdx-cfg-block-Use-official-SKU-names.patch \
0012-toradex-common-Improve-product-serial-print-during-b.patch \
0013-configs-colibri-imx7-Enable-bootd-command.patch \
0001-ARM-imx8mp-verdin-imx8mp-Add-memory-size-detection.patch \
0001-apalis-colibri_imx6-imx6ull-_imx7-update-env-memory-.patch \
0001-configs-colibri-imx7-Fix-bad-block-table-in-flash-co.patch \
Applying: toradex: tdx-cfg-block: use only snprintf
error: patch failed: board/toradex/common/tdx-common.c:89
error: board/toradex/common/tdx-common.c: patch does not apply
Patch failed at 0001 toradex: tdx-cfg-block: use only snprintf
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

I’m looking forward to read your suggestions on how the issue can be solved.

Best regards,

Hello @KDehren,

Thanks for reaching out to the Toradex Community.
The section that you are on - Get and Apply the Necessary Patches - is supposed to be for upstream-based modules. You can read it in the info block right above that section.

The i.MX 8, i.MX 8X, i.MX 8M Mini and i.MX 8M Plus-based modules use an NXP downstream-based kernel even for versions 6.0 and later of the BSP. However, the Verdin SoMs based on NXP SoCs (Verdin iMX8M Mini and Verdin iMX8M Plus) also have an experimental version of the mainline kernel available as an alternative to the downstream-based BSP. Could you please confirm that you are building u-boot here for upstream image? Otherwise you should be continuing from the Configure U-Boot section.