From afb07f4967e891f2b4e28e3415e4a6858a096a35 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 10 Sep 2015 16:29:34 -0400 Subject: image_signing: do not delete output when signing loem firmware Rather than use the existence of the output as a marker for running the gbb step, key off the loem index. We want to run it the first time and not bother after that. BUG=chrome-os-partner:44227 BRANCH=None TEST=signer can still sign loem keysets Change-Id: I26e9ccaf1333f769d6993a8e0d84c63644bb2597 Reviewed-on: https://chromium-review.googlesource.com/298980 Reviewed-by: David Riley Tested-by: Mike Frysinger --- scripts/image_signing/sign_firmware.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/image_signing/sign_firmware.sh b/scripts/image_signing/sign_firmware.sh index 45d739f9..94614ba6 100755 --- a/scripts/image_signing/sign_firmware.sh +++ b/scripts/image_signing/sign_firmware.sh @@ -71,7 +71,6 @@ sign_loems() { local line loem_section=false loem_index loemid local rootkey - rm -f "${out_firmware}" while read line; do # Find the [loem] section. if ! ${loem_section}; then @@ -95,7 +94,7 @@ sign_loems() { rootkey="${key_dir}/root_key.loem${loem_index}.vbpubk" cp "${rootkey}" "${loem_output_dir}/rootkey.${loemid}" - if [[ ! -e ${out_firmware} ]]; then + if [[ ${loem_index} == "1" ]]; then gbb_update "${temp_fw}" "${key_dir}" "${out_firmware}" "${rootkey}" fi echo -- cgit v1.2.1