How to Create and Merge Asymmetric Boot Images
Create A chain:
cd $PDK_TOP/drive-foundation
tools/flashtools/bootburn/create_bsp_images.py -b <board> -r 1 -g ${PWD}/<board>/chain_a -D --chain A --asymmetric -s --fskp-bct-path $PDK_TOP/drive-foundation/firmware/bin/t234/fskpboot/br_bct_BR_sigheader.bct -m
Create B chain:
-
Using a privacy key for all images
# Specify the key $PWD/tools/flashtools/bootburn/create_bsp_images.py -b <board> -r 1 -g ${PWD}/<board>/chain_b -D --chain B --asymmetric -s --encryption_key <Path to encryption key file> -p <Path_to_signing_key_file>
-
Using a unique privacy key per SoC
# Do not specify the key $PWD/tools/flashtools/bootburn/create_bsp_images.py -b <board> -r 1 -g ${PWD}/<board>/chain_b -D --chain B --asymmetric -s --encryption_key <Path to encryption key file> cd $PDK_TOP # Merge chains ${PDK_TOP}/drive-foundation/tools/flashtools/bootburn/create_bsp_images.py -b <board> -r 1 -g ${PDK_TOP}/<merge-chain> --asymmetric --merge-chains A=<chain_a> B=<chain_b>
For example,
${PDK_TOP}/drive-foundation/tools/flashtools/bootburn/create_bsp_images.py -b p3710-10-a04 -r 1 -g ${PDK_TOP}/p3710-10-a04-merge -D --asymmetric --merge-chains A=${PDK_TOP}/drive-foundation/p3710-10-a04/chain_a B=${PDK_TOP}/drive-foundation-safety/p3710-10-a04/chain_b
-
Additional steps for using a unique key per SoC
Sign the base package with the new unique key.
${PDK_TOP}/drive-foundation/tools/flashtools/bootburn_t23x_py/post_processing_tool.py --chip 0x23 --images ${PDK_TOP}/p3710-10-a04-merge/642-63710-0010-000_TS4/flash-images/ --headers-output-dir ${PDK_TOP}/p3710-10-a04-headers --asymmetric --signing-key ~/keys/edopenssl_v3_0.pem --debug
Generate a new fuse block for the unique key (updated fskp_fuse.xml). For more information, see Create Fskp Firmware.
./fskp_fuseburn.py -c 0x23 -f fskp_fuse.xml -k fskp_t23x.key -g $PDK_TOP/drive-foundation/firmware/bin/t234/fskpboot/ -i 63 -B <board> -b
Copy the FSKP blob.
cp $PDK_TOP/drive-foundation/firmware/bin/t234/fskpboot/blob_fskp_updated_aligned_sigheader_encrypt.signed ${PDK_TOP}/p3710-10-a04-headers