x86/grub2: move grub2 image creation to package
[openwrt/openwrt.git] / package / boot / grub2 / Makefile
index b26ef64ca41190b7b0325acae3ad289229d95502..980a6e372a315d80aa3e6b648bef39edba6b5990 100644 (file)
@@ -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/