Make SOC=iMX8MM flash_evk_emmc_fastboot Error

Carrier: Toradex Dahlia V1.1D
CPU: i.MX8MMDL rev1.0

I am creating a U-BOOT file, but the following error occurs. Is there any workaround?

$ make clean; make SOC=iMX8MM flash_evk_emmc_fastboot
include misc.mak
include m4.mak
include android.mak
include test.mak
include autobuild.mak
include alias.mak
imx8qm clean done
include misc.mak
include m4.mak
include android.mak
include test.mak
include autobuild.mak
include alias.mak
imx8qx clean done
include misc.mak
include m4.mak
include android.mak
include test.mak
include autobuild.mak
imx8dxl clean done
imx8ulp clean done
Compiling mkimage_imx8
PLAT=imx8mm HDMI=no
Compiling mkimage_imx8
cc -O2 -Wall -std=c99 -static mkimage_imx8.c -o mkimage_imx8 -lz
mkimage_imx8.c: In function ‘copy_file.constprop’:
mkimage_imx8.c:345:21: warning: ‘write’ reading 5 bytes from a region of size 4 [-Wstringop-overread]
345 | if (write(ifd, (char *)&zero, 4-tail) != 4-tail) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mkimage_imx8.c:303:13: note: source object ‘zero’ of size 4
303 | int zero = 0;
| ^~~~
In file included from mkimage_imx8.c:24:
/usr/include/unistd.h:378:16: note: in a call to function ‘write’ declared with attribute ‘access (read_only, 2, 3)’
378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
| ^~~~~
make[1]: *** No rule to make target ‘lpddr4_pmu_train_1d_imem.bin’, needed by ‘u-boot-spl-ddr.bin’. Stop.
make: *** [Makefile:23: flash_evk_emmc_fastboot] Error 2

Hi @katsu , what are you trying to achieve?

Without knowing what git repo you are using, I see that you are using the flash_evk_emmc_fastboot command but what you are using is not the NXP EVK, is an i.MX8MM SOM module. I haven’t tested it but it is very likely that will not work in the Toradex repo.

To create and flash a custom Uboot you have to follow this documentation:

Once created, you can overwrite a Toradex Easy Installer image and use that.

You can also create a custom Uboot using Yocto:

Kind regards,
Alvaro.

I am trying to change the RDC of UART2 to D1W, D1R. For this purpose, it is necessary to update U-BOOT.
Is my approach wrong?

To create and flash a custom Uboot you have to follow this documentation:
Yes, I am following the documentation.
[Additional Module-specific Steps]
→ [Build U-Boot for NXP i.MX 8M Mini/Plus-based System on Modules]
Specifics: Build U-Boot for NXP i.MX 8M Mini/Plus-based SoMs | Toradex Developer Center

[make[1]: *** No rule to make target ‘lpddr4_pmu_train_1d_imem.bin’, needed by ‘u-boot-spl-ddr.bin’. Stop.]
will occur.
Is this procedure incorrect?

I believe you don’t need to update Uboot to make this change for FreeRTOS:

If you still want to change Uboot, pls let me know and we’ll check the proccedure in detail.

Thanks,
Alvaro.

My environment is as below
Carrier: Toradex Dahlia V1.1D
CPU: i.MX8MMDL rev1.0
Cortex-A53: TorizonOS+Qt6
Cortex-M4: FreeRTOS
The specification is to perform serial communication from Cortex-M4 with external devices using UART1 (X20:12/13) or UART2 (X19:14/15).
In order to make this happen, I think it is necessary to change the RDC of U-BOOT.
Is this approach wrong? Is there another best approach?