iMX8MQ stuck in uboot (2021-04 version)

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

iMX8MQ stuck in uboot (2021-04 version)

2,791 Views
Junjielu
Contributor III


U-Boot SPL 2021.04-00010-gcd4523e995-dirty (Jan 20 2022 - 19:45:12 -0800)
PMIC: PFUZE100 ID=0x10
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC2


U-Boot 2021.04-00010-gcd4523e995-dirty (Jan 20 2022 - 19:45:12 -0800)

CPU: i.MX8MQ rev2.1 1500 MHz (running at 1000 MHz)
CPU: Commercial temperature grade (0C to 95C) at 33C
Reset cause: POR
Model: *************************
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0imx8m_hdmi_probe   <=================== stuck here !!!!

NOTE:

CONFIG_EFI_SECURE_BOOT=n

If set to "y",  stuck in SPL:  Trying to boot from MMC2

 

Thanks a lot for the help! 

 

 

The following are building steps: 

Step 1:  Set up cross-build environment

$ sh ./fsl-imx-wayland-glibc-x86_64-meta-toolchain-cortexa53-crypto-imx8mqevk-toolchain-5.10-hardknott.sh

$ source /opt/fsl-imx-wayland/5.10-hardknott/environment-setup-cortexa53-crypto-poky-linux

Step 2: Building for customized board

$ cd uboot-imx

$ make distclean

$ make imx8mq-evk_4g_defconfig

$ make -j4

Step 3:  Building bl31.bin from imx-atf:

$ git clone https://source.codeaurora.org/external/imx/imx-atf -b lf_v2.4
$ cd imx-atf
$ make distclean
$ LDFLAGS= make PLAT=imx8mq bl31

Step 4: Download firmware-imx from NXP

$ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.13.bin
$ chmod +x firmware-imx-8.13.bin

$ ./ firmware-imx-8.13.bin

Step 5: Download imx-mkimage and use it to build the final uboot image

$ git clone https://source.codeaurora.org/external/imx/imx-mkimage -b imx_5.4.70_2.3.0
$ cd imx-mkimage
$ CFLAGS= make SOC=iMX8M clean
$ cp ../uboot-imx/tools/mkimage iMX8M/mkimage_uboot
$ cp ../uboot-imx/spl/u-boot-spl.bin iMX8M/
$ cp ../uboot-imx/u-boot-nodtb.bin iMX8M/
$ cp ../uboot-imx/u-boot.bin iMX8M/
$ cp ../uboot-imx/arch/arm/dts/imx8mq-evk.dtb iMX8M/imx8mq-evk.dtb
$ cp ../firmware-imx-8.13/firmware/hdmi/cadence/signed_hdmi_imx8m.bin iMX8M/
$ cp ../firmware-imx-8.13/firmware/ddr/synopsys/lpddr4_pmu_train_* iMX8M/
$ cp ../imx-atf/build/imx8mq/release/bl31.bin iMX8M/
$ CFLAGS= make SOC=iMX8M flash_evk

Step 6: Flash imx-boot image(flash.bin) to SD card:

$ dd if=./imx-mkimage/iMX8M/flash.bin of=/dev/sdb bs=1k seek=33

0 Kudos
Reply
5 Replies

2,716 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

This configuration was added to support Arm SystemReady-IR, I would recommend if it is not need there shouldn’t be any issue to disable it.

https://source.codeaurora.org/external/imx/uboot-imx/commit/configs/imx8mq_evk_defconfig?h=lf_v2021....

I think that more than having this enabled/disabled it would be needed to check what is causing the stuck at SPL, have you tried enabled it but keep CONFIG_VIDEO_IMX8M_DCSS=n?

Also, could you share the defconfig you’re using?

Best regards,
Aldo.

2,744 Views
Junjielu
Contributor III

Hi Aldo,

It looks like the code exits from the stuck by disabling DCSS (CONFIG_VIDEO_IMX8M_DCSS=n).

If the secure feature is enabled, CONFIG_EFI_SECURE_BOOT=y, what's the manual building steps?  

Again, thanks a lot for the help!

Best,

Jason

0 Kudos
Reply

2,768 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

If I understood correctly it only hangs if you set CONFIG_EFI_SECURE_BOOT=y, otherwise it does boot correctly, right?

If this is the case then please note that this configuration have the following:

config EFI_SECURE_BOOT
        bool "Enable EFI secure boot support"
        depends on EFI_LOADER
        select SHA256
        select RSA
        select RSA_VERIFY_WITH_PKEY
        select IMAGE_SIGN_INFO
        select ASYMMETRIC_KEY_TYPE
        select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
        select X509_CERTIFICATE_PARSER
        select PKCS7_MESSAGE_PARSER
        select PKCS7_VERIFY
        default n
        help

Select this option to enable EFI secure boot support.

Once SecureBoot mode is enforced, any EFI binary can run only if it is signed with a trusted key. To do that, you need to install, at least, PK, KEK and db.

So if you don’t need this feature, you may disable it.

Best regards,
Aldo.

0 Kudos
Reply

2,764 Views
Junjielu
Contributor III

Hi Aldo

I disable this secure feature, CONFIG_EFI_SECURE_BOOT=n,  but still stuck.  Please check the booting message below.

-------------------

[*]-Video Link 0imx8m_hdmi_probe  <=========== stuck here

Thanks,

Jason

 

U-Boot SPL 2021.04-00010-gcd4523e995-dirty (Jan 21 2022 - 10:53:39 -0800)
PMIC: PFUZE100 ID=0x10
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from MMC2


U-Boot 2021.04-00010-gcd4523e995-dirty (Jan 21 2022 - 10:53:39 -0800)

CPU: i.MX8MQ rev2.1 1500 MHz (running at 1000 MHz)
CPU: Commercial temperature grade (0C to 95C) at 21C
Reset cause: POR
Model: **************************
DRAM: 4 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

[*]-Video Link 0imx8m_hdmi_probe  <=========== stuck here

0 Kudos
Reply

2,754 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Thank you for clarifying, I cannot see anything wrong on how you builded uboot.

Since you’re using a custom board, I would suggest to check DDR stress test, if you have already done that and passed you may skip this

Also, checking hdmi power and clocks may be a good idea, you may refer to the i.MX8M Hardware Developer's guide.

https://www.nxp.com/webapp/Download?colCode=IMX8MDQLQHDG

Best regards,
Aldo.

0 Kudos
Reply