Boot problems imx8mp_evk

Peter Bergin peter at berginkonsult.se
Fri Feb 12 10:48:33 CET 2021


Hi Andrey,

On 2021-02-12 09:22, ZHIZHIKIN Andrey wrote:
> Hello Peter,
> In the latest ATF, the LOAD_ADDR has been changed from 0x960000 to 0x970000. This was done by commit 48733cb4e ("MLK-24913: plat: imx8mp: change the bl31 physical load address").
Thanks for the notice! I hadn't seen that. Unfortunately it didn't solve 
it by itself.
>>       $ make imx8mp_evk_defconfig
>>       $ make flash.bin
>>       $ sudo dd if=flash.bin of=/dev/mmcblk0 bs=1024 seek=32
> I have the following build script file, which works for me:
> ===============
> #!/usr/bin/env bash
>
> set -o xtrace    # print commands and their arguments as they are executed
> set -o errexit   # exit immediately if a command exits with a non-zero status
>
> build_dir="/development/imx-boot/build/nxp/imx8mpevk"
>
> rm -rf $build_dir
> make O=$build_dir imx8mp_evk_defconfig
>
> # Copy auxilary needed files
> cp ../imx-atf/build/imx8mp/release/bl31.bin "$build_dir/"
> cp ../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem_201904.bin "$build_dir/lpddr4_pmu_train_1d_dmem.bin"
> cp ../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem_201904.bin "$build_dir/lpddr4_pmu_train_1d_imem.bin"
> cp ../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem_201904.bin "$build_dir/lpddr4_pmu_train_2d_dmem.bin"
> cp ../firmware-imx-8.10/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem_201904.bin "$build_dir/lpddr4_pmu_train_2d_imem.bin"
>
> make O=$build_dir flash.bin ATF_LOAD_ADDR=0x970000 -j 16
> dd if=$build_dir/flash.bin of=$build_dir/sdcard.img bs=1024 seek=32 conv=notrunc
> ===============i

Looking in to and using your script solved my problem. I'm really unsure 
why. It came down to the conclusion that building inside u-boot source 
base dir gives me the error but when I build outside with -O to make the 
target boots fine. I have not found a good explanation to that.

     $ cd u-boot
     $ <copy binaries>
     $ make imx8mp_evk_defconfig
     $ make flash.bin ATF_LOAD_ADDR=0x970000

     This flash.bin programmed to a SD card ends up in "Can't support 
legacy image".

     $ make distclean
     $ mkdir build
     $ <copy binaries to build>
     $ make O=build imx8mp_evk_defconfig
     $ make O=build flash.bin ATF_LOAD_ADDR=0x970000

     This build/flash.bin programmed to SD card boot normally to u-boot 
console.

I will not spent time on searching for this now as I have a way forward.

> I guess you're using NXP fork of the U-Boot, and not the mainline one. Commit 633977d904 Is not present in the mainline tree, and additional DDR output gives a hint that you're trying to build NXP fork of U-Boot.

I tested both vanilla and imx-fork but cut'n'pasted the console from 
when I booted nxp. Now I have only worked on vanilla master and I think 
I'll stay there.

Andrey, thanks for sharing your script and workflow. Now I'm on track 
again.

Best regards,
/Peter




More information about the U-Boot mailing list