mksquashfs "$<" "$@" -comp xz
vmlinuz: stretch_*_root/
- ln -s '$<$@' ./
+ ln -fs '$<$@' ./
initrd.img: stretch_*_root/
- ln -s '$<$@' ./
+ ln -fs '$<$@' ./
/dev/sd%: partitions .FORCE
sfdisk ${@} <partitions
dd of=${@} if=/usr/lib/syslinux/mbr/gptmbr.bin
-/dev/sd%1: /dev/sd% vmlinuz initrd.img syslinux.cfg .FORCE
+/dev/sd%1: /dev/sd% vmlinuz initrd.img syslinux.cfg syslia32.cfg syslx64.cfg bootmenu.cfg .FORCE
mkdir -p mount
mkfs.vfat -n SQUASHBOOT ${@}
syslinux -i ${@}
mount -t vfat ${@} mount
- mkdir -p mount/EFI/BOOT
+ mkdir -p $(addprefix mount/, EFI/BOOT efi32 efi64 bios)
cp /usr/lib/SYSLINUX.EFI/efi32/syslinux.efi mount/EFI/BOOT/BOOTIA32.EFI
- cp $(addprefix /usr/lib/syslinux/modules/efi32/, ldlinux.e32 menu.c32 libutil.c32) mount/EFI/BOOT/
- cp -L vmlinuz initrd.img syslinux.cfg mount/EFI/BOOT/
- cp $(addprefix /usr/lib/syslinux/modules/bios/, menu.c32 libutil.c32) mount/
- cp -L vmlinuz initrd.img *.squashfs syslinux.cfg Makefile partitions mount/
+ cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi mount/EFI/BOOT/BOOTX64.EFI
+ cp $(addprefix /usr/lib/syslinux/modules/efi32/, ldlinux.e32 menu.c32 libutil.c32) mount/efi32/
+ cp $(addprefix /usr/lib/syslinux/modules/efi64/, ldlinux.e64 menu.c32 libutil.c32) mount/efi64/
+ cp $(addprefix /usr/lib/syslinux/modules/bios/, menu.c32 libutil.c32) mount/bios/
+ cp -L vmlinuz initrd.img *.squashfs Makefile partitions mount/
+ cp syslia32.cfg syslx64.cfg syslinux.cfg bootmenu.cfg mount/
+ # Temporary workaround, Uncomment for syslinux 6.04+
+ cp $(addprefix /usr/lib/syslinux/modules/, efi32/ldlinux.e32 efi64/ldlinux.e64) mount/EFI/BOOT/
+ cp syslx64.cfg mount/EFI/BOOT/syslinux.cfg
umount mount/
sync
-UI menu.c32
-
-DEFAULT stretch_squash
-TIMEOUT 30
-
-LABEL stretch_squash
- MENU LABEL Debian Stretch
- KERNEL vmlinuz
- INITRD initrd.img
- APPEND boot=live live-media-path=/ quiet
-
-LABEL stretch_rescue
- MENU LABEL Debian Stretch Rescue
- KERNEL vmlinuz
- INITRD initrd.img
- APPEND boot=live live-media-path=/ init=/bin/sh
+PATH bios
+INCLUDE bootmenu.cfg
+MENU TITLE Syslinux BIOS