]> git.plutz.net Git - bootimage/commitdiff
EFI / BIOS dual configuration uefi
authorPaul Hänsch <paul@plutz.net>
Tue, 26 Jun 2018 21:09:08 +0000 (23:09 +0200)
committerPaul Hänsch <paul@plutz.net>
Tue, 26 Jun 2018 21:09:08 +0000 (23:09 +0200)
Makefile
bootmenu.cfg [new file with mode: 0644]
syslia32.cfg [new file with mode: 0644]
syslinux.cfg
syslx64.cfg [new file with mode: 0644]

index 1e5afbb8cfc09eb53a88ee648f7da08a31d7a6e8..493495c952fc0f63778d4b7e68d675295d28b346 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -49,26 +49,31 @@ stretch_%.squashfs: stretch_%_config/
        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
 
diff --git a/bootmenu.cfg b/bootmenu.cfg
new file mode 100644 (file)
index 0000000..3a53d93
--- /dev/null
@@ -0,0 +1,16 @@
+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
diff --git a/syslia32.cfg b/syslia32.cfg
new file mode 100644 (file)
index 0000000..84e692e
--- /dev/null
@@ -0,0 +1,3 @@
+PATH /efi32
+INCLUDE /bootmenu.cfg
+MENU TITLE Syslinux EFI-32
index 67486a4a93f9eaed588100985d9c762f81f53185..b6397a5b952dac28f92491920a09451a90daf3e4 100644 (file)
@@ -1,16 +1,3 @@
-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
diff --git a/syslx64.cfg b/syslx64.cfg
new file mode 100644 (file)
index 0000000..88f0ad3
--- /dev/null
@@ -0,0 +1,3 @@
+PATH /efi64
+INCLUDE /bootmenu.cfg
+MENU TITLE Syslinux EFI-64