Hello everyone,
i tried the same from my other question but with the new BSP 7.x.y: Build U-Boot from source BSP 6.x.y for i.MX8M Mini - Technical Support - Toradex Community
I followed the manual about Build U-Boot From Source Code | Toradex Developer Center and the specifics for i.MX8M Mini in the BSP 7.x.y version.
In the final build step i get this error:
If a copy all lpddr4_pmu_train_*.bin files from the firmware-imx-8.10.1 then the error appears again but the build runs to the end and i get the flash.bin.
root@8230b752980f:~/workspace/imx-mkimage# make clean; make SOC=iMX8MM flash_evk_emmc_fastboot
imx8qm clean done
imx8qx clean done
imx8dxl clean done
imx8ulp clean done
imx93 clean done
imx91 clean done
imx95 clean done
Compiling mkimage_imx8
PLAT=imx8mm HDMI=no
Compiling mkimage_imx8
cc -O2 -Wall -std=c99 -static …/iMX8M/mkimage_imx8.c -o mkimage_imx8 -lz
…/iMX8M/mkimage_imx8.c: In function ‘copy_file.constprop’:
…/iMX8M/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) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
…/iMX8M/mkimage_imx8.c:303:13: note: source object ‘zero’ of size 4
303 | int zero = 0;
| ^~~~
In file included from …/iMX8M/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
| ^~~~~
40098+0 records in
40098+0 records out
160392 bytes (160 kB, 157 KiB) copied, 0.0483781 s, 3.3 MB/s
./…/scripts/dtb_check.sh imx8mm-evk.dtb evk.dtb
Use u-boot DTB: fsl-imx8mm-evk.dtb
./…/scripts/pad_image.sh tee.bin
ERROR: ./…/scripts/pad_image.sh: Could not find file tee.bin. Exiting.
./…/scripts/pad_image.sh bl31.bin
Padding bl31.bin to 43488 bytes
./…/scripts/pad_image.sh u-boot-nodtb.bin evk.dtb
Padding evk.dtb to 69304 bytes
BL32=tee.bin DEK_BLOB_LOAD_ADDR=0x40400000 TEE_LOAD_ADDR=0xbe000000 ATF_LOAD_ADDR=0x00920000 …/iMX8M/mkimage_fit_atf.sh evk.dtb > u-boot.its
bl31.bin size:
43488
u-boot-nodtb.bin size:
811432
evk.dtb size:
69304
./mkimage_uboot -E -p 0x5000 -f u-boot.its u-boot.itb
FIT description: Configuration to load ATF before U-Boot
Created: Fri Feb 21 10:53:46 2025
Image 0 (uboot-1)
Description: U-Boot (64-bit)
Created: Fri Feb 21 10:53:46 2025
Type: Standalone Program
Compression: uncompressed
Data Size: 811432 Bytes = 792.41 KiB = 0.77 MiB
Architecture: AArch64
Load Address: 0x40200000
Entry Point: unavailable
Image 1 (fdt-1)
Description: evk
Created: Fri Feb 21 10:53:46 2025
Type: Flat Device Tree
Compression: uncompressed
Data Size: 69304 Bytes = 67.68 KiB = 0.07 MiB
Architecture: Unknown Architecture
Image 2 (atf-1)
Description: ARM Trusted Firmware
Created: Fri Feb 21 10:53:46 2025
Type: Firmware
Compression: uncompressed
Data Size: 43488 Bytes = 42.47 KiB = 0.04 MiB
Architecture: AArch64
OS: Unknown OS
Load Address: 0x00920000
Default Configuration: ‘config-1’
Configuration 0 (config-1)
Description: evk
Kernel: unavailable
Firmware: uboot-1
FDT: fdt-1
Loadables: atf-1
./mkimage_imx8 -version v1 -dev emmc_fastboot -fit -loader u-boot-spl-ddr.bin 0x7E1000 -second_loader u-boot.itb 0x40200000 0x60000 -out flash.bin
Platform: i.MX8M (mScale)
ROM VERSION: v1
BOOT DEVICE: emmc_fastboot
Using FIT image
LOADER IMAGE: u-boot-spl-ddr.bin start addr: 0x007e1000
SECOND LOADER IMAGE: u-boot.itb start addr: 0x40200000 offset: 0x00060000
Output: flash.bin
fit_size: 888
1+0 records in
1+0 records out
888 bytes copied, 0.000141596 s, 6.3 MB/s
FIT hash: d36b84ab8698e54060d1f3d07275332c656a2c4ba3c63d1106f77909b5c7ec2
========= IVT HEADER [HDMI FW] =========
header.tag: 0x0
header.length: 0x0
header.version: 0x0
entry: 0x0
reserved1: 0x0
dcd_ptr: 0x0
boot_data_ptr: 0x0
self: 0x0
csf: 0x0
reserved2: 0x0
boot_data.start: 0x0
boot_data.size: 0x0
boot_data.plugin: 0x0
========= IVT HEADER [PLUGIN] =========
header.tag: 0x0
header.length: 0x0
header.version: 0x0
entry: 0x0
reserved1: 0x0
dcd_ptr: 0x0
boot_data_ptr: 0x0
self: 0x0
csf: 0x0
reserved2: 0x0
boot_data.start: 0x0
boot_data.size: 0x0
boot_data.plugin: 0x0
========= IVT HEADER [LOADER IMAGE] =========
header.tag: 0xd1
header.length: 0x2000
header.version: 0x41
entry: 0x7e1000
reserved1: 0x0
dcd_ptr: 0x0
boot_data_ptr: 0x7e0fe0
self: 0x7e0fc0
csf: 0x8203c0
reserved2: 0x0
boot_data.start: 0x7e0bc0
boot_data.size: 0x41860
boot_data.plugin: 0x0
========= OFFSET dump =========
Loader IMAGE:
header_image_off 0x0
dcd_off 0x0
image_off 0x40
csf_off 0x3f400
spl hab block: 0x7e0fc0 0x0 0x3f400Second Loader IMAGE:
sld_header_off 0x5fc00
sld_csf_off 0x60c20
sld hab block: 0x401fadc0 0x5fc00 0x1020
fit-fdt csf_off 0x62c20
fit-fdt hab block: 0x401fadc0 0x5fc00 0x3020
SPL CSF block:
Blocks = 0x7e0fc0 0x0 0x3f400 “flash.bin”
SLD CSF block:
Blocks = 0x401fadc0 0x5fc00 0x1020 “flash.bin”,
SLD FIT-FDT CSF block:
Blocks = 0x401fadc0 0x5fc00 0x3020 “flash.bin”
But this U-Boot isn’t bootable on my hardware:
- Verdin imx8m mini (PN 0055)
- Mallow Carrier Board
I tried to run this U-Boot with these steps:
- From running u-boot “U-Boot 2022.04-6.7.0-devel+git.7588eb559ca2 (May 28 2024 - 11:19:14 +0000)”
- set the serverip environment variable to my tftp server
- "dhcp ${loadaddr} imx-boot
- “run update_uboot”
- “reset”
After the reset command in u-boot it hangs “forever” with the last serial output “resetting …”. With the recovery mode i get my hardware back running with an older u-boot version.
Maybe did you have some ideas what could be get wrong here or how i could debug this issues?