mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 17:11:34 +02:00
Copy recovery kernel to syslinux path only on x86.
This is intended to fix a build error seen on ARM platforms where the path "$esp_mnt/syslinux" does not exist. Change-Id: I0b9e2d1fae376a7137d7e196901fbea4f2e796bc BUG=http://code.google.com/p/chromium-os/issues/detail?id=9713 TEST=Not tested. Review URL: http://codereview.chromium.org/5404001
This commit is contained in:
parent
adcb314d9f
commit
6edcc4d952
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user