主题中讨论的其他器件:TDA4VH
工具与软件:
TDA4VH
SDK 0900 Linux+FreeRTOS
电路板上
我们要调试安全启动、首先我们要通过 Keywriter 将 GP 板转换为 HS 板。
但是、我们从 Keywriter 的文档中知道、需要"otp keywriter 附加包"、我们如何获取它
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.
尊敬的 Hongyao:
Unknown 说:但是、我们从 Keywriter 的文档中知道需要"otp keywriter add-on package"、如何获得它
是的、正确。 KeyWriter 应用是 RTOS SDK 中 PDK 的一部分、可在以下文件夹中找到: /pdk_j784s4_10_00_00_27/packages/ti/boot/keywriter。
此 KeyWriter 应用的构建需要 KeyWriter 二进制和"OTP Keywriter 插件包"中的 TI Public FEK (未公开提供)。
请联系您对应的现场应用工程师以申请对此的访问权限。 该操作必须通过电子邮件完成。
此致
Suman
尊敬的 Hongyao:
在 gen_keywr_cert.sh 的帮助信息中、我们看到了两种生成证书的方法。 两者之间的区别是什么以及我们应该使用哪一个。
您在这里谈论的是哪两个选项? gen_keywr_cert.sh 是一个 shell 脚本、可根据提供的参数执行许多不同的操作。 请澄清。
此外、是否需要通过运行"./ gen_keywr_cert.sh -h"来生成密钥?
这是 help 命令选项。 您的意思是 "../gen_keywr_cert.sh -g"选项吗?
这只是一个帮助实用程序、用于生成一些与 KeyWriter 一起使用的示例/参考密钥。 实际的生产密钥通常位于 HSM 服务器上、您必须在 HSM 服务器上为 KeyWriter 生成证书
此致
Suman
你(们)好
您在这里谈论的是哪两个选项?
在 gen_keywr_cert.sh 中的用法示例中、有两种方法可以生成证书。 我们不了解两者之间的区别、以及我们应该使用哪一个进行测试会更好

您的意思是 "./ gen_keywr_cert.sh -g"选项吗?
有
实际的生产密钥通常位于您的 HSM 服务器上
真正的关键是它是由我们自己生成的、对吧? 您指的 HSM 服务器 是 DMSC 还是 tifs.bin、对吧?
你(们)好
[报价 userid="533595" url="~/support/processors-group/processors/f/processors-forum/1442908/tda4vh-q1-how-to-obtain-the-otp-keywriter-add-on-package/5537245 #5537245"]MCU UART 输出包含版本信息的日志、但 M3 UART 仍然没有任何输出
[报价]您是否已下载 Keywriter 软件包? 如果不是、请就相同问题联系您当地的 FAE。
此致
Diwakar
尊敬的 Hangyao、
在 gen_keywr_cert.sh 中的用法示例中、有两种方法可以生成证书。 我们不了解两者之间的区别、我们应该使用哪一个进行测试更好
这只是两个示例、您的用法可能会有所不同。 请参阅 4.17. 有关更多详细信息、请参阅 TI-SCI 文档的 PDK 文档和密钥编写器一节。
第一个示例将对 SMPK、SMEK、BMPK 和 BMEK 密钥进行编程、但由于缺少 KEYREV 和 KEYCNT、因此不会将器件转换为 HS-SE。
第二个示例是一个更加详尽的例子、但是 --SR-bcfg 16 --SR-sbl16 --SR-sysfw 16都是假值、所以不要按原样使用这个值。 不过、这会将 HS-SDK 转换为 HS-SE 器件、但由于假值、您将无法使用 TI FS 二进制文件进行引导。
我建议您首先选择一个最简单的方法、即 在尝试获取 KeyWriter 的正常设置时仅对 MSV 电子保险丝进行编程。
./gen_keywr_cert.sh --msv 0xC0FFE -t ti_fek_public.pem
KeyWriter 支持多通配置、可逐步对密钥进行编程、并在对 KEYREV 和 KEYCNT 电子保险丝进行编程时将器件转换为 HS-SE。 看一下中的脚本 / /packages/ti/boot/keywriter/scripts/generate_test_binaries.sh 文件中找到。

