summaryrefslogtreecommitdiffstats
path: root/config/binary_local-hooks
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2013-12-20 18:53:22 +0000
committerTails developers <amnesia@boum.org>2013-12-21 11:39:43 +0000
commitdb2196eadc6a5d22b76c87b4a313b7583a6e05e6 (patch)
tree9b68c161db5a62e6a60845463653f4601033e908 /config/binary_local-hooks
parent40af6bfc2e4f981759e9ae3e3d449a207619209e (diff)
Install the syslinux UEFI bootloader.
This requires to: 1. Copy files around for compatibility between live-build 2.x and syslinux 3:6.03~pre1+dfsg-1. Ugly, yes. 2. Install isolinux and syslinux-common explicitly, since it is the ones that ship isolinux.bin and the *.c32 modules in syslinux 6.x packaging, and are merely recommends.
Diffstat (limited to 'config/binary_local-hooks')
-rwxr-xr-xconfig/binary_local-hooks/99-syslinux_uefi38
1 files changed, 38 insertions, 0 deletions
diff --git a/config/binary_local-hooks/99-syslinux_uefi b/config/binary_local-hooks/99-syslinux_uefi
new file mode 100755
index 0000000..f489df7
--- /dev/null
+++ b/config/binary_local-hooks/99-syslinux_uefi
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+set -e
+
+# Including common functions
+. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
+
+# Setting static variables
+DESCRIPTION="$(Echo 'installing syslinux UEFI bootloader')"
+HELP=""
+USAGE="${PROGRAM}"
+
+# Reading configuration files
+Read_conffiles config/all config/bootstrap config/common config/binary
+Set_defaults
+
+# Safeguards
+[ "${LB_BOOTLOADER}" = "syslinux" ] || exit 0
+[ "${LB_ARCHITECTURE}" = "i386" ] || exit 0
+
+# Seems like we'll have work to do
+Echo_message "installing syslinux UEFI bootloader"
+
+# Setting boot method specific variables
+case "${LB_BINARY_IMAGES}" in
+ iso|iso-hybrid)
+ SYSLINUX_PATH="binary/isolinux"
+ ;;
+ usb-hdd)
+ SYSLINUX_PATH="binary/syslinux"
+ ;;
+esac
+
+# Main
+mkdir -p binary/EFI/BOOT
+cp chroot/usr/lib/SYSLINUX/efi64/syslinux.efi binary/EFI/BOOT/bootx64.efi
+cp "$SYSLINUX_PATH"/* binary/EFI/BOOT/
+cp -f chroot/usr/lib/syslinux/modules/efi64/* binary/EFI/BOOT/