public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* Booting verdin-imx8mm_defconfig fails
@ 2023-05-08 11:49 Manuel Traut
  2023-05-09  7:14 ` Marcel Ziswiler
  0 siblings, 1 reply; 4+ messages in thread
From: Manuel Traut @ 2023-05-08 11:49 UTC (permalink / raw)
  To: u-boot; +Cc: Marcel Ziswiler, Philippe Schenker, janek.filus

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Booting verdin-imx8mm_defconfig fails
  2023-05-08 11:49 Booting verdin-imx8mm_defconfig fails Manuel Traut
@ 2023-05-09  7:14 ` Marcel Ziswiler
  2023-05-09  9:49   ` AW: " Traut Manuel LCPF-CH
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Ziswiler @ 2023-05-09  7:14 UTC (permalink / raw)
  To: u-boot@lists.denx.de, manuel.traut@mt.com; +Cc: janek.filus@mt.com

Hi Manuel

Please note that Philippe is no longer with Toradex.

On Mon, 2023-05-08 at 13:49 +0200, Manuel Traut wrote:
> Hi,
> 
> I am not able to run u-boot for the Toradex Verdin i.MX8MMini.

We call it the Verdin iMX8M Mini.

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

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

> 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:

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.

> ===============================
> 
> --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:

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

> =======================
> 
> --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:

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

> =====================
> 
> (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

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].

> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* AW: Booting verdin-imx8mm_defconfig fails
  2023-05-09  7:14 ` Marcel Ziswiler
@ 2023-05-09  9:49   ` Traut Manuel LCPF-CH
  2023-05-15 10:15     ` Marcel Ziswiler
  0 siblings, 1 reply; 4+ messages in thread
From: Traut Manuel LCPF-CH @ 2023-05-09  9:49 UTC (permalink / raw)
  To: Marcel Ziswiler, u-boot@lists.denx.de; +Cc: Filus Janek LCPF-CH

Hi Marc,

Thanks for your quick reply.

>> 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.

>> 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.

>> 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<--

>> 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. 

> 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/u-boot@lists.denx.de/msg437039.html
[4] https://docs.toradex.com/108681-verdin-imx8m-mini-datasheet-v1.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AW: Booting verdin-imx8mm_defconfig fails
  2023-05-09  9:49   ` AW: " Traut Manuel LCPF-CH
@ 2023-05-15 10:15     ` Marcel Ziswiler
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Ziswiler @ 2023-05-15 10:15 UTC (permalink / raw)
  To: u-boot@lists.denx.de, Manuel.Traut@mt.com; +Cc: Janek.Filus@mt.com

Hi Manu

On Tue, 2023-05-09 at 09:49 +0000, Traut Manuel LCPF-CH wrote:
> Hi Marc,
> 
> Thanks for your quick reply.
> 
> > > 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.

> > > 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!

> > > 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.

> > > 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.

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!

> > 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.

> 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/u-boot@lists.denx.de/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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-15 10:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-08 11:49 Booting verdin-imx8mm_defconfig fails Manuel Traut
2023-05-09  7:14 ` Marcel Ziswiler
2023-05-09  9:49   ` AW: " Traut Manuel LCPF-CH
2023-05-15 10:15     ` Marcel Ziswiler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox