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

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: change == to = in a string comparison 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..2d6e03151bdf6ce821aa684e8553a2b513ae38f1 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
+ # 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