diff --git a/bin/cros_make_image_bootable b/bin/cros_make_image_bootable index cc9f79a243..476021b58d 100755 --- a/bin/cros_make_image_bootable +++ b/bin/cros_make_image_bootable @@ -273,7 +273,7 @@ make_image_bootable() { esp_size=$((esp_size * 512)) # sectors to bytes local bootloader_to_flags="--to_offset=${esp_offset} --to_size=${esp_size}" - if [ "${FLAGS_arch}" = "x86" -o "${FLAGS_arch}" = "amd64" ]; then + if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then # Use the kernel partition to acquire configuration flags. kernel_part="--kernel_partition='${FLAGS_output_dir}/vmlinuz.image'" # Install syslinux on the EFI System Partition. diff --git a/build_kernel_image.sh b/build_kernel_image.sh index 8756b820a9..a22a73d5b3 100755 --- a/build_kernel_image.sh +++ b/build_kernel_image.sh @@ -148,7 +148,7 @@ EOF WORK="${WORK} ${FLAGS_working_dir}/boot.config" info "Emitted cross-platform boot params to ${FLAGS_working_dir}/boot.config" -if [ "${FLAGS_arch}" = "x86" -o "${FLAGS_arch}" = "amd64" ]; then +if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then # Legacy BIOS will use the kernel in the rootfs (via syslinux), as will # standard EFI BIOS (via grub, from the EFI System Partition). Chrome OS # BIOS will use a separate signed kernel partition, which we'll create now. diff --git a/build_library/build_gpt.sh b/build_library/build_gpt.sh index 60f42479ad..7c914e80d9 100755 --- a/build_library/build_gpt.sh +++ b/build_library/build_gpt.sh @@ -47,7 +47,7 @@ build_gpt() { local pmbr_img if [ "$ARCH" = "arm" ]; then pmbr_img=/dev/zero - elif [ "$ARCH" = "x86" -o "$ARCH" = "amd64" ]; then + elif [[ "$ARCH" = "x86" || "$ARCH" = "amd64" ]]; then pmbr_img=$(readlink -f /usr/share/syslinux/gptmbr.bin) else error "Unknown architecture: $ARCH" diff --git a/build_library/create_legacy_bootloader_templates.sh b/build_library/create_legacy_bootloader_templates.sh index 3b8ff39694..2614bb1cf7 100755 --- a/build_library/create_legacy_bootloader_templates.sh +++ b/build_library/create_legacy_bootloader_templates.sh @@ -55,7 +55,7 @@ verity_common="${verity_common} dm_verity.dev_wait=${dev_wait}" # Populate the x86 rootfs to support legacy and EFI bios config templates. # The templates are used by the installer to populate partition 12 with # the correct bootloader configuration. -if [ "${FLAGS_arch}" = "x86" -o "${FLAGS_arch}" = "amd64" ]; then +if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then # TODO: For some reason the /dev/disk/by-uuid is not being generated by udev # in the initramfs. When we figure that out, switch to root=UUID=${UUID}. sudo mkdir -p ${FLAGS_to} diff --git a/update_bootloaders.sh b/update_bootloaders.sh index 39a077fee9..27a5a8e0be 100755 --- a/update_bootloaders.sh +++ b/update_bootloaders.sh @@ -189,7 +189,7 @@ cleanup() { trap cleanup EXIT sudo mount "${ESP_DEV}" "${ESP_FS_DIR}" -if [ "${FLAGS_arch}" = "x86" -o "${FLAGS_arch}" = "amd64" ]; then +if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then # Populate the EFI bootloader configuration sudo mkdir -p "${ESP_FS_DIR}/efi/boot" sudo cp "${FLAGS_from}"/efi/boot/bootx64.efi \