Skip to contentSkip to conversation

Booting verdin-imx8mm_defconfig fails

DISCUSSION Manuel Traut 2 participants 4 messages May 8, 2023 – May 15, 2023

lore
Share & tools
lore
#0 lore raw

Hi,

I am not able to run u-boot for the Toradex Verdin i.MX8MMini. I am not sure if I built/using u-boot as intended for this platform.

DDR firmware used from:
https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.19.bin
and arm-trusted-firmware 2.8.0

u-boot was built with the following commands:

--8<--
debian$ export CROSS_COMPILE=aarch64-linux-gnu-
debian$ export ARCH=arm64 BL31=/usr/lib/arm-trusted-firmware/imx8mm/bl31.bin debian$ make verdin-imx8mm_defconfig
debian$ make -j6 flash.bin
--8<--

1) running via serial download:
===============================

--8<--
debian$ sudo uuu SDP: boot -f flash.bin
uuu (Universal Update Utility) for nxp imx chips -- lib1.4.193

Success 0 Failure 0

1:4 1/ 1 [=================100%=================] SDP: boot -f flash.bin
Okay
--8<--

Produces the following output:

--8<--
U-Boot SPL 2023.07-rc1-00199-g1917a1a8a8 (May 08 2023 - 13:11:50 +0200)
WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout)
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
--8<--

2) running from SDCard:
=======================

--8<--
debian$ sudo dd if=flash.bin of=/dev/sdb bs=1024 seek=33 1206+1 records in
1206+1 records out
1234992 bytes (1.2 MB, 1.2 MiB) copied, 0.260789 s, 4.7 MB/s debian$ sync
--8<--

Pressing the 'recovery' switch while reseting the board:
Boots into Serial Download Mode

Just reseting the board:
Boots into Serial Download Mode

3) running from eMMC:
=====================

(no sdcard plugged in)

--8<--
imx8mm$ echo 0 > /sys/block/mmcblk1boot0/force_ro
imx8mm$ dd if=flash.bin of=/dev/mmcblk1boot0
imx8mm$ echo 1 > /sys/block/mmcblk1boot0/force_ro
imx8mm$ reboot
--8<--

Boots into Serial Download Mode

Any ideas?

Kind regards
Manuel

#1 lore raw

Hi Manuel

Please note that Philippe is no longer with Toradex.

Quoted 3 lines · Manuel Traut

Hi,

I am not able to run u-boot for the Toradex Verdin i.MX8MMini.

We call it the Verdin iMX8M Mini.

Quoted 1 line

I am not sure if I built/using u-boot as intended for this platform.

I would advice to stick to the documentation [1].

Quoted 6 lines

DDR firmware used from:
https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.19.bin
and arm-trusted-firmware 2.8.0

u-boot was built with the following commands:

Quoted 8 lines

--8<--
debian$ export CROSS_COMPILE=aarch64-linux-gnu-
debian$ export ARCH=arm64 BL31=/usr/lib/arm-trusted-firmware/imx8mm/bl31.bin debian$ make verdin-imx8mm_defconfig
debian$ make -j6 flash.bin
--8<--

1) running via serial download:

Please note that we never integrated/validated USB device support on Verdin iMX8M Mini (and Plus for that matter). So one really can NOT use UUU with upstream U-Boot so far and does have to stick to what we document.

Quoted 23 lines

===============================

--8<--
debian$ sudo uuu SDP: boot -f flash.bin
uuu (Universal Update Utility) for nxp imx chips -- lib1.4.193

Success 0    Failure 0

1:4      1/ 1 [=================100%=================] SDP: boot -f flash.bin Okay
--8<--

Produces the following output:

--8<--
U-Boot SPL 2023.07-rc1-00199-g1917a1a8a8 (May 08 2023 - 13:11:50 +0200) WDT:   Started watchdog@30280000 with servicing every 1000ms (60s timeout)
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###
--8<--

Quoted 1 line

2) running from SDCard:

As all our SoMs are factory fused to boot from their on-module eMMC storage one can NOT boot them from an SD card.

Quoted 10 lines

=======================

