I tried to rebuild U-boot (I need to change a few options for secure boot) according to
tried to follow all steps meticulously
While the steps all seem to work, U-Boot does not fully work anymore, just the SPL part starts. When I overwrite it with the imx-boot built by yocto, the system boots up again properly.
Is there maybe a step missing?
I’ve attached a script with all executed commands:
build.txt (3.2 KB)
What happens after booting:
U-Boot SPL 2022.04-21601-g7bd2074193 (Aug 21 2023 - 06:17:15 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802e000, size 888
Download 893952, Total size 894832
Then for a few seconds nothing happens and the everything restarts (maybe the Watchdog)
Here the output from the Yocto imx-boot
U-Boot SPL 2020.04-5.6.0-devel+git.7d1febd4af77 (Feb 16 2022 - 09:00:30 +0000)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
Quad die, dual rank failed, attempting dual die, single rank configuration.
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
Normal Boot
Trying to boot from BOOTROM
Find FIT header 0x4803a600, size 969
Need continue download 1024
Download 839680, total fit 840880
NOTICE: BL31: v2.2(release):toradex_imx_5.4.70_2.3.0-g835a8f67b2
NOTICE: BL31: Built : 19:30:40, May 3 2021
U-Boot 2020.04-5.6.0-devel+git.7d1febd4af77 (Feb 16 2022 - 09:00:30 +0000)
CPU: i.MX8MP[8] rev1.1 1600 MHz (running at 1200 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 57C
Reset cause: POR
DRAM: 4 GiB
MMC: FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Model: Toradex Verdin iMX8M Plus Quad 4GB IT V1.1A, Serial# 15034114
Carrier: Toradex Verdin Development Board V1.1C, Serial# 10952591
Hi @thomasstauffer !
Thanks for reaching out!
The team is processing it and will come back to you as soon as possible.
Have a great day!
Greetings @thomasstauffer,
First of all to be clear when you say “secure boot” I’m assuming you’re referring to NXP’s “High Assurance Boot” (HAB). If you’re referring to something else then please clarify. Otherwise I’ll proceed assuming you are referring to HAB.
tried to follow all steps meticulously
I’m not sure what steps you’re following since we don’t document HAB anywhere on our developer site at the moment. That said there’s several documents from NXP that describe the process in detail. For example this: https://github.com/u-boot/u-boot/blob/master/doc/imx/habv4/guides/mx8m_spl_secure_boot.txt
Or, NXP application note 4581.
That said we do actually provide an experimental meta-layer that provides HAB functionality: GitHub - toradex/meta-toradex-security
Adding this meta-layer and following the instructions in the README should provide HAB support. You don’t need to use this meta-layer and it can be just used as a reference for your own setup. Also this meta-layer is only compatible with our latest kirkstone based builds.
Perhaps for a start try giving this a look and then let me know if you have any further questions.
Best Regards,
Jeremias
I’ve run into this before. In my case it was a problem with the address for ATF (aka BL31) not matching.
I’ve had issue with both
- SOC_ATF_BOOT_UART_BASE
- ATF_LOAD_ADDR
IIRC, these bitbake variables need to match what is used in the source code of imx-atf.
1 Like
@jeremias.tx Regarding HAB, yes HAB, but for the moment I’m just talking that the barebones U-Boot without HAB does not boot properly. Before adding further modifications (e.g. adding SquashFS, lock U-Boot more down) I wanted verify if it works with the default configuration. Often people ask here, “Why?”, so I wanted to give a reason
But thanks for the additional hints.
@mbessler Thanks for the hint, I’ll look into this.
I see, I believe I understand better what you’re trying to do now. That said I went and did a sanity check and tried to build the boot container for Verdin i.MX8MP manually via our documented instructions. I seem to have ran into the same exact problem you did with the imx-boot
that resulted from the instructions.
Let me report this to our team and see if there’s some information missing or something got incorrectly documented.
In the meantime I would suggest just using Yocto to build the bootloader binaries and customize things from there.
Best Regards,
Jeremias
Hi @thomasstauffer !
FYI, the update of the related Build U-Boot for NXP i.MX-based System on Modules | Toradex Developer Center article is currently a work in progress.
We will let you know once the update is publicly available so you can test the reviewed instructions.
Best regards,
1 Like
Hi @henrique.tx
Any progress with this issue?
I have the same problem. When I build boot container outside of yocto, it didn’t boot.
U-Boot SPL 2022.04-g4f357970-dirty (Nov 15 2023 - 10:33:32 +0100)
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
Training FAILED
DDRINFO: start DRAM init
DDRINFO: DRAM rate 4000MTS
DDRINFO:ddrphy calibration done
DDRINFO: ddrmix config done
DDR configured as single rank
SEC0: RNG instantiated
Normal Boot
WDT: Started watchdog@30280000 with servicing (60s timeout)
Trying to boot from BOOTROM
Boot Stage: Primary boot
Find img info 0x&4802e000, size 888
Download 941568, Total size 942288
It freezes and reboot in in loop after 60s.
Followed build manual from Toradex website (Build U-Boot for NXP i.MX-based System on Modules)
Hello @msv_zitnik ,
The documentation is still under review to be released, we will let you know when it is available.
Best regards,
Josep
Hi @thomasstauffer, @mbessler and @msv_zitnik !
We are (very) happy to tell you that the article Build U-Boot From Source Code | Toradex Developer Center was updated is publicly available.
Don’t forget to give us feedback about it 
Best regards,