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 <rspangler@chromium.org>
Commit-Ready: Gaurav Shah <gauravsh@chromium.org>
Tested-by: Gaurav Shah <gauravsh@chromium.org>
This commit is contained in:
Gaurav Shah
2012-10-11 16:44:20 -07:00
committed by Gerrit
parent 212eb98136
commit 9bf0d535fe

View File

@@ -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"