Tool/software:
Hello Team,
We’ve migrated our hs-prime custom board from:
Old SDK Versions:
- ti-processor-sdk-linux-j7-evm-08_01_00_07
- ti-processor-sdk-rtos-j721e-evm-08_01_00_13
New SDK Versions:
- ti-processor-sdk-linux-adas-j721e-evm-09_02_00_05
- ti-processor-sdk-rtos-j721e-evm-09_02_00_05
We have developed a custom infra to validate/authenticate all the images (tiboot3, tispl, sysfw.bin, uboot.img, fitimage) before flashing during OTA. Custom infra has been written to use ti_sci_cmd_proc_auth_boot_image()::drivers/firmware/ti_sci.c in the kernel to validate the image using TISCI framework. This infra has been working fine on 8.1 SDK.
The above infra has been ported to 9.2 SDK as well and it is working fine for validating/authenticating all the images, except sysfw.bin.
Please find the steps which have been followed on 9.2 SDK to build sysfw.
<Steps to build sysfw> :
1. Downloaded TIFS SRC and dependencies for 9.2 SDK:
- TIFS-SRC-Release_SDK-9.1.zip
- xdctools_3_51_03_28_core_linux.zip
- bios_6_76_00_08.run
- ti_cgt_tms470_18.1.3.LTS_linux_installer_x86.bin
2. Generated `ti-fs-firmware-j721e-hs.bin`.
3. Placed customer key in:
`{RTOS_SDK}/pdk_jacinto_09_02_00_30/packages/ti/build/makerules/`
And updated "pdk_jacinto_09_02_00_30/packages/ti/build/makerules/x509CertificateGen.sh".
4. Executed:
cd {RTOS_SDK}/pdk_jacinto_09_02_00_30/packages/ti/drv/sciclient/tools
export TIFS_DIR=/home/${USER}/tifs_srcs/tifs_v09.01.02
./firmwareHeaderGen.sh j721e-hsp
Output: `tifs-hsp.bin` at `pdk_jacinto_08_01_00_36/packages/ti/drv/sciclient/soc/V1/`.
5. Renamed `tifs-hsp.bin` to `sysfw.bin` and copied to:
`{LINUX_SDK}/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/build/r5`
6. Removed `sysfw` node in:
`{LINUX_SDK}/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/arch/arm/dts/k3-j721e-binman.dtsi`
- sysfw {
- filename = "sysfw.bin";
- ti-secure-rom {
- content = <&ti_fs_cert>;
- core = "secure";
- load = <0x40000>;
- keyfile = "custMpk.pem";
- countersign;
- };
- ti_fs_cert: ti-fs-cert.bin {
- filename = "ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-cert.bin";
- type = "blob-ext";
- optional;
- };
- ti-fs-firmware-j721e_sr1_1-hs-enc.bin {
- filename = "ti-sysfw/ti-fs-firmware-j721e_sr1_1-hs-enc.bin";
- type = "blob-ext";
- optional;
- };
- };
7. Built U-Boot:
cd {LINUX_SDK}
make u-boot –j32
Output: `sysfw-j721e_sr1_1-hs-evm.itb` at `{LINUX_SDK}/board-support/ti-u-boot-2023.04+gitAUTOINC+f9b966c674/build/r5`.
NOTE THAT THE SYSFW BUILT WITH THE ABOVE MENTIONED STEPS HAVE BEEN FLASHED TO OSPI MEMORY AND WE ARE ABLE TO SUCCESSFULLY SECURE-BOOT and USE THIS IMAGE.
However, while validating the same image using the above mentioned infra, we are seeing an issue.
The ti_sci_cmd_proc_auth_boot_image() is returning the error "Mbox send fail -110"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Image Name: sysfw.bin Addr: 0xa9b5c100 Size: 264053 offset: 256
[ 633.120156] ti-sci 44083000.system-controller: Mbox timedout in resp(caller: ti_sci_chrdev_unlocked_ioctl+0x2f0/0x350)
[ 633.130866] ti-sci 44083000.system-controller: Mbox send fail -110
sysfw.bin image authentication status FAIL
Image Name: board-cfg.bin Addr: 0xa9b9c8f0 Size: 1727 offset: 264432
[ 634.140154] ti-sci 44083000.system-controller: Mbox timedout in resp(caller: ti_sci_chrdev_unlocked_ioctl+0x2f0/0x350)
[ 634.150857] ti-sci 44083000.system-controller: Mbox send fail -110
board-cfg.bin image authentication status FAIL
Image Name: pm-cfg.bin Addr: 0xa9b9d020 Size: 1700 offset: 266272
[ 635.164157] ti-sci 44083000.system-controller: Mbox timedout in resp(caller: ti_sci_chrdev_unlocked_ioctl+0x2f0/0x350)
[ 635.174861] ti-sci 44083000.system-controller: Mbox send fail -110
pm-cfg.bin image authentication status FAIL
Image Name: rm-cfg.bin Addr: 0xa9b9d734 Size: 5409 offset: 268084
[ 636.188157] ti-sci 44083000.system-controller: Mbox timedout in resp(caller: ti_sci_chrdev_unlocked_ioctl+0x2f0/0x350)
[ 636.198873] ti-sci 44083000.system-controller: Mbox send fail -110
rm-cfg.bin image authentication status FAIL
Image Name: sec-cfg.bin Addr: 0xa9b9ecc8 Size: 2048 offset: 273608
[ 637.212158] ti-sci 44083000.system-controller: Mbox timedout in resp(caller: ti_sci_chrdev_unlocked_ioctl+0x2f0/0x350)
[ 637.222868] ti-sci 44083000.system-controller: Mbox send fail -110
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
OIDs used for sysfw image (pdk_jacinto_09_02_00_30/packages/ti/build/makerules/x509CertificateGen.sh):
[ v3_ca ]
basicConstraints = CA:true
1.3.6.1.4.1.294.1.3=ASN1:SEQUENCE:swrv
1.3.6.1.4.1.294.1.34=ASN1:SEQUENCE:sysfw_image_integrity
1.3.6.1.4.1.294.1.35=ASN1:SEQUENCE:sysfw_image_load
1.3.6.1.4.1.294.1.4=ASN1:SEQUENCE:encryption
1.3.6.1.4.1.294.1.1=ASN1:SEQUENCE:boot_seq
1.3.6.1.4.1.294.1.2=ASN1:SEQUENCE:image_integrity
Can you please guide us to have mandatory OIDs for sysfw and the sequence to be followed.
Please advise on resolving the authentication issue.
+++++++++++++++++++++++++++++++++++++++++++++++++++
Thanks in advance!
Regards,
Kishore