From 9bf0d535fefabeb6d04f4c837d1101fb00db08fc Mon Sep 17 00:00:00 2001 From: Gaurav Shah Date: Thu, 11 Oct 2012 16:44:20 -0700 Subject: [PATCH] resign_firmwarefd.sh: Fix flag option name We didn't get bit by this bug because getlong_opt does partial matching on long option names. So --flag also works. BUG=none TEST=resign a test firmware; ensure preamble flag is preserved. BRANCH=none Change-Id: Ifd87c627b82468529fe1241be3629198d194027b Reviewed-on: https://gerrit.chromium.org/gerrit/35350 Reviewed-by: Randall Spangler Commit-Ready: Gaurav Shah Tested-by: Gaurav Shah --- scripts/image_signing/resign_firmwarefd.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/image_signing/resign_firmwarefd.sh b/scripts/image_signing/resign_firmwarefd.sh index 2dc261bca8..578d2826e7 100755 --- a/scripts/image_signing/resign_firmwarefd.sh +++ b/scripts/image_signing/resign_firmwarefd.sh @@ -68,7 +68,7 @@ DEV_FIRMWARE_DATAKEY=$5 DEV_FIRMWARE_KEYBLOCK=$6 KERNEL_SUBKEY=$7 VERSION=$8 -# This is the --flag in vbutil_firmware. It currently has only two values: +# This is the --flags in vbutil_firmware. It currently has only two values: # 0 for RW-NORMAL firmware, and 1 for RO-NORMAL firmware (search "two_stop # firmware" for more information). PREAMBLE_FLAG=$9 @@ -170,7 +170,7 @@ extract_firmware_image "B" "${temp_root_key}" \ echo "Determining preamble flag from existing firmware" if [ -n "$PREAMBLE_FLAG" ]; then - PREAMBLE_FLAG="--flag $PREAMBLE_FLAG" + PREAMBLE_FLAG="--flags $PREAMBLE_FLAG" else dd if="${SRC_FD}" of="${temp_out_vb}" skip="${fwA_vblock_offset}" bs=1 \ count="${fwA_vblock_size}" 2>/dev/null @@ -180,7 +180,7 @@ else --fv "${temp_fwimage_a}" | grep "Preamble flags:" | sed 's/.*: *//')" || flag="" - [ -z "$flag" ] || PREAMBLE_FLAG="--flag $flag" + [ -z "$flag" ] || PREAMBLE_FLAG="--flags $flag" fi echo "Using firmware preamble flag: $PREAMBLE_FLAG"