Hi! I make a custom board with iMX8MM and compile u-boot. But I can't understand what I do wrong. Could somebody tip me?
I use uuu under Windows 10, for compiling images I use imx-boot under WSL2 ubuntu 20.04.
Log by board:
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... MMC: no card present
*** Warning - No block device, using default environment
MMC: no card present
Detect USB boot. Will enter fastboot mode!
Net: Could not get PHY for FEC0: addr 0
Could not get PHY for FEC0: addr 0
No ethernet found.
Fastboot: Normal
Boot from USB for mfgtools
*** Warning - Use default environment for mfgtools
, using default environment
Run bootcmd_mfg: run mfgtool_args;if iminfo ${initrd_addr}; then if test ${tee} = yes; then bootm ${tee_addr} ${initrd_addr} ${fdt_addr}; else booti ${loadaddr} ${initrd_addr} ${fdt_addr}; fi; else echo "Run fastboot ..."; fastboot 0; fi;
Hit any key to stop autoboot: 0
## Checking Image at 43800000 ...
Unknown image format!
Run fastboot ...
Detect USB boot. Will enter fastboot mode!
flash target is MMC:1
MMC: no card present
MMC card init failed!
MMC: no card present
** Block device MMC 1 not supported
Detect USB boot. Will enter fastboot mode!
flash target is MMC:2
switch to partitions #0, OK
mmc2(part 0) is current device
Detect USB boot. Will enter fastboot mode!
Starting download of 2091712 bytes
...............
downloading of 2091712 bytes finished
writing to partition 'bootloader'
Initializing 'bootloader'
switch to partitions #1, OK
mmc2(part 1) is current device
Writing 'bootloader'
MMC write: dev # 2, block # 66, count 4086 ... MMC: block number 0x1038 exceeds max(0x1000)
0 blocks written: ERROR
Writing 'bootloader' FAILED!
Log by uuu
FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: flash bootloader flash.bin
FB: ucmd if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;
FB: ucmd mmc partconf ${emmc_dev} ${emmc_ack} 1 0
FB: Done
Wait for Known USB Device Appear...
New USB Device Attached at 1:2
1:2>Start Cmd:SDP: boot -f flash.bin
100%1:2>Okay (0.452s)
New USB Device Attached at 1:2
1:2>Start Cmd:SDPV: delay 1000
1:2>Okay (1.013s)
1:2>Start Cmd:SDPV: write -f flash.bin -skipspl
100%1:2>Okay (2.913s)
1:2>Start Cmd:SDPV: jump
100%1:2>Okay (0.244s)
New USB Device Attached at 1:2
1:2>Start Cmd:FB: ucmd setenv fastboot_dev mmc
1:2>Okay (0.016s)
1:2>Start Cmd:FB: ucmd setenv mmcdev ${emmc_dev}
1:2>Okay (0.049s)
1:2>Start Cmd:FB: ucmd mmc dev ${emmc_dev}
1:2>Okay (0.054s)
1:2>Start Cmd:FB: flash bootloader flash.bin
0x40000000Write partition failed1:2>Fail Write partition failed(0.13s)
解決済! 解決策の投稿を見る。
Here is your log.
Detect USB boot. Will enter fastboot mode!
Starting download of 2091712 bytes
...............
downloading of 2091712 bytes finished
MMC write: dev # 2, block # 66, count 4086 ... MMC: block number 0x1038 exceeds max(0x1000)
The space you must have on boot1:
66 x 512 + 2091712 = 2,125,504
The space on the emmc boot1:
4096 x 512 = 2,097,152
2,097,152 - 2,125,504 = -28,352
The emmc is 32G, it is user partition. not boot partition.
The log shows the boot partition is 2M big. That I have told you before.
If you use scard, the flash.bin can flash into it.
Usually, the NXP binary demo image flash.bin is bigger than 2M.
If you want use the emmc currently on your board, you must change the uboot configuration to make it smaller.
Hi @AlekseyM !
For your custom board, you have to create our custom DDR training based on your custom board.
Please follow the attached guide to update the ddr training and ddr timing on your board.
Yes, of course, I created timing.c from DDR-tool. Without this my ddr4 not initiate.
Hi @AlekseyM!
Thank you for contacting NXP Support!
What command are you using under uuu?
If you want to download the bootloader to iMX8, you have to put the board in download mode and then use the next command:
./uuu.exe -b <boot_type> flash.bin
boot_type could be:
emmc
sd
fspi
I attached the UUU guide to understand better the commands that you can use for all iMX devices.
Best Regards!
Chavira