diff options
author | Matt Housh <jaeger@crux.nu> | 2014-02-25 15:45:39 -0600 |
---|---|---|
committer | Matt Housh <jaeger@crux.nu> | 2014-02-25 15:45:39 -0600 |
commit | e5e7929ed6eb19b52bde08935f70ee6224e82100 (patch) | |
tree | 22f889498749574903c30ba3ed52be413c4b7b2b /Makefile | |
parent | 9b1d7bc9beaa6290fae8a3d03c28fdfa71d301db (diff) | |
download | iso-e5e7929ed6eb19b52bde08935f70ee6224e82100.tar.gz iso-e5e7929ed6eb19b52bde08935f70ee6224e82100.tar.xz |
Makefile: reorganize grub2-efi and EFI image builds
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 65 |
1 files changed, 35 insertions, 30 deletions
@@ -51,7 +51,8 @@ endif .PHONY: help check-root check-log $(COLLECTIONS) all all-chroot bootstrap \ initramfs kernel-clean syslinux-clean clean iso \ - busybox-clean initramfs-clean memtest-clean + busybox-clean initramfs-clean memtest-clean \ + grub2-efi grub2-efi-clean grub2-efi-distclean help: @echo "CRUX Makefile" @@ -152,34 +153,36 @@ syslinux-distclean: syslinux-clean # grub2-efi -iso/grub-$(GRUB2_VERSION).tar.xz: - cd iso && wget http://ftp.gnu.org/gnu/grub/grub-$(GRUB2_VERSION).tar.xz - -iso/grub-$(GRUB2_VERSION): iso/grub-$(GRUB2_VERSION).tar.xz - tar -C iso -xJmf iso/grub-$(GRUB2_VERSION).tar.xz - sed -i -e '/gets is a/d' iso/grub-$(GRUB2_VERSION)/grub-core/gnulib/stdio.in.h - -iso/grub-$(GRUB2_VERSION)/x86_64/grub2-x86_64.efi: iso/grub-$(GRUB2_VERSION) - (cd iso/grub-$(GRUB2_VERSION) && \ - mkdir x86_64 && \ - cd x86_64 && \ - CFLAGS="-Wno-error" ../configure --with-platform=efi --target=x86_64 && \ +iso/EFI/grub-$(GRUB2_VERSION).tar.xz: + cd iso/EFI && wget http://ftp.gnu.org/gnu/grub/grub-$(GRUB2_VERSION).tar.xz + +iso/EFI/grub2-build-x86_64/grub-$(GRUB2_VERSION): iso/EFI/grub-$(GRUB2_VERSION).tar.xz + mkdir iso/EFI/grub2-build-x86_64 + tar -C iso/EFI/grub2-build-x86_64 -xJmf iso/EFI/grub-$(GRUB2_VERSION).tar.xz + sed -i -e '/gets is a/d' iso/EFI/grub2-build-x86_64/grub-$(GRUB2_VERSION)/grub-core/gnulib/stdio.in.h + +iso/EFI/grub2-build-i386/grub-$(GRUB2_VERSION): iso/EFI/grub-$(GRUB2_VERSION).tar.xz + mkdir iso/EFI/grub2-build-i386 + tar -C iso/EFI/grub2-build-i386 -xJmf iso/EFI/grub-$(GRUB2_VERSION).tar.xz + sed -i -e '/gets is a/d' iso/EFI/grub2-build-i386/grub-$(GRUB2_VERSION)/grub-core/gnulib/stdio.in.h + +iso/EFI/grub2-x86_64.efi: iso/EFI/grub2-build-x86_64/grub-$(GRUB2_VERSION) + (cd iso/EFI/grub2-build-x86_64 && \ + CFLAGS="-Wno-error" ./grub-$(GRUB2_VERSION)/configure --with-platform=efi --target=x86_64 && \ make && \ cd grub-core && \ - ../grub-mkimage -c ../../../grub-early.cfg -d . -o ../grub2-x86_64.efi \ - -O x86_64-efi search search_fs_file normal configfile iso9660) - -iso/grub-$(GRUB2_VERSION)/i386/grub2-i386.efi: iso/grub-$(GRUB2_VERSION) - (cd iso/grub-$(GRUB2_VERSION) && \ - mkdir i386 && \ - cd i386 && \ - CFLAGS="-Wno-error" ../configure --with-platform=efi --target=i386 && \ + ../grub-mkimage -c ../../../grub-early.cfg -d . -o ../../grub2-x86_64.efi \ + -O x86_64-efi search search_fs_file normal configfile iso9660) + +iso/EFI/grub2-i386.efi: iso/EFI/grub2-build-i386/grub-$(GRUB2_VERSION) + (cd iso/EFI/grub2-build-i386 && \ + CFLAGS="-Wno-error" ./grub-$(GRUB2_VERSION)/configure --with-platform=efi --target=i386 && \ make && \ cd grub-core && \ - ../grub-mkimage -c ../../../grub-early.cfg -d . -o ../grub2-i386.efi \ - -O i386-efi search search_fs_file normal configfile iso9660) + ../grub-mkimage -c ../../../grub-early.cfg -d . -o ../../grub2-i386.efi \ + -O i386-efi search search_fs_file normal configfile iso9660) -grub2-efi: iso/grub-$(GRUB2_VERSION)/x86_64/grub2-x86_64.efi iso/grub-$(GRUB2_VERSION)/i386/grub2-i386.efi +grub2-efi: iso/EFI/grub2-x86_64.efi iso/EFI/grub2-i386.efi iso/efiboot.img: grub2-efi dd if=/dev/zero of=iso/efiboot.img bs=1M count=2 @@ -189,17 +192,19 @@ iso/efiboot.img: grub2-efi mkdir -pv iso/efiboot/EFI/boot \ iso/efiboot/boot/grub/x86_64-efi \ iso/efiboot/boot/grub/i386-efi - cp iso/grub-$(GRUB2_VERSION)/x86_64/grub2-x86_64.efi \ + cp iso/EFI/grub2-x86_64.efi \ iso/efiboot/EFI/boot/bootx64.efi - cp iso/grub-$(GRUB2_VERSION)/i386/grub2-i386.efi \ + cp iso/EFI/grub2-i386.efi \ iso/efiboot/EFI/boot/bootia32.efi umount iso/efiboot grub2-efi-clean: - rm -rf iso/grub-$(GRUB2_VERSION) iso/efiboot iso/efiboot.img + rm -rf iso/EFI/grub-$(GRUB2_VERSION) iso/EFI/grub2-build-* + rm -f iso/EFI/grub2-*.efi + rm -rf iso/efiboot iso/efiboot.img grub2-efi-distclean: grub2-efi-clean - rm -f iso/grub2-$(GRUB2_VERSION).tar.xz + rm -f iso/EFI/grub-$(GRUB2_VERSION).tar.xz @@ -438,8 +443,8 @@ iso: image-base memtest @cp iso/isolinux/memtest86+-$(MEMTEST_VERSION).bin $(IMG_ROOT_DIR)/boot/isolinux/memtest86plus @cp iso/efiboot.img $(IMG_ROOT_DIR)/boot/ @mkdir -p $(IMG_ROOT_DIR)/boot/grub/{x86_64,i386}-efi - @cp -a iso/grub-$(GRUB2_VERSION)/x86_64/grub-core/*.{mod,lst} $(IMG_ROOT_DIR)/boot/grub/x86_64-efi/ - @cp -a iso/grub-$(GRUB2_VERSION)/i386/grub-core/*.{mod,lst} $(IMG_ROOT_DIR)/boot/grub/i386-efi/ + @cp -a iso/EFI/grub2-build-x86_64/grub-core/*.{mod,lst} $(IMG_ROOT_DIR)/boot/grub/x86_64-efi/ + @cp -a iso/EFI/grub2-build-i386/grub-core/*.{mod,lst} $(IMG_ROOT_DIR)/boot/grub/i386-efi/ @cp iso/grub.cfg $(IMG_ROOT_DIR)/boot/grub/ @echo "- Creating ISO sort table" @echo "$(IMG_ROOT_DIR)/boot 100" > /tmp/iso.sort |