U-Boot: git clone -b toradex_2020.07 git://git.toradex.com/u-boot-toradex.git
Added to configs/apalis_imx6_defconfig:
CONFIG_IMX_HAB=y
CONFIG_DFU=y
CONFIG_DFU_OVER_USB=y
CONFIG_DFU_MMC=y
CONFIG_CMD_DFU=y
After running
make apalis_imx6_defconfig; make
I take SPL and u-boot-ivt.img for signing with CST tool, version 3.3.1. The respective log-files are as follows:
SPL.log:
Image Type: Freescale IMX Boot Image
Image Ver: 2 (i.MX53/6/7 compatible)
Mode: DCD
Data Size: 53344 Bytes = 52.09 KiB = 0.05 MiB
Load Address: 00907420
Entry Point: 00908000
HAB Blocks: 0x00907400 0x00000000 0x0000ac00
DCD Blocks: 0x0000002c 0x00910000 0x00000004
u-boot-ivt.img.log:
Image Name: U-Boot 2020.07-07893-g72c5548771
Created: Thu Mar 18 13:41:20 2021
Image Type: ARM U-Boot Firmware with HABv4 IVT (uncompressed)
Data Size: 516128 Bytes = 504.03 KiB = 0.49 MiB
Load Address: 17800000
Entry Point: 17800000
HAB Blocks: 0x177fffc0 0x0000 0x0007c020
# Hint: changing the HAB Blocks address value to 0x17800000 does not change anything
# 0x7c020 is the length of the image file, the IVT is recorded in the last 64 bytes
After successful signing both images with the following csf-file («addr», «offs», «len», «image» substituted with entries from the log files above)
[Header]
Version = 4.2
Hash Algorithm = sha256
Engine = ANY
Engine Configuration = 0
Certificate Format = X509
Signature Format = CMS
[Install SRK]
File = "../crts/SRK_1_2_3_4_table.bin"
Source index = 0
[Install CSFK]
File = "../crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"
[Authenticate CSF]
[Install Key]
Verification index = 0
Target index = 2
File = "../crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"
[Authenticate Data]
Verification index = 2
..Blocks = «addr» «offs» «len» «image»
I get the following result (the ‘HAB Report Status’ line has been inserted by me to get the exact result of hab_rvt_report_status):
Industrial temperature grade DDR3 timings.
Trying to boot from MMC1
hab fuse not enabled
U-Boot 2020.07-07893-g72c5548771-dirty (Mar 16 2021 - 12:30:38 +0100)
CPU: Freescale i.MX6Q rev1.6 at 792MHz
CPU: Industrial temperature grade (-40C to 105C) at 40C
Reset cause: WDOG
DRAM: 2 GiB
PMIC: device id: 0x10, revision id: 0x21, programmed
MMC: FSL_SDHC: 1, FSL_SDHC: 2, FSL_SDHC: 0
Loading Environment from MMC... OK
In: serial
Out: serial
Err: serial
Model: Toradex Apalis iMX6 Quad 2GB IT V1.1C, Serial# 10652058
Net: eth0: ethernet@2188000
Hit any key to stop autoboot: 0
Apalis iMX6 # hab_status
Secure boot disabled
HAB Report Status: 0x69 (MX6DQP: 0, MX6DQ, 1, SOC_REV: 0x16, HAB_RVT_BASE: 0x00000098)
HAB Configuration: 0xf0, HAB State: 0x66
Apalis iMX6 #
Result: HAB_WARNING (0x69), "No HAB Events found!" message missing
解決済! 解決策の投稿を見る。
Finally, despite the warning I closed the board and it worked successfully
Hi Igor,
I already tried this path, but it did not work unfortunately.
Kind regards
Manni
Hi Manni
nxp does not support toradex U-Boot 2020.07, please try with official nxp
uboot releases from source.codeaurora.org/external/imx repository
https://source.codeaurora.org/external/imx/uboot-imx/tree/?h=imx_v2020.04_5.4.70_2.3.0
Documentation
https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4?h=imx_v2020.04_5.4.70_2.3.0
Best regards
igor
Hi Igor,
built SPL and U-Boot according to guides/imx6_imx7_spl_secure_boot.imx. After writing to eMMC the system hangs - no reaction, no output to screen; must awake by recovery. This applies to both unsigned and signed versions
I am using apalis_imx6_defconfig modified according to doc. I think this is ok according to U-Boot output
CPU: Freescale i.MX6Q rev1.6 at 792MHz
Model: Toradex Apalis iMX6 Quad 2GB IT V1.1C, Serial# 10652058
The only thing that differs to the provided documentation, as far as I see, is the PKI tree length. I am using 4096 whereas the documentation takes 2048.
Greetings Manni
Hi Manni
please try original official nxp uboot, not toradex, from source.codeaurora.org/external/imx repository
https://source.codeaurora.org/external/imx/uboot-imx/tree/?h=imx_v2020.04_5.4.70_2.3.0
Documentation
https://source.codeaurora.org/external/imx/uboot-imx/tree/doc/imx/habv4?h=imx_v2020.04_5.4.70_2.3.0
Support for non-nxp software can be provided through https://contact.nxp.com/new-prof-svcs-sw-tech
Best regards
igor
Hi Igor,
that's exactly, what I did and I got the result as described above
Kind regards Manni
Shall I use another _defconfig fiel? Which one?
Hi Igor,
so far so good. But which i.MX6 configuration shall I use for my board? Thank you
imx6qsabresd.
Best regards
igor
Hi ManKue
one can try patch suggested on
Best regards
igor
Here the outstanding reply, why your suggested patch fails:
Apalis iMX6 # rng_self_test 20000000
SEC0: RNG instantiated
RNG SELF TEST DESCRIPTOR:
0xB0800036
0x04800010
0x3C85A15B
0x50A9D0B1
0x71A09FEE
0x2EECF20B
0x02800020
0xB267292E
0x85BF712D
0xE85FF43A
0xA716B7FB
0xC40BB528
0x27B6F564
0x8821CB5D
0x9B5F6C26
0x12A00020
0x0A20DE17
0x6529357E
0x316277AB
0x2846254E
0x34D23BA5
0x6F5E9C32
0x7ABDC1BB
0x0197A385
0x82500405
0xA2000001
0x10880004
0x00000005
0x12820004
0x00000020
0x82500001
0xA2000001
0x10880004
0x40000045
0x02800020
0x8F389CC7
0xE7F7CBB0
0x6BF2073D
0xFC380B6D
0xB22E9D1A
0xEE64FCB7
0xA2B48D49
0xDF9BC3A4
0x82500009
0xA2000001
0x10880004
0x00000005
0x82500001
0x60340020
0x20000000
0xA2000001
0x10880004
0x00000005
0x8250000D
Error while running RNG self-test descriptor: 536877395
Apalis iMX6 #
Any ideas, how to proceed?
Thank you and kind regards
Manni
Please refer to my answer above (catched the wrong reply button)