summaryrefslogtreecommitdiff
path: root/package/grub
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-04-13 22:14:31 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-04-13 22:14:31 +0200
commit599982c916530310b29f609f44d10cd5a6b381a4 (patch)
tree1061ebf96d9e210c48471ffff70a545d137b06d3 /package/grub
parent877be3fafdc3da53e53b5f426e81d9fff6a6e8f1 (diff)
add pregenerated core.img, there is no portable way to do it right now
Diffstat (limited to 'package/grub')
-rw-r--r--package/grub/Makefile26
-rw-r--r--package/grub/files/core.img.i386-pcbin0 -> 25564 bytes
2 files changed, 18 insertions, 8 deletions
diff --git a/package/grub/Makefile b/package/grub/Makefile
index 2f2deba4a..e52980ce4 100644
--- a/package/grub/Makefile
+++ b/package/grub/Makefile
@@ -5,9 +5,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:= grub
PKG_VERSION:= 2.00
-PKG_RELEASE:= 4
+PKG_RELEASE:= 5
PKG_MD5SUM:= e927540b6eda8b024fb0391eeaa4091c
-PKG_DESCR:= GRUB2 bootloader (source package)
+PKG_DESCR:= GRUB2 bootloader
PKG_SECTION:= boot
PKG_BUILDDEP:= bison-host qemu-host
PKG_URL:= http://www.gnu.org/software/grub
@@ -16,6 +16,8 @@ PKG_SITES:= ftp://ftp.gnu.org/gnu/grub/
PKG_ARCH_DEPENDS:= x86 x86_64 mips
PKG_NOPARALLEL:= 1
+PKG_SUBPKGS:= GRUB GRUB_TOOLS
+
PKG_CHOICES_GRUB:= PC EFI
PKGCD_PC:= build for PC BIOS
PKGCD_EFI:= build for EFI
@@ -23,7 +25,10 @@ PKGCD_EFI:= build for EFI
include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,GRUB,grub,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,GRUB_TOOLS,grub-tools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+# core.img is generated via
+# grub-mkimage -O ${GRUB_ARCH} -o core.img -c embed.cfg ${GRUB_MODULES}
GRUB_MODULES:= ext2 part_msdos biosdisk
ifeq ($(ADK_PACKAGE_GRUB_PC),y)
@@ -35,11 +40,8 @@ GRUB_ARCH:= x86_64-efi
CONFIGURE_ARGS+= --with-platform=efi
endif
-TARGET_CFLAGS+= -static
-TARGET_LDFLAGS+= -static
CONFIGURE_ARGS+= --disable-grub-mkfont \
--enable-efiemu=no \
- --enable-liblzma=no \
--enable-device-mapper=no \
--enable-libzfs=no \
--disable-werror
@@ -49,8 +51,16 @@ grub-install:
${INSTALL_DIR} $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}
${CP} ${WRKINST}/usr/lib/grub/${GRUB_ARCH}/*{mod,lst,img} \
$(IDIR_GRUB)/boot/grub/${GRUB_ARCH}/
- PATH='${HOST_PATH}' qemu-i386 ${WRKBUILD}/grub-mkimage \
- -o $(IDIR_GRUB)/boot/grub/core.img -O ${GRUB_ARCH} \
- -c ./files/embed.cfg ${GRUB_MODULES}
+ ${CP} ./files/core.img.${GRUB_ARCH} \
+ $(IDIR_GRUB)/boot/grub/core.img
+
+grub-tools-install:
+ ${INSTALL_DIR} $(IDIR_GRUB_TOOLS)/usr/{sbin,bin}
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-install \
+ $(IDIR_GRUB_TOOLS)/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-bios-setup \
+ $(IDIR_GRUB_TOOLS)/usr/sbin
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/grub-mkimage \
+ $(IDIR_GRUB_TOOLS)/usr/bin
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/grub/files/core.img.i386-pc b/package/grub/files/core.img.i386-pc
new file mode 100644
index 000000000..bd6fbac6f
--- /dev/null
+++ b/package/grub/files/core.img.i386-pc
Binary files differ