Boot problems imx8mp_evk

Peter Bergin peter at berginkonsult.se
Fri Feb 12 09:00:35 CET 2021


Hi,

this has been put aside for a while but tested this again and problem 
still remains for me.


>>> Hi,
>>>
>>> I'm following the README
>>> to bring up u-boot on a imx8mp EVK board. My
>>> boot ends up in this on the
>>> console:
>>>
>>>       U-Boot SPL 2020.10-rc5-00049-gd44d46e9fa (Sep 30 2020 - 11:46:20 +0200)
>>>       Normal Boot
>>>       WDT:   Started with servicing (60s timeout)
>>>       Trying to boot from BOOTROM
>>>       image offset 0x8000, pagesize 0x200, ivt offset 0x0
>>>       Can't support legacy image
>>>       SPL: failed to boot from all boot devices
>>>       ### ERROR ### Please RESET the board ###
>>>
>>> Any ideas what is going wrong? How to debug further?
>>>
>> I am trying to port U-Boot to an i.MX8M Nano and I am getting the same result.
> This might not be related, but looking at the ATF branch [imx_5.4.3_2.0.0] - it appears to be too old, at least for i.MX8M Plus. I was able to run the U-Boot 2020.10 with ATF built from [imx_5.4.47_2.2.0] on the i.MX8M Plus and it does boot successful.
>
> Boot log show the following banner when BOOTROM finishes up the copy:
> NOTICE:  BL31: v2.2(release):rel_imx_5.4.47_2.2.0-0-gc949a888e-dirty
> NOTICE:  BL31: Built : 05:51:50, Sep  9 2020
>
> Peter,
> i.MX8M Plus support in NXP ATF fork appears to be added by commit https://source.codeaurora.org/external/imx/imx-atf/commit/?id=6b8249ff58cc8853396498a074535dcd7f81beaf, and that came in ATF revision far newer than indicated in doc/board/freescale/imx8mp_evk.rst
>
> Try to rebase your ATF to [c949a888e909811db191500c51456391dff61284] and build according to the board doc file.
>
Andrey, Thanks for advice about the commit in imx-atf. Unfortunately it 
does not seem to solve the issue.

This is what I tested today and where I ended up today:

     $ cd imx-atf
     $ git checkout imx_5.4.70_2.3.0
     $ make PLAT=imx8mp bl31
     $ cd ../u-boot
     $ git checkout master (80c7e4cf76d204d4b726b0cc57a557a9d9c1c453)
     $ cp ../imx-atf/build/imx8mp/release/bl31.bin .
     $ cp 
../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem_202006.bin 
lpddr4_pmu_train_1d_dmem.bin
     $ cp 
../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem_202006.bin 
lpddr4_pmu_train_1d_imem.bin
     $ cp 
../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem_202006.bin 
lpddr4_pmu_train_2d_dmem.bin
     $ cp 
../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem_202006.bin 
lpddr4_pmu_train_2d_imem.bin
     $ export ATF_LOAD_ADDR=0x960000
     $ make imx8mp_evk_defconfig
     $ make flash.bin
     $ sudo dd if=flash.bin of=/dev/mmcblk0 bs=1024 seek=32

When booting on a imx8mp EVK from NXP the console shows me this:

     U-Boot SPL 2020.04-00033-g633977d904 (Feb 12 2021 - 08:12:50 +0100)
     DDRINFO: start DRAM init
     DDRINFO: DRAM rate 4000MTS
     DDRINFO:ddrphy calibration done
     DDRINFO: ddrmix config done
     Normal Boot
     Trying to boot from BOOTROM
     image offset 0x8000, pagesize 0x200, ivt offset 0x0
     Can't support legacy image
     SPL: failed to boot from all boot devices
     ### ERROR ### Please RESET the board ###

The code that fails is in arch/arm/mach-imx/spl_imx_romapi.c

     if (IS_ENABLED(CONFIG_SPL_LOAD_FIT) &&
         image_get_magic(header) == FDT_MAGIC) {
     ....
     } else {
         /* TODO */
         puts("Can't support legacy image\n");
         return -1;
     }

I have traced out 'image_get_magic(header)' on the console and it is a 
new random value at each power on. I can also note that I have tested 
branch imx_v2020.04_5.4.70_2.3.0 from from uboot-imx ending up in the 
same result on the console.

Anyone that have ideas here how to proceed and where the problem can be? 
Anyone with a imx8mp EVK on the desk that succeed with building and 
deploying u-boot on a SD card and can share the workflow?

Best regards,
/Peter



More information about the U-Boot mailing list