Chromium Code Reviews| 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 |