This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] PROCESSOR-SDK-AM62A:HS-SE R5映像无法引导

Guru**** 2477325 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1432062/processor-sdk-am62a-hs-se-r5-image-not-booting

器件型号:PROCESSOR-SDK-AM62A

工具与软件:

您好!

我能够使用 TI 的虚拟密钥将 hs-fs 器件转换为 hs-se。 使用提供的默认密钥在 Processor SDK 中构建 SPL 映像后、 tiboot3-am62ax-hs-evm.bin 映像无法引导。  我参考了本指南来构建图像。  software-dl.ti.com/.../Foundational_Components_Migration_Guide .html

-----------------------
SoC ID Header Info:
-----------------------
NumBlocks            : 2
-----------------------
SoC ID Public ROM Info:
-----------------------
SubBlockId           : 1
SubBlockSize         : 26
DeviceName           : am62a
DeviceType           : HSSE
DMSC ROM Version     : [0, 0, 8, 0]
R5 ROM Version       : [0, 0, 8, 0]
-----------------------
SoC ID Secure ROM Info:
-----------------------
Sec SubBlockId       : 2
Sec SubBlockSize     : 166
Sec Prime            : 0
Sec Key Revision     : 1
Sec Key Count        : 2
Sec TI MPK Hash      : cb39ee39c52d0469806636ff350520fcf7065cbec5cdddfea08863506c2be9f2242ff3207f919c2edcff407261f0908459139f3c153770f
Sec Cust MPK Hash    : 1f6002b07cd9b0b7c47d9ca8d1aae57b8e8784a12f636b2b760d7d98a18f189760dfd0f23e2b0cb10ec7edc7c6edac3d9bdfefe0eddc3ff
Sec Unique ID        : 760cf9c2ab60c48458b0841818e1d1387423a70a45196ce0d2020f958bee3a22

我将 DEVICE_TYPE 设置为 hs、并使用正确的 DFU defconfig、因为我使用的是 DFU 引导。 我使用 make u-boot 进行编译、然后生成 sysfw-image。

我没有从复制 smpk.pem \source\security\sbl_keywriter\scripts\cert_gen\am62ax\keys_devel\至 ti-processor-sdk-linux-am62axx-evm-08.06.00.45\board-support\core-secdev-k3\keys\custMpk.pem 、因为它们已经是完全相同的默认密钥。 电路板上熔合的 Cust MPK Hash 也与 verify_hash.csv 上的 SMPKH 相匹配

我的器件能够进入 DFU 引导模式、它在加载后接受映像、但我看不到任何串行输出。 我也无法继续加载下一个 tispl.bin_HS。 在编译之前、我还需要将其他内容复制到 Processor SDK 中吗? 是否有其他方法可以确认构建的映像使用正确的密钥进行签名?

