diff options
author | Hung-Te Lin <hungte@chromium.org> | 2016-12-14 11:43:16 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-12-28 00:55:50 -0800 |
commit | d1408000508eb4d80e6d499da4530bb6251b3509 (patch) | |
tree | 366e0fd601b05a7ef4feef69cee6fe39a18addce /scripts | |
parent | 2a84553d44fb0274c9b7744217481bfc833dc5c2 (diff) | |
download | vboot-d1408000508eb4d80e6d499da4530bb6251b3509.tar.gz |
scripts: Add "-p host" to make_dev_firmware.sh.stabilize-9157.B
Always add "-p host" for flashrom to find right programmer.
BRANCH=None
BUG=chrome-os-partner:60894
TEST=./make_dev_firmware.sh
Change-Id: Iee66e143e77ea258a2a9ff3757d9446b7cf37dbc
Reviewed-on: https://chromium-review.googlesource.com/419860
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/image_signing/make_dev_firmware.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/scripts/image_signing/make_dev_firmware.sh b/scripts/image_signing/make_dev_firmware.sh index 45bf07ae..7d9fa414 100755 --- a/scripts/image_signing/make_dev_firmware.sh +++ b/scripts/image_signing/make_dev_firmware.sh @@ -40,6 +40,8 @@ eval set -- "$FLAGS_ARGV" # ---------------------------------------------------------------------------- set -e +FLASHROM="flashrom -p host" + # the image we are (temporary) working with IMAGE="$(make_temp_file)" IMAGE="$(readlink -f "$IMAGE")" @@ -60,7 +62,7 @@ disable_write_protection() { # --wp-disable command may return success even if WP is still enabled, # so we should use --wp-status to verify the results. echo "Disabling system software write protection status..." - (flashrom --wp-disable && flashrom --wp-status) 2>&1 | + (${FLASHROM} --wp-disable && ${FLASHROM} --wp-status) 2>&1 | tee "$EXEC_LOG" | grep -q '^WP: .* is disabled\.$' } @@ -70,9 +72,9 @@ read_image() { if [ -z "$FLAGS_from" ]; then echo "Reading system live firmware..." if is_debug_mode; then - flashrom -V -r "$IMAGE" + ${FLASHROM} -V -r "$IMAGE" else - flashrom -r "$IMAGE" >"$EXEC_LOG" 2>&1 + ${FLASHROM} -r "$IMAGE" >"$EXEC_LOG" 2>&1 fi else debug_msg "reading from file: $FLAGS_from" @@ -86,9 +88,9 @@ write_image() { echo "Writing system live firmware..." # TODO(hungte) we can enable partial write to make this faster if is_debug_mode; then - flashrom -V -w "$IMAGE" + ${FLASHROM} -w "$IMAGE" -V else - flashrom -w "$IMAGE" >"$EXEC_LOG" 2>&1 + ${FLASHROM} -w "$IMAGE" >"$EXEC_LOG" 2>&1 fi else debug_msg "writing to file: $FLAGS_to" @@ -329,8 +331,8 @@ main() { Please copy the backup file to a safe place ASAP. To stop using devkeys and restore original firmware, execute command: - flashrom -w [PATH_TO_BACKUP_IMAGE] - Ex: flashrom -w $backup_file_path + ${FLASHROM} -w [PATH_TO_BACKUP_IMAGE] + Ex: ${FLASHROM} -w $backup_file_path " else echo "WARNING: Cannot create file in $FLAGS_backup_dir... Ignore backups." |