summaryrefslogtreecommitdiffstats
path: root/bootloader/Makefile
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-23 13:51:39 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-23 13:59:49 +0000
commit7b9df35b77128ae9f58a205738f795b3124e91f0 (patch)
tree631e394d78445e72ad8b4339aaadf55b55c0fdf9 /bootloader/Makefile
parentcc099d9e9bfbc8e7d0c766ababdbeee51cc3a055 (diff)
downloaddrakiso-7b9df35b77128ae9f58a205738f795b3124e91f0.tar
drakiso-7b9df35b77128ae9f58a205738f795b3124e91f0.tar.gz
drakiso-7b9df35b77128ae9f58a205738f795b3124e91f0.tar.bz2
drakiso-7b9df35b77128ae9f58a205738f795b3124e91f0.tar.xz
drakiso-7b9df35b77128ae9f58a205738f795b3124e91f0.zip
Update bootloader makefile to include grub2 images and themes.
Diffstat (limited to 'bootloader/Makefile')
-rw-r--r--bootloader/Makefile54
1 files changed, 52 insertions, 2 deletions
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