--8<--
debian$ sudo dd if=flash.bin of=/dev/sdb bs=1024 seek=33 1206+1 records in
1206+1 records out
1234992 bytes (1.2 MB, 1.2 MiB) copied, 0.260789 s, 4.7 MB/s debian$ sync
--8<--

Quoted 7 lines

Pressing the 'recovery' switch while reseting the board:
Boots into Serial Download Mode

Just reseting the board:
Boots into Serial Download Mode

3) running from eMMC:

Please stick to the documentation and skip 2 blocks when writing to the first hardware area boot partition.

Quoted 4 lines

=====================

(no sdcard plugged in)

Quoted 8 lines

--8<--
imx8mm$ echo 0 > /sys/block/mmcblk1boot0/force_ro
imx8mm$ dd if=flash.bin of=/dev/mmcblk1boot0
imx8mm$ echo 1 > /sys/block/mmcblk1boot0/force_ro
imx8mm$ reboot
--8<--

Boots into Serial Download Mode

If anything goes wrong the boot ROM usually falls back to serial download mode. There are ways to look at what exactly you may have done wrong see e.g. [2].

Quoted 4 lines

Any ideas?

Kind regards
Manuel

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/doc/board/toradex/verdin-imx8mm.rst
[2] https://www.nxp.com/webapp/Download?colCode=AN12853

Cheers

Marcel

#2 lore raw

Hi Marc,

Thanks for your quick reply.

Quoted 3 lines
Quoted 1 line

I am not sure if I built/using u-boot as intended for this platform.

I would advice to stick to the documentation [1].

Thanks for the reference.

Quoted 2 lines
Quoted 2 lines

1) running via serial download:
Please note that we never integrated/validated USB device support on Verdin iMX8M Mini (and Plus for that matter). So one really can NOT use UUU with upstream U-Boot so far and does have to stick to what we document.

Thanks for the clarification. I am aware of this and added this just for reference to see that generally the SPL seems to work.
I worked on this a couple of months ago [3] - however the base-address of the controller needs to be retrieved somehow in the probe function. Here it was just hardcoded.

Quoted 3 lines
Quoted 1 line

2) running from SDCard:

As all our SoMs are factory fused to boot from their on-module eMMC storage one can NOT boot them from an SD card.

Thanks for the information. I thought SDCard boot might work, cause of the following found in [4] --8<--
Important: make sure that there is no bootable SD card plugged into the slot. Otherwise, the module will try to boot from the external SD card instead of going into the USB serial loader. --8<--

Quoted 3 lines
Quoted 1 line

3) running from eMMC:

Please stick to the documentation and skip 2 blocks when writing to the first hardware area boot partition.

Thanks - this helps. However it seems that the SPL build with the defconfig expects the 2nd stage u-boot from mmc 1 instead of 0 --8<--
U-Boot SPL 2023.04+dfsg-1+iris+manut4 (May 03 2023 - 12:16:03 +0000)
WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout)
Trying to boot from MMC1
--8<--
Guess I get this fixed on my own.

Quoted 1 line

If anything goes wrong the boot ROM usually falls back to serial download mode. There are ways to look at what exactly you may have done wrong see e.g. [2].[Traut Manuel LCPF-CH]

Oh, this really eases debugging. Thanks for the reference!

Thanks
Manuel

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/doc/board/toradex/verdin-imx8mm.rst
[2] https://www.nxp.com/webapp/Download?colCode=AN12853
[3] https://www.mail-archive.com/[email protected]/msg437039.html
[4] https://docs.toradex.com/108681-verdin-imx8m-mini-datasheet-v1.1

#3 lore raw

Hi Manu

Quoted 9 lines · Traut Manuel LCPF-CH

Hi Marc,

Thanks for your quick reply.

Quoted 3 lines
Quoted 1 line

I am not sure if I built/using u-boot as intended for this platform.

I would advice to stick to the documentation [1].

Thanks for the reference.

You are very welcome.

Quoted 9 lines
Quoted 4 lines
Quoted 4 lines

1) running via serial download:
Please note that we never integrated/validated USB device support on Verdin iMX8M Mini (and Plus for that matter). So one really can NOT use UUU with upstream U-Boot so far and does have to stick to what we document.

