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

Unified Diff: mod_image_for_recovery.sh

Issue 5404001: Copy recovery kernel to syslinux path only on x86. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: encase set +e and -e along with code that uses it Created 10 years, 1 month 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: mod_image_for_recovery.sh
diff --git a/mod_image_for_recovery.sh b/mod_image_for_recovery.sh
index e6cc8859a8cd1cc3afce56babea46a77e010d3a0..ae9a25a01192d9ffa4f29a59293633918dbb0d55 100755
--- a/mod_image_for_recovery.sh
+++ b/mod_image_for_recovery.sh
@@ -292,15 +292,20 @@ install_recovery_kernel() {
# Replace vmlinuz.A with the recovery version
local sysroot="${FLAGS_build_root}/${FLAGS_board}"
local vmlinuz="$sysroot/boot/vmlinuz"
- local esp_offset=$(partoffset "$RECOVERY_IMAGE" 12)
- local esp_mnt=$(mktemp -d)
- set +e
local failed=0
- sudo mount -o loop,offset=$((esp_offset * 512)) "$RECOVERY_IMAGE" "$esp_mnt"
- sudo cp "$vmlinuz" "$esp_mnt/syslinux/vmlinuz.A" || failed=1
- sudo umount -d "$esp_mnt"
- rmdir "$esp_mnt"
- set -e
+
+ if [ "$ARCH" == "x86" ]; then
Will Drewry 2010/11/29 23:37:16 I'm pretty sure this should be a single '='.
dhendrix 2010/11/29 23:51:37 Done. I always get confused here since bash allows
Will Drewry 2010/11/30 19:13:05 Yup - == should be fine, but = is the more cross-s
+ # There is no syslinux on ARM, so this copy only makes sense for x86.
+ set +e
+ local esp_offset=$(partoffset "$RECOVERY_IMAGE" 12)
+ local esp_mnt=$(mktemp -d)
+ sudo mount -o loop,offset=$((esp_offset * 512)) "$RECOVERY_IMAGE" "$esp_mnt"
+ sudo cp "$vmlinuz" "$esp_mnt/syslinux/vmlinuz.A" || failed=1
+ sudo umount -d "$esp_mnt"
+ rmdir "$esp_mnt"
+ set -e
+ fi
+
if [ $failed -eq 1 ]; then
echo "Failed to copy recovery kernel to ESP"
return 1
« 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