From 1807fa2978431352ccc1274ab60189e8709fe1b5 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 19 Nov 2013 21:42:28 -0800 Subject: [PATCH] cleanup(update_bootloaders.sh): Remove dead code. --- update_bootloaders.sh | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/update_bootloaders.sh b/update_bootloaders.sh index 184c0335e8..41092cfd7a 100755 --- a/update_bootloaders.sh +++ b/update_bootloaders.sh @@ -19,9 +19,6 @@ assert_inside_chroot # Flags. DEFINE_string arch "x86" \ "The boot architecture: arm or x86. (Default: x86)" -# TODO(wad) once extlinux is dead, we can remove this. -DEFINE_boolean install_syslinux ${FLAGS_TRUE} \ - "Controls whether syslinux is run on 'to'. (Default: true)" DEFINE_string from "/tmp/boot" \ "Path the legacy bootloader templates are copied from. (Default /tmp/boot)" DEFINE_string to "/tmp/esp.img" \ @@ -119,27 +116,12 @@ if [[ "${FLAGS_arch}" = "x86" || "${FLAGS_arch}" = "amd64" ]]; then sudo mkdir -p "${ESP_FS_DIR}"/EFI/boot sudo cp -f "${FLAGS_vmlinuz}" "${ESP_FS_DIR}"/EFI/boot/bootx64.efi - # Extract kernel flags - kernel_cfg="cros_debug" - old_root="%U+1" - - # Install the syslinux loader on the ESP image (part 12) so it is ready when - # we cut over from rootfs booting (extlinux). - if [[ ${FLAGS_install_syslinux} -eq ${FLAGS_TRUE} ]]; then - safe_umount "${ESP_FS_DIR}" - sudo syslinux -d /syslinux "${ESP_DEV}" - # mount again for cleanup to free resource gracefully - sudo mount -o ro "${ESP_DEV}" "${ESP_FS_DIR}" - fi -elif [[ "${FLAGS_arch}" = "arm" ]]; then - # Copy u-boot script to ESP partition - if [ -r "${FLAGS_from}/boot-A.scr.uimg" ]; then - sudo mkdir -p "${ESP_FS_DIR}/u-boot" - sudo cp "${FLAGS_from}/boot-A.scr.uimg" \ - "${ESP_FS_DIR}/u-boot/boot.scr.uimg" - sudo cp -f "${FLAGS_from}"/vmlinuz "${ESP_FS_DIR}"/vmlinuz.uimg.A - sudo cp -f "${FLAGS_from}"/zImage "${ESP_FS_DIR}"/vmlinuz.A - fi + safe_umount "${ESP_FS_DIR}" + sudo syslinux -d /syslinux "${ESP_DEV}" + # mount again for cleanup to free resource gracefully + sudo mount -o ro "${ESP_DEV}" "${ESP_FS_DIR}" +else + die "Unknown arch ${FLAGS_arch}" fi set +e