Thanks for the clarification. I am aware of this and added this just for reference to see that generally the SPL seems to work.
I worked on this a couple of months ago [3] - however the base-address of the controller needs to be retrieved somehow in the probe function. Here it was just hardcoded.

Okay, I haven't played with that upstream yet. But I should!

Quoted 10 lines
Quoted 4 lines
Quoted 1 line

2) running from SDCard:

As all our SoMs are factory fused to boot from their on-module eMMC storage one can NOT boot them from an SD card.

Thanks for the information. I thought SDCard boot might work, cause of the following found in [4] --8<--
Important: make sure that there is no bootable SD card plugged into the slot. Otherwise, the module will try to boot from the external SD card instead of going into the USB serial loader. --8<--

I believe this reference refers to what NXP calls manufacturer boot which only applies to non-fused modules. As regular modules are always factory fused this does not really apply. However, I guess a customer could potentially order non-fused ones as part of a build-to-order (BTO) or something so to be on the safe side we added that note.

Quoted 4 lines
Quoted 3 lines
Quoted 1 line

3) running from eMMC:

Please stick to the documentation and skip 2 blocks when writing to the first hardware area boot partition.

Quoted 8 lines

Thanks - this helps. However it seems that the SPL build with the defconfig expects the 2nd stage u-boot from mmc 1 instead of 0
--8<--
U-Boot SPL 2023.04+dfsg-1+iris+manut4 (May 03 2023 - 12:16:03 +0000)
WDT:   Started watchdog@30280000 with servicing every 1000ms (60s timeout)
Trying to boot from MMC1
--8<--
Guess I get this fixed on my own.

No, I believe your issue lays with TF-A. However, I just checked and latest master does really work for meTM (;-p).

U-Boot SPL 2023.07-rc2-00084-g177e506952a (May 15 2023 - 12:09:06 +0200)
WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout)
Trying to boot from MMC1

NOTICE:  Do not release JR0 to NS as it can be used by HAB
NOTICE:  BL31: v2.8(release):v2.9-rc0
NOTICE:  BL31: Built : 12:08:36, May 15 2023

U-Boot 2023.07-rc2-00084-g177e506952a (May 15 2023 - 12:09:06 +0200)

CPU:   Freescale i.MX8MMQ rev1.0 1600 MHz (running at 1200 MHz)
CPU:   Industrial temperature grade (-40C to 105C) at 49C
Reset cause: POR
DRAM:  2 GiB
Core:  147 devices, 24 uclasses, devicetree: separate
WDT:   Started watchdog@30280000 with servicing every 1000ms (60s timeout)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In:    serial@30860000
Out:   serial@30860000
Err:   serial@30860000
Model: Toradex 0055 Verdin iMX8M Mini Quad 2GB WB IT V1.1A
Serial#: 06827787
Carrier: Toradex Verdin Development Board V1.1A, Serial# 10807609
Setting variant to wifi
Net:   eth0: ethernet@30be0000
Hit any key to stop autoboot:  0 

Verdin iMX8MM #

Good luck!

Quoted 4 lines
Quoted 2 lines

If anything goes wrong the boot ROM usually falls back to serial download mode. There are ways to look at what exactly you may have done wrong see e.g. [2].[Traut Manuel LCPF-CH]

Oh, this really eases debugging. Thanks for the reference!

You are very welcome.

Quoted 7 lines

Thanks
Manuel

[1] https://source.denx.de/u-boot/u-boot/-/blob/master/doc/board/toradex/verdin-imx8mm.rst
[2] https://www.nxp.com/webapp/Download?colCode=AN12853
[3] https://www.mail-archive.com/[email protected]/msg437039.html
[4] https://docs.toradex.com/108681-verdin-imx8m-mini-datasheet-v1.1

Best regards - Mit freundlichen Grüssen - Meilleures salutations

Marcel Ziswiler
Software Team Lead - Embedded Linux BSP

Toradex AG
Ebenaustrasse 10 | 6048 Horw/Luzern | Switzerland | T: +41 41 500 4800