实际密钥意味着它是由我们自己生成的、对吗? 您所指的 HSM 服务器 是 DMSC 还是 tifs.bin、对吗?[/QUOT]实际密钥-是的、无论您的生产密钥是什么。 HSM 服务器是指安全服务器、即存储私钥的位置以及用于签名二进制文件的内容。 它不是 DMSC 或 TIFS.bin。
PDK 中的此脚本是开发环境脚本。
此致
Suman
尊敬的 Hangyao、
MCU UART 输出包含版本信息的日志、但 M3 UART 仍然没有任何输出
这主要是由于 KeyWriter 二进制文件未集成到 KeyWriter 应用中。 请确保使用 KeyWriter 二进制文件正确构建 KeyWriter 应用程序。
检查 /packages/ti/boot/keywriter/tifs_bin/j784s4/ti-fs-keywriter.bin 是正确的文件、并且 keywriter/SNC/j784s4/ soc 文件夹中生成的 tifs_keywriter.h 不为零。
此致
Suman
你(们)好
现在我们可以正常运行 keywriter_img、但仍然存在一些错误
如果我们以这种方式生成证书、 Keywriter 将报告"Debug Response: 0x10000"
./ gen_keywr_cert.sh -s keys/smpk.pem --smek keys/smek.key -t ti_fek_pub.pem -a keys/aes256.key

如果我们以这种方式生成证书、 Keywriter 将报告"Debug Response: 0x800"
./ gen_keywr_cert.sh -s keys/smpk.pem --smek keys/smek.key -b keys/bmpk.pem --bmek keys/bmek.key -t ti_fek_pub.pem -a keys/aes256.key

尊敬的 Hangyao、
您是否能够按照 suman 之前的建议编写 MSV 值?
[报价 userid="35368" url="~/support/processors-group/processors/f/processors-forum/1442908/tda4vh-q1-how-to-obtain-the-otp-keywriter-add-on-package/5538791 #5538791"]我建议您首先选择一个最简单的方法、即 在尝试获取 KeyWriter 的正常设置时仅对 MSV 电子保险丝进行编程。
./gen_keywr_cert.sh --msv 0xC0FFE -t ti_fek_public.pem
您的定制电路板中的 VPP 是否与 EVM 相同?
此致
Diwakar
你(们)好
我们已成功将 HS-SE FS 器件转换为 HS-SE、同时尝试引导器件。 我们发现、在 uboot 器件树 k3-j784s4-binman.dtsi 中将所有 keyfile 字段修改为我们自己的密钥后、我们编译了 tiboot3-j784s4-evm.bin tispl.bin u-boot.img、使用 DFU 引导功能可以正常引导至 uboot。

