mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 23:21:17 +02:00
fix up bootloader related scripts to treat amd64 like x86
BUG=chromium-os:21739 TEST=manually verify syslinux is being properly installed on amd64-generic Change-Id: I780fba2b9e90a8cf3922b48723f29d96eaf3931e Reviewed-on: http://gerrit.chromium.org/gerrit/10168 Reviewed-by: David James <davidjames@chromium.org> Reviewed-by: Vince Laviano <vlaviano@chromium.org> Commit-Ready: Sonny Rao <sonnyrao@chromium.org> Tested-by: Sonny Rao <sonnyrao@chromium.org>
This commit is contained in:
parent
e2e33f1b17
commit
1261bc5886
@ -77,7 +77,7 @@ DEFINE_string output_dir "/tmp" \
|
|||||||
DEFINE_string image "chromiumos_base.img" \
|
DEFINE_string image "chromiumos_base.img" \
|
||||||
"Full path to the chromiumos image to make bootable."
|
"Full path to the chromiumos image to make bootable."
|
||||||
DEFINE_string arch "x86" \
|
DEFINE_string arch "x86" \
|
||||||
"Architecture to make bootable for: arm or x86"
|
"Architecture to make bootable for: arm, x86, or amd64"
|
||||||
DEFINE_string usb_disk "/dev/sdb3" \
|
DEFINE_string usb_disk "/dev/sdb3" \
|
||||||
"Path syslinux should use to do a usb boot."
|
"Path syslinux should use to do a usb boot."
|
||||||
DEFINE_boolean cleanup_dirs ${FLAGS_TRUE} \
|
DEFINE_boolean cleanup_dirs ${FLAGS_TRUE} \
|
||||||
@ -273,7 +273,7 @@ make_image_bootable() {
|
|||||||
esp_size=$((esp_size * 512)) # sectors to bytes
|
esp_size=$((esp_size * 512)) # sectors to bytes
|
||||||
local bootloader_to_flags="--to_offset=${esp_offset} --to_size=${esp_size}"
|
local bootloader_to_flags="--to_offset=${esp_offset} --to_size=${esp_size}"
|
||||||
|
|
||||||
if [[ "${FLAGS_arch}" = "x86" ]]; then
|
if [ "${FLAGS_arch}" = "x86" -o "${FLAGS_arch}" = "amd64" ]; then
|
||||||
# Use the kernel partition to acquire configuration flags.
|
# Use the kernel partition to acquire configuration flags.
|
||||||
kernel_part="--kernel_partition='${FLAGS_output_dir}/vmlinuz.image'"
|
kernel_part="--kernel_partition='${FLAGS_output_dir}/vmlinuz.image'"
|
||||||
# Install syslinux on the EFI System Partition.
|
# Install syslinux on the EFI System Partition.
|
||||||
|
@ -189,7 +189,7 @@ cleanup() {
|
|||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
sudo mount "${ESP_DEV}" "${ESP_FS_DIR}"
|
sudo mount "${ESP_DEV}" "${ESP_FS_DIR}"
|
||||||
|
|
||||||
if [[ "${FLAGS_arch}" = "x86" ]]; then
|
if [ "${FLAGS_arch}" = "x86" -o "${FLAGS_arch}" = "amd64" ]; then
|
||||||
# Populate the EFI bootloader configuration
|
# Populate the EFI bootloader configuration
|
||||||
sudo mkdir -p "${ESP_FS_DIR}/efi/boot"
|
sudo mkdir -p "${ESP_FS_DIR}/efi/boot"
|
||||||
sudo cp "${FLAGS_from}"/efi/boot/bootx64.efi \
|
sudo cp "${FLAGS_from}"/efi/boot/bootx64.efi \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user