谢谢!
Joseph

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    1/. 是 TI 参考板还是客户板?
    2/. 如果这是 TI 电路板、我们是否测试了从 SD 引导的 tiboot3.bin (HS-SE)?
    3/. 什么是 SDK 版本?
    此致!
    -hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Hong:

    感谢您的答复。 这是定制电路板、我使用的是  ti-processor-sdk-linux-am62axx-evm-08.06.00.45版本。 我尝试了 从 ti-processor-sdk-linux-am62axx-evm-08.06.00.45\board-support\prebuilt-images 中测试 tiboot3-am62ax-hs-evm.bin、然后最终获得输出。

    U-Boot SPL 2021.01-g2ee8efd654 (Feb 27 2023 - 11:47:43 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    am62a_init: board_init_f done
    

    我在另一个定制电路板上再次尝试了此过程、但这次我生成了我自己的定制密钥并将器件转换为 hs-se。  我将 custMpk.pem 复制到 core-secdev-k3\keys\custMpk.pem 中。   尝试 从 ti-processor-sdk-linux-am62axx-evm-08.06.00.45\board-support\k3-image-gen-2022.01引导安全 tiboot3-am62ax-hs-evm.bin 后没有输出

    $ ./dfu-util-v11.exe -l
    dfu-util 0.11
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../
    
    Found DFU: [0451:6165] ver=0200, devnum=19, cfg=1, intf=0, path="1-2", alt=1, name="SocId", serial="01.00.00.00"
    Found DFU: [0451:6165] ver=0200, devnum=19, cfg=1, intf=0, path="1-2", alt=0, name="bootloader", serial="01.00.00.00"
    
    
    
    
    $ ./dfu-util-v11.exe -R -a bootloader -D tiboot3-am62ax-hs-evm.bin
    dfu-util 0.11
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../
    
    Opening DFU capable USB device...
    Device ID 0451:6165
    Device DFU version 0110
    Claiming USB DFU Interface...
    Setting Alternate Interface #0 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 0110
    Device returned transfer size 512
    Copying data from PC to DFU device
    Download        [=========================] 100%       357451 bytes
    Download done.
    DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    Done!
    Resetting USB to switch back to Run-Time mode
    Warning: Invalid DFU suffix signature
    A valid DFU suffix will be required in a future dfu-util release
    
    
    
    
    
    $ ./dfu-util-v11.exe -l
    dfu-util 0.11
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to sourceforge.net/.../
    
    Found DFU: [0451:6165] ver=0200, devnum=24, cfg=1, intf=0, path="1-2", alt=1, name="UNKNOWN", serial="UNKNOWN"
    Found DFU: [0451:6165] ver=0200, devnum=24, cfg=1, intf=0, path="1-2", alt=0, name="UNKNOWN", serial="UNKNOWN"
    Failed to retrieve language identifiers
    Failed to retrieve language identifiers
    Failed to retrieve language identifiers
    Failed to retrieve language identifiers

    谢谢!

    Joseph

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我尝试 从 ti-processor-sdk-linux-am62axx-evm-08.06.00.45\board-support\prebuilt-images 中测试 tiboot3-am62ax-hs-evm.bin、最终获得了输出。

    1/. 什么是引导 模式?
    2/. 我们有更多引导消息/日志吗?
    此致!
    -hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Hong:

    我使用 DFU 引导。 我执行的步骤与上面的代码片段中显示的步骤相同。

    2/。 我们有更多引导消息/日志吗?
    [报价]

    使用我构建的 tiboot3-am62ax-hs-evm.bin 时、我看不到任何串行输出。 但是、当使用 来自 /prebuilt-images 的 tiboot3-am62ax-hs-evm.bin 时、这是唯一的输出。 我不确定这是否意味着它完全执行。

    U-Boot SPL 2021.01-g2ee8efd654 (Feb 27 2023 - 11:47:43 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    am62a_init: board_init_f done

     

    谢谢!

    Joseph

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这里是早期的 e2e 版本、包含日志供您参考
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1109517/sk-am62-fail-to-load-rootfs-using-usb-dfu/4124594#4124594
    此致!
    -hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您分享这些示例日志。

    我认为我的主要问题是为什么在  ti-processor-sdk-linux-am62axx-evm-08.06.00.45中编译映像后映像无法启动。 如果我使用 gp 或 hs-fs 器件并构建 SPL 图像、一切都能按预期正常运行。

    当我切换到 hs 器件类型并编译以实现安全启动时、这时 SPL 映像不启动。 首先、会自动处理密钥签名和证书生成。

    我在构建步骤中是否遗漏了任何内容?

    1.生成 u-boot

    2.制作 sysfw-image

    $ make sysfw-image
    =====================================
    Building the Linux Kernel DTBs
    =====================================
    make -C /jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538 ARCH=arm64 CROSS_COMPILE=/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/linux-devkit/sysroots/x86_64-arago-linux/usr/bin/aarch64-none-linux-gnu- tisdk_am62axx-evm_defconfig
    make[1]: Entering directory '/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/linux-5.10.168+gitAUTOINC+2c23e6c538-g2c23e6c538'
    #
    # No change to .config
    #
    =============================
    Building SYSFW Image
    =============================
    make[1]: Entering directory '/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/k3-image-gen-2022.01'
    ./scripts/gen_x509_combined_cert.sh -b /jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/u-boot_build/r5/spl/u-boot-spl.bin -l 0x43c00000 -s /jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/prebuilt-images/ti-fs-firmware-am62ax-hs-enc.bin -m 0x40000 -c "/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/prebuilt-images/ti-fs-firmware-am62ax-hs-cert.bin" -d out/soc/am62ax/evm/combined-tifs-cfg.bin -n 0x67000 -t out/soc/am62ax/evm/combined-dm-cfg.bin -y 0x43c3c800 -k /jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/core-secdev-k3/keys/custMpk.pem -r 1 -o tiboot3-am62ax-hs-evm.bin
    Certificate being generated :
    SUCCESS: Image tiboot3-am62ax-hs-evm.bin generated.
    make[1]: Leaving directory '/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/k3-image-gen-2022.01'

    Joseph

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    HS-SE 是使用 TI 测试密钥还是客户测试密钥进行编程?
    如果它是客户密钥、则所有二进制文件都需要使用客户密钥进行签名。
    此外、ATF 和 OPTEE 也需要使用客户密钥进行签名。 请参阅这个早期的 e2e
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1246915/am625-tiboot3-bin-uart-xmodem-file-transfer/4729158#4729158
    此致!
    -hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    另外还需要说明的是、ATF 和 OPTEE 都是 tispl.bin_HS 和 u-boot.img_HS 的一部分、这在 SPL 引导流程的稍后发生。

    我想我的问题是从 tiboot3-am62ax-hs-evm.bin 开始的。 这只需要 u-boot-spl.bin 和 TIFS HS-SE FW,根据 https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/08_06_00_45/exports/docs/linux/Foundational_Components U-Boot/UG-General-Info.html

    Joseph

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我建议参考幻灯片"AM62x_Secure_SDK_v1.pdf"、了解如何在 SDK 8.x 中构建/签名 tiboot3.bin/tisp.bin/u-boot.img
    https://dr-download.ti.com/authenticated/software-development/application-software-framework/MD-W5I8h4voaD/09.01.00.05/AM62x_Secure_SDK_v1.pdf?
    此致!
    -hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您分享这些幻灯片。 从 R5 SPL 构建和签名(1/3)页面开始、这是我确认的内容:

    构建 HS 的 R5 SPL (使用 make u-boot_R5完成)

    u-boot-spl.bin 已经生成、我会  在\board-support\u-boot_build\r5\spl 中看到 u-boot-spl-nodtb.bin 和 u-boot-spl.multidtb.fit、它们具有当前时间戳

    2.构建了组合电路板配置"combined-tifs-cfg.bin"和"combined-dm-cfg.bin"(通过 make sysfw-image 完成)

    我查看 boardcfg.bin、sec-cfg.bin、pm-cfg、rm-cfg.bin、combined-tifs-cfg.bin 、 和 combined-dm-cfg.bin 均位于 \k3-image-gen-2022.01\out\evm\am62ax\evm 中 soc、且具有当前时间戳。

    我在上面分享的构建输出还显示了我如何使用脚本来生成组合的板配置。

    python3 ./scripts/sysfw_boardcfg_blob_creator.py -b soc out/EVM/am62ax/EVM/board-cfg.bin -s soc out/OUT/EVM/am62ax/EVM/sec-cfg.bin -p soc out/EVM/am62ax/EVM/pm-cfg.bin -r soc out/EVM/am62ax/EVM/tifs-rm-cfg.bin -o soc out/EVM/am62ax/EVM/combined-tifs-cfg.bin

    python3 ./scripts/sysfw_boardcfg_blob_creator.py -p soc out/EVM/am62ax/pm-cfg.bin -r soc out/EVM/am62ax/evm/rm-cfg.bin -o soc out/EVM/am62ax/evm/combined-dm-cfg.bin

    3. tiboot.bin 签名(使用 make sysfw-image 完成)

    \core-secdev-k3\keys\custMpk.pem 与生成的密钥匹配。

    我在 \k3-image-gen-2022.01中看到 tiboot3-am62ax-hs-evm.bin 带有当前时间戳。 我在上面分享的日志还显示我正在使用 gen_x509_combined_cert.sh 来签署此协议

    ./scripts/gen_x509_combined_cert.sh -b /exthome/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/u-boot_build/r5/spl/u-boot-spl.bin -l 0x43c00000 -s /exthome/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/prebuilt-images/ti-fs-firmware-am62ax-hs-enc.bin -m 0x40000 -c "/exthome/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/prebuilt-images/ti-fs-firmware-am62ax-hs-cert.bin" -d out/soc/am62ax/evm/combined-tifs-cfg.bin -n 0x67000 -t out/soc/am62ax/evm/combined-dm-cfg.bin -y 0x43c3c800 -k /exthome/jtingin/ti-processor-sdk-linux-am62axx-evm-08.06.00.45/board-support/core-secdev-k3/keys/custMpk.pem -r 1 -o tiboot3-am62ax-hs-evm.bin

    我是否使用了正确的 ti-fs-firmware-am62ax-hs-enc.bin 和 ti-fs-firmware-am62ax-hs-cert.bin? 该脚本正在使用 /board-support/prebuilt-images/.中的文件

    谢谢!

    Joseph

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我建议首先在使用 TI 测试密钥编程的电路板上进行测试。
    1/. 我们是否尝试过使用 SDK 软件包中包含的预编译二进制文件(HS-SE)进行引导?
    2/. 是否有日志消息?
    此致!
    -hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Hong:

    是的、我首先在使用 TI 测试密钥进行编程的第一个电路板上尝试了该设计。 我 在前面的答复中提到了这一点。

    1/。 我们是否尝试过使用 SDK 软件包中包含的预编译二进制文件(HS-SE)进行引导?
    [报价]

    我还尝试了此功能、但遇到了类似的结果、其中我无法在中加载下一个 tispl.bin_hs 映像。

    2/。 是否有日志消息?
    [报价]

    使用预编译的二进制文件时、我确实会看到一些日志消息。 我在上面分享了这个、但我可以再次在这里分享

    U-Boot SPL 2021.01-g2ee8efd654 (Feb 27 2023 - 11:47:43 +0000)
    SYSFW ABI: 3.1 (firmware rev 0x0008 '8.6.4--v08.06.04 (Chill Capybar')
    am62a_init: board_init_f done

    我注意到编译消息中有关于 binman 的警告。 这可能会导致问题吗?

    ===================== WARNING ======================
      CC      lib/asm-offsets.s
      CC      arch/arm/lib/asm-offsets.s
    This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate
    to binman instead, to avoid the proliferation of
    arch-specific scripts with no tests.
    ====================================================

    谢谢!

    Joseph

    [/quote]
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    在此处进一步讨论问题(已解决)后关闭该主题:

    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1456470/processor-sdk-am62a-hs-se-r5-image-build-issue-with-sdk