Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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:= multiboot boot loader
  9. PKG_SECTION:= base/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_SYSTEM_DEPENDS:= !mikrotik-rb532
  15. PKG_NOPARALLEL:= 1
  16. PKG_SUBPKGS:= GRUB GRUB_TOOLS
  17. PKGSD_GRUB_TOOLS:= grub2 tools
  18. PKG_CHOICES_GRUB:= PC EFI
  19. PKGCD_PC:= build for PC BIOS
  20. PKGCD_EFI:= build for EFI
  21. include $(TOPDIR)/mk/package.mk
  22. $(eval $(call PKG_template,GRUB,grub,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  23. $(eval $(call PKG_template,GRUB_TOOLS,grub-tools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  24. TARGET_CFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
  25. # core.img is generated via
  26. # grub-mkimage -O ${GRUB_ARCH} -o core.img -c embed.cfg ${GRUB_MODULES}
  27. GRUB_MODULES:= ext2 part_msdos biosdisk
  28. ifeq ($(ADK_PACKAGE_GRUB_PC),y)
  29. GRUB_ARCH:= i386-pc
  30. CONFIGURE_ARGS+= --with-platform=pc
  31. endif
  32. ifeq ($(ADK_PACKAGE_GRUB_EFI),y)
  33. GRUB_ARCH:= x86_64-efi
  34. CONFIGURE_ARGS+= --with-platform=efi
  35. endif
  36. CONFIGURE_ARGS+= --disable-grub-mkfont \
  37. --enable-efiemu=no \
  38. --enable-device-mapper=no \
  39. --enable-libzfs=no \
  40. --disable-werror
  41. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  42. grub-install:
  43. ${INSTALL_DIR} $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}
  44. ${CP} ${WRKINST}/usr/lib/grub/${GRUB_ARCH}/*{mod,lst,img} \
  45. $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}/
  46. -${CP} ./files/core.img.${GRUB_ARCH} \
  47. $(IDIR_GRUB)/boot/grub/core.img
  48. grub-tools-install:
  49. ${INSTALL_DIR} $(IDIR_GRUB_TOOLS)/usr/{sbin,bin}
  50. ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-install \
  51. $(IDIR_GRUB_TOOLS)/usr/sbin
  52. ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-bios-setup \
  53. $(IDIR_GRUB_TOOLS)/usr/sbin
  54. ${INSTALL_BIN} ${WRKINST}/usr/bin/grub-mkimage \
  55. $(IDIR_GRUB_TOOLS)/usr/bin
  56. include ${TOPDIR}/mk/pkg-bottom.mk