引导日志如下所示
[2024-11-29 16:40:19] U-Boot SPL 2023.04-tda4vhdv (Jul 13 2023 - 05:36:12 +0000) [2024-11-29 16:40:19] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--v09.00.06 (Kool Koala)') [2024-11-29 16:40:19] SPL initial stack usage: 13424 bytes [2024-11-29 16:40:19] Trying to boot from DFU [2024-11-29 16:40:19] ######DOWNLOAD ... OK [2024-11-29 16:40:23] Ctrl+C to exit ... [2024-11-29 16:40:23] alloc space exhausted [2024-11-29 16:40:23] Could not get FIT buffer of 1526312 bytes [2024-11-29 16:40:23] check CONFIG_SYS_SPL_MALLOC_SIZE [2024-11-29 16:40:23] Authentication passed [2024-11-29 16:40:23] Authentication passed [2024-11-29 16:40:23] Authentication passed [2024-11-29 16:40:23] Authentication passed [2024-11-29 16:40:23] Authentication passed [2024-11-29 16:40:23] Loading Environment from nowhere... OK [2024-11-29 16:40:23] init_env from device 18 not supported! [2024-11-29 16:40:23] Starting ATF on ARM64 core... [2024-11-29 16:40:23] [2024-11-29 16:40:23] NOTICE: BL31: v2.8(release):v2.8-226-g2fcd408bb3-dirty [2024-11-29 16:40:23] NOTICE: BL31: Built : 00:42:57, Jan 13 2023 [2024-11-29 16:40:23] I/TC: [2024-11-29 16:40:23] I/TC: OP-TEE version: 3.20.0 (gcc version 11.3.0 (GCC)) #1 Fri Jan 20 15:42:54 UTC 2023 aarch64 [2024-11-29 16:40:23] I/TC: WARNING: This OP-TEE configuration might be insecure! [2024-11-29 16:40:23] I/TC: WARNING: Please check optee.readthedocs.io/.../porting_guidelines.html [2024-11-29 16:40:23] I/TC: Primary CPU initializing [2024-11-29 16:40:23] I/TC: SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--v09.00.06 (Kool Koala)') [2024-11-29 16:40:23] I/TC: HUK Initialized [2024-11-29 16:40:23] I/TC: Activated SA2UL device [2024-11-29 16:40:23] I/TC: Enabled firewalls for SA2UL TRNG device [2024-11-29 16:40:23] I/TC: SA2UL TRNG initialized [2024-11-29 16:40:23] I/TC: SA2UL Drivers initialized [2024-11-29 16:40:23] I/TC: Primary CPU switching to normal world boot [2024-11-29 16:40:23] [2024-11-29 16:40:23] U-Boot SPL 2023.04-tda4vhdv (Jul 13 2023 - 05:36:12 +0000) [2024-11-29 16:40:23] SYSFW ABI: 3.1 (firmware rev 0x0009 '9.0.6--v09.00.06 (Kool Koala)') [2024-11-29 16:40:23] Trying to boot from DFU [2024-11-29 16:40:23] cdns-usb3-peripheral usb@6000000: Unable to get USB2 phy (ret -61) [2024-11-29 16:40:23] cdns-usb3-peripheral usb@6000000: Unable to get USB3 phy (ret -22) [2024-11-29 16:40:23] cdns-usb3-peripheral usb@6000000: DRD version v1 (ID: 0004024e, rev: 00000200) [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep0 support: [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep1out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep2out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep3out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep4out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep5out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep6out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep7out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep8out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep9out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep10out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep11out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep12out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep13out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep14out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep15out support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep1in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep2in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep3in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep4in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep5in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep6in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep7in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep8in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep9in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep10in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep11in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep12in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep13in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep14in support: BULK, INT ISO [2024-11-29 16:40:24] cdns-usb3-peripheral usb@6000000: Initialized ep15in support: BULK, INT ISO [2024-11-29 16:40:24] ####DOWNLOAD ... OK [2024-11-29 16:40:27] Ctrl+C to exit ... [2024-11-29 16:40:27] Authentication passed [2024-11-29 16:40:28] Authentication passed [2024-11-29 16:40:28] [2024-11-29 16:40:29] [2024-11-29 16:40:29] U-Boot 2023.04-tda4vhdv (Jul 13 2023 - 05:36:12 +0000) [2024-11-29 16:40:29] [2024-11-29 16:40:29] SoC: J784S4 SR1.0 HS-SE [2024-11-29 16:40:29] Model: Texas Instruments J784S4 EVM [2024-11-29 16:40:29] DRAM: 32 GiB [2024-11-29 16:40:29] idle-statesCore: 82 devices, 29 uclasses, devicetree: separate [2024-11-29 16:40:29] Flash: 0 Bytes [2024-11-29 16:40:29] MMC: mmc@4f80000: 0, mmc@4fb0000: 1 [2024-11-29 16:40:29] Loading Environment from MMC... *** Warning - bad CRC, using default environment [2024-11-29 16:40:29] [2024-11-29 16:40:29] In: serial@2880000 [2024-11-29 16:40:29] Out: serial@2880000 [2024-11-29 16:40:29] Err: serial@2880000 [2024-11-29 16:40:29] Hit any key to stop autoboot: 2 1 0 [2024-11-29 16:40:31] Unknown command '' - try 'help' [2024-11-29 16:40:31] ** No partition table - mmc 0 ** [2024-11-29 16:40:31] k3_r5f_rproc r5f@41000000: Core 1 is already in use. No rproc commands work [2024-11-29 16:40:31] k3_r5f_rproc r5f@41400000: Core 2 is already in use. No rproc commands work [2024-11-29 16:40:31] ** No partition table - mmc 0 ** [2024-11-29 16:40:31] Couldn't find partition mmc 0:2 [2024-11-29 16:40:31] Can't set block device [2024-11-29 16:40:31] ** No partition table - mmc 0 ** [2024-11-29 16:40:31] Couldn't find partition mmc 0:2 [2024-11-29 16:40:31] Can't set block device [2024-11-29 16:40:31] name_overlays_fit= conf-ti_k3-j784s4-evm-virt-mac-client.dtbo conf-ti_k3-j784s4-vision-apps.dtbo [2024-11-29 16:40:31] name_fit_config=conf-ti_k3-j784s4-evm.dtb [2024-11-29 16:40:31] Wrong Image Format for bootm command [2024-11-29 16:40:31] ERROR: can't get kernel image! [2024-11-29 16:40:31] switch to partitions #0, OK [2024-11-29 16:40:31] mmc0(part 0) is current device [2024-11-29 16:40:31] ** No partition table - mmc 0 ** [2024-11-29 16:40:31] Couldn't find partition mmc 0:1 [2024-11-29 16:40:31] switch to partitions #0, OK [2024-11-29 16:40:31] mmc0(part 0) is current device [2024-11-29 16:40:31] ** No partition table - mmc 0 ** [2024-11-29 16:40:31] Couldn't find partition mmc 0:1 [2024-11-29 16:40:31] starting USB... [2024-11-29 16:40:31] No working controllers found [2024-11-29 16:40:31] USB is stopped. Please issue 'usb start' first.
我想知道我们对 uboot 的修改是否正确、而且我们的 Linux 使用 fimage 格式。 我们应该如何配置密钥以签署限定值
你(们)好
我提出了一个新问题、您可以通过下面的链接访问