summaryrefslogtreecommitdiffstats
path: root/config/binary_local-hooks
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2013-12-21 13:32:28 +0000
committerTails developers <amnesia@boum.org>2013-12-21 13:44:40 +0000
commit504ee8535ee2ab0d8afcca62a22de7c46c6cd6f9 (patch)
tree36eb896173219c0371d975ad6734194f8bb11a24 /config/binary_local-hooks
parente30b74895a2daf4c55d89b04527056399494b717 (diff)
Install some COM32 syslinux modules into the syslinux directory.
Else, with syslinux 6.x, the boot fails with "ldlinux.c32 not found" and similar.
Diffstat (limited to 'config/binary_local-hooks')
-rwxr-xr-xconfig/binary_local-hooks/30-syslinux_fixup38
1 files changed, 38 insertions, 0 deletions
diff --git a/config/binary_local-hooks/30-syslinux_fixup b/config/binary_local-hooks/30-syslinux_fixup
new file mode 100755
index 0000000..c71bc88
--- /dev/null
+++ b/config/binary_local-hooks/30-syslinux_fixup
@@ -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 'fixing syslinux installation')"
+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 "fixing syslinux installation"
+
+# 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
+for module in ldlinux libcom32 libutil
+do
+ cp chroot/usr/lib/syslinux/modules/bios/"${module}.c32" "$SYSLINUX_PATH"
+done