Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Unified Diff: scripts/image_signing/make_dev_firmware.sh

Issue 3785014: make_dev_firmware: provide more usage help for backup files (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/image_signing/make_dev_firmware.sh
diff --git a/scripts/image_signing/make_dev_firmware.sh b/scripts/image_signing/make_dev_firmware.sh
index b8bf6e9298fd117f2fcfce2bee7b909211d17657..f4e7d49d7052c013f91c1bbd371859119c7534ae 100755
--- a/scripts/image_signing/make_dev_firmware.sh
+++ b/scripts/image_signing/make_dev_firmware.sh
@@ -200,7 +200,24 @@ main() {
local backup_file_path="$FLAGS_backup_dir/$backup_file_name"
if mkdir -p "$FLAGS_backup_dir" &&
cp -f "$backup_image" "$backup_file_path"; then
- echo "Backup of current firmware image is stored in: $backup_file_path"
+ true
+ elif cp -f "$backup_image" "/tmp/$backup_file_name"; then
+ backup_file_path="/tmp/$backup_file_name"
+ else
+ backup_file_path=''
+ fi
+ if [ -n "$backup_file_path" -a -s "$backup_file_path" ]; then
+ # TODO(hungte) maybe we can wrap the flashrom by 'make_dev_firmware.sh -r'
+ # so that the only command to remember would be make_dev_firmware.sh.
Randall Spangler 2010/10/18 15:34:32 Good idea.
+ echo "
+ Backup of current firmware image is stored in:
+ $backup_file_path
+ 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
+ "
else
echo "WARNING: Cannot create file in $FLAGS_backup_dir... Ignore backups."
fi
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698