Link to new tickets.
[tails-test.git] / config / binary_local-hooks / 99-syslinux_uefi
blob2d32c0c5122af609d0d19f5bb0ae4e6ef4f2af21
1 #!/bin/bash
3 set -e
5 # Including common functions
6 . "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
8 # Setting static variables
9 DESCRIPTION="$(Echo 'installing syslinux UEFI bootloader')"
10 HELP=""
11 USAGE="${PROGRAM}"
13 # Reading configuration files
14 Read_conffiles config/all config/bootstrap config/common config/binary
15 Set_defaults
17 # Safeguards
18 [ "${LB_BOOTLOADER}" = "syslinux" ] || exit 0
19 [ "${LB_ARCHITECTURE}" = "i386" ] || exit 0
21 # Seems like we'll have work to do
22 Echo_message "installing syslinux UEFI bootloader"
24 # Setting boot method specific variables
25 case "${LB_BINARY_IMAGES}" in
26 iso|iso-hybrid)
27 SYSLINUX_PATH="binary/isolinux"
29 usb-hdd)
30 SYSLINUX_PATH="binary/syslinux"
32 esac
34 # Main
35 mkdir -p binary/EFI/BOOT
36 cp chroot/usr/lib/SYSLINUX/efi64/syslinux.efi binary/EFI/BOOT/bootx64.efi
37 cp chroot/usr/share/tails/bootx64.png binary/EFI/BOOT/
38 cp "$SYSLINUX_PATH"/* binary/EFI/BOOT/
39 cp -f chroot/usr/lib/syslinux/modules/efi64/* binary/EFI/BOOT/
40 sed -r -i -e 's,^(menu background splash\.png)$,\#\1,' binary/EFI/BOOT/stdmenu.cfg