IMX8MN not starting U-Boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MN not starting U-Boot

2,259 Views
AyrtonL
Contributor II

Hi

I am trying to bring up my board but encounter some issues.
My SPL is loaded and executed but after that... it just hangs...

 

Adding debug/print statements shows me it wants to jump to 0x960000 (where my BL31 should be, and seems to be when I print x bytes) but it just hangs...

I added my U-Boot config, and uboot.its as cat ${BINARIES_DIR}/u-boot-spl-padded.bin ${BINARIES_DIR}/ddr_fw.bin > ${BINARIES_DIR}/u-boot-spl-ddr.bin well.

For creating a binary I can write to a SD card, I used following commands (based on the imx8-bootloader-prepare script in Buildroot.
dd if=${BINARIES_DIR}/u-boot-spl.bin of=${BINARIES_DIR}/u-boot-spl-padded.bin bs=4 conv=sync

${HOST_DIR}/bin/mkimage -E -p $0x5000 -f ${BINARIES_DIR}/u-boot.its ${BINARIES_DIR}/u-boot.itb

${HOST_DIR}/bin/mkimage_imx8 -v v2 -fit -loader ${BINARIES_DIR}/u-boot-spl-ddr.bin 0x912000 -second_loader ${BINARIES_DIR}/u-boot.itb 0x40200000 0x60000 -out ${BINARIES_DIR}/imx8-boot-sd.bin

 

Used U-Boot: 2023.04
Used ATF: 2.10.0


Any ideas on what I am missing?

Tags (3)
0 Kudos
Reply
3 Replies

2,148 Views
AshutoshNama
Contributor III


@AyrtonL  I hope my below point as I observed you problems may help you:
1, Verify BL31 Location: Confirm BL31 is correctly loaded at 0x960000 by checking memory mapping and alignment.

2, Cross-Check Build Steps: Ensure the sequence of commands for mkimage matches your board’s bootloader specs.
3, Debug ATF Initialization: Insert debug prints in BL31 to trace execution and identify the exact failure point.
4, Validate U-Boot Config: Ensure u-boot.its specifies the correct load and entry addresses for all binaries.
5, Check DDR Initialization: Confirm DDR firmware (ddr_fw.bin) is correctly configured for your hardware.

Still, you have a problem feel free to DM me.

BR,
Ashutosh Nama

0 Kudos
Reply

2,113 Views
AyrtonL
Contributor II
Hi
Thanks for your reply
1. BL31 is correctly loaded at 0x960000 (verified with printf of first 512 bytes at that address).
2. Commands seem to be the same as the imx8mn-evk.
3. I added printf statements in bl31_main.c - bl31_main(void) but it seems it is never called?
Any idea if there is something before that main?
I do not have a lot of experience (yet) with the BL31.
4. U-boot.its seems fine, since my U-Boot knows where to jump to (I do print the addresses before jumping ).
5. My SPL says it has done the DRAM init (and the rate is 2400MTS, calibration and config done). So I suspect that should work? Otherwise I would not be able to load my BL31 at address 0x960000?


0 Kudos
Reply

2,160 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,
Please take a look at the flash_evk_no_hdmi build process in imx-mkimage.

https://github.com/nxp-imx/imx-mkimage/blob/lf-6.6.3_1.0.0/iMX8M/soc.mak

Best Regards,
Zhiming

0 Kudos
Reply