Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(TOPDIR)/rules.mk
  4. PKG_NAME:= grub
  5. PKG_VERSION:= 2.00
  6. PKG_RELEASE:= 5
  7. PKG_MD5SUM:= a1043102fbc7bcedbf53e7ee3d17ab91
  8. PKG_DESCR:= GRUB2 bootloader
  9. PKG_SECTION:= boot
  10. PKG_BUILDDEP:= bison-host
  11. PKG_URL:= http://www.gnu.org/software/grub
  12. PKG_SITES:= ftp://ftp.gnu.org/gnu/grub/
  13. PKG_ARCH_DEPENDS:= x86 x86_64 mips
  14. PKG_NOPARALLEL:= 1
  15. PKG_SUBPKGS:= GRUB GRUB_TOOLS
  16. PKGSD_GRUB_TOOLS:= GRUB2 tools
  17. PKG_CHOICES_GRUB:= PC EFI
  18. PKGCD_PC:= build for PC BIOS
  19. PKGCD_EFI:= build for EFI
  20. include $(TOPDIR)/mk/package.mk
  21. $(eval $(call PKG_template,GRUB,grub,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  22. $(eval $(call PKG_template,GRUB_TOOLS,grub-tools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  23. # core.img is generated via
  24. # grub-mkimage -O ${GRUB_ARCH} -o core.img -c embed.cfg ${GRUB_MODULES}
  25. GRUB_MODULES:= ext2 part_msdos biosdisk
  26. ifeq ($(ADK_PACKAGE_GRUB_PC),y)
  27. GRUB_ARCH:= i386-pc
  28. CONFIGURE_ARGS+= --with-platform=pc
  29. endif
  30. ifeq ($(ADK_PACKAGE_GRUB_EFI),y)
  31. GRUB_ARCH:= x86_64-efi
  32. CONFIGURE_ARGS+= --with-platform=efi
  33. endif
  34. CONFIGURE_ARGS+= --disable-grub-mkfont \
  35. --enable-efiemu=no \
  36. --enable-device-mapper=no \
  37. --enable-libzfs=no \
  38. --disable-werror
  39. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  40. grub-install:
  41. ${INSTALL_DIR} $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}
  42. ${CP} ${WRKINST}/usr/lib/grub/${GRUB_ARCH}/*{mod,lst,img} \
  43. $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}/
  44. -${CP} ./files/core.img.${GRUB_ARCH} \
  45. $(IDIR_GRUB)/boot/grub/core.img
  46. grub-tools-install:
  47. ${INSTALL_DIR} $(IDIR_GRUB_TOOLS)/usr/{sbin,bin}
  48. ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-install \
  49. $(IDIR_GRUB_TOOLS)/usr/sbin
  50. ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-bios-setup \
  51. $(IDIR_GRUB_TOOLS)/usr/sbin
  52. ${INSTALL_BIN} ${WRKINST}/usr/bin/grub-mkimage \
  53. $(IDIR_GRUB_TOOLS)/usr/bin
  54. include ${TOPDIR}/mk/pkg-bottom.mk