diff options
Diffstat (limited to 'scripts/image_signing/sign_nv_cbootimage.sh')
-rwxr-xr-x | scripts/image_signing/sign_nv_cbootimage.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/image_signing/sign_nv_cbootimage.sh b/scripts/image_signing/sign_nv_cbootimage.sh index 890ca6a9..71be794d 100755 --- a/scripts/image_signing/sign_nv_cbootimage.sh +++ b/scripts/image_signing/sign_nv_cbootimage.sh @@ -21,6 +21,7 @@ Usage: $0 <type> <pkc_key> <firmware_image> <soc> Signs <firmware_image> of <type> with <pkc_key> using cbootimage for <soc>. where type is one of bootloader = sign bootloader image + lp0_firmware = sign lp0 firmware EOF exit 1 } @@ -58,6 +59,20 @@ EOF mv "${work_dir}/pubkey.sha" "${firmware_image}.pubkey.sha" mv "${signed_fw}" "${firmware_image}" + elif [[ "${type}" == "lp0_firmware" ]]; then + + pushd "${work_dir}" >/dev/null + + cat >update.cfg <<EOF +PkcKey = ${pkc_key}; +RsaSign = 0x220,, 288, 16, Complete; +EOF + + cbootimage --sign update.cfg "${firmware_image}" "${signed_fw}" + + popd >/dev/null + mv "${signed_fw}" "${firmware_image}" + else usage fi |