mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
make_dev_firmware: provide more usage help for backup files
Provide more clear instruction on how to use the backup files, and to try more effort to store backup files BUG=none TEST=emerge-x86-generic vboot-reference; executed make_dev_firmware and got correct message Change-Id: I2062f45dd3019d0e56adc18bdd1861991aafe5ed Review URL: http://codereview.chromium.org/3785014
This commit is contained in:
@@ -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.
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user