From 7b9df35b77128ae9f58a205738f795b3124e91f0 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 23 Dec 2017 13:51:39 +0000 Subject: Update bootloader makefile to include grub2 images and themes. --- bootloader/Makefile | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) (limited to 'bootloader/Makefile') diff --git a/bootloader/Makefile b/bootloader/Makefile index 9994dae..e72fe74 100644 --- a/bootloader/Makefile +++ b/bootloader/Makefile @@ -1,14 +1,64 @@ -all: kbd-names.txt lang-kbds.txt po +MY_TARGETS = images kbd-names.txt lang-kbds.txt layouts maggy unicode.pf2 + +ARCH = $(shell uname -m) + +GRUB2_MODULES = iso9660 fat part_msdos all_video font png gfxterm gfxmenu \ + keylayouts at_keyboard usb_keyboard configfile echo gettext \ + linux linux16 ls search test + +GRUB_IMAGES = images/boot_hybrid.img images/eltorito.img + +ifeq ($(ARCH),x86_64) + GRUB_IMAGES += images/boot_x64.img +endif + +INSTALL_DIR = $(PREFIX)/usr/share/drakiso-bootloader + +all: $(MY_TARGETS) po + +images: $(GRUB_IMAGES) + +images/boot_hybrid.img: /usr/lib/grub/i386-pc/boot_hybrid.img + @mkdir -p images + cp $< $@ + +images/eltorito.img: + @mkdir -p images + grub2-mkimage --output $@ --prefix /boot/grub2 --format i386-pc-eltorito biosdisk $(GRUB2_MODULES) + +images/boot_x64.img: + @mkdir -p images + grub2-mkimage --output $@ --prefix /EFI/BOOT --format x86_64-efi $(GRUB2_MODULES) kbd-names%txt lang-kbds%txt: layouts make-kbd-info layouts: +maggy: /boot/grub2/themes/maggy + cp -rL $< $@ + .PHONY: po po: make-grub-po make-kbd-po kbd-names.txt make -C po +unicode.pf2: /usr/share/grub/unicode.pf2 + cp $< $@ + +install: all + mkdir -p $(INSTALL_DIR)/images + mkdir -p $(INSTALL_DIR)/layouts + mkdir -p $(INSTALL_DIR)/messages + mkdir -p $(INSTALL_DIR)/maggy + install -m 0644 *.txt *.pf2 $(INSTALL_DIR) + install -m 0644 images/* $(INSTALL_DIR)/images + install -m 0644 layouts/* $(INSTALL_DIR)/layouts + install -m 0644 maggy/* $(INSTALL_DIR)/maggy + install -m 0644 po/*.mo $(INSTALL_DIR)/messages + +uninstall: + rm -rf $(INSTALL_DIR) + clean: - rm -rf kbd-names.txt lang-kbds.txt layouts + rm -rf $(MY_TARGETS) make -C po clean -- cgit v1.2.1