]> git.plutz.net Git - bootimage/blobdiff - Makefile
Merge branch 'master' into uefi
[bootimage] / Makefile
index ff9b317d2b747b76c4dd5b8776c6c9c5103cfb89..1e5afbb8cfc09eb53a88ee648f7da08a31d7a6e8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ GROUPS := sudo
 ARCH := amd64
 CONFIG := config_base/
 
-PACKAGES := apt bilibop-lockfs btrfs-tools busybox-static bzip2 ca-certificates cron deborphan gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less live-boot live-boot-initramfs-tools make man-db nbd-client net-tools nmap ntpdate openssh-client openssh-server p7zip-full pciutils rsync squashfs-tools sshfs sudo syslinux syslinux-common syslinux-efi systemd unace unrar-free unzip vim wget wireless-tools wpasupplicant xz-utils zip
+PACKAGES := apt bilibop-lockfs btrfs-tools busybox-static bzip2 ca-certificates cron deborphan efibootmgr firmware-linux-free gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less live-boot live-boot-initramfs-tools make man-db nbd-client net-tools nmap ntpdate openssh-client openssh-server p7zip-full pciutils rsync squashfs-tools sshfs sudo syslinux syslinux-common syslinux-efi systemd unace unrar-free unzip vim wget wireless-tools wpasupplicant xz-utils zip
 
 include *.mk
 
@@ -48,6 +48,12 @@ stretch_%.squashfs: stretch_%_config/
        rm "$@" || true
        mksquashfs "$<" "$@" -comp xz
 
+vmlinuz: stretch_*_root/
+       ln -s '$<$@' ./
+
+initrd.img: stretch_*_root/
+       ln -s '$<$@' ./
+
 /dev/sd%: partitions .FORCE
        sfdisk ${@} <partitions
        dd of=${@} if=/usr/lib/syslinux/mbr/gptmbr.bin
@@ -57,8 +63,12 @@ stretch_%.squashfs: stretch_%_config/
        mkfs.vfat -n SQUASHBOOT ${@}
        syslinux -i ${@}
        mount -t vfat ${@} mount
-       cp -L vmlinuz initrd.img *.squashfs syslinux.cfg Makefile partitions mount/
+       mkdir -p mount/EFI/BOOT
+       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/
        umount mount/
        sync