aboutsummaryrefslogtreecommitdiffstats
path: root/package/boot/grub2
diff options
context:
space:
mode:
authorPaul Spooren <mail@aparcar.org>2020-03-20 00:10:54 -1000
committerDaniel Golle <daniel@makrotopia.org>2020-03-21 10:36:00 +0000
commit5a5df62d95f52892c9a24fe1216796a2a903e544 (patch)
tree14cdfab3e4fb023d23e58f352f542a86b551a216 /package/boot/grub2
parente6e1e12dc3230bdadf74485dbf47beb52570920c (diff)
downloadupstream-5a5df62d95f52892c9a24fe1216796a2a903e544.tar.gz
upstream-5a5df62d95f52892c9a24fe1216796a2a903e544.tar.bz2
upstream-5a5df62d95f52892c9a24fe1216796a2a903e544.zip
x86/grub2: move grub2 image creation to package
Let the grub2 package take care of creating installable grub2 images, this will allow creating grub2 images without first calling x86 image generation recipe. Also as side effect, since those images are now shared, it'll reduce the number of calling grub-mkimage. Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl> [rebase, adjusted commit title] Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'package/boot/grub2')
-rw-r--r--package/boot/grub2/Makefile31
-rw-r--r--package/boot/grub2/files/grub-early.cfg1
2 files changed, 32 insertions, 0 deletions
diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index b26ef64ca4..980a6e372a 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -82,6 +82,37 @@ define Host/Configure
$(Host/Configure/Default)
endef
+define Host/Install
+ $(call Host/Install/Default)
+
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/grub/grub2-generic
+ $(STAGING_DIR_HOST)/bin/grub-mkimage \
+ -d $(STAGING_DIR_HOST)/lib/grub/i386-pc \
+ -p /boot/grub \
+ -O i386-pc \
+ -c ./files/grub-early.cfg \
+ -o $(STAGING_DIR_HOST)/lib/grub/grub2-generic/core.img \
+ at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
+
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/grub/grub2-iso
+ $(STAGING_DIR_HOST)/bin/grub-mkimage \
+ -d $(STAGING_DIR_HOST)/lib/grub/i386-pc \
+ -p /boot/grub \
+ -O i386-pc \
+ -c ./files/grub-early.cfg \
+ -o $(STAGING_DIR_HOST)/lib/grub/grub2-iso/eltorito.img \
+ at_keyboard biosdisk boot chain configfile iso9660 linux ls part_msdos reboot serial vga
+
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/grub/grub2-legacy
+ $(STAGING_DIR_HOST)/bin/grub-mkimage \
+ -d $(STAGING_DIR_HOST)/lib/grub/i386-pc \
+ -p /boot/grub \
+ -O i386-pc \
+ -c ./files/grub-early.cfg \
+ -o $(STAGING_DIR_HOST)/lib/grub/grub2-legacy/core.img \
+ biosdisk boot chain configfile ext2 linux ls part_msdos reboot serial vga
+endef
+
define Package/grub2/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-bios-setup $(1)/usr/sbin/
diff --git a/package/boot/grub2/files/grub-early.cfg b/package/boot/grub2/files/grub-early.cfg
new file mode 100644
index 0000000000..4a5b5a6092
--- /dev/null
+++ b/package/boot/grub2/files/grub-early.cfg
@@ -0,0 +1 @@
+configfile (hd0,msdos1)/boot/grub/grub.cfg