Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=grub
  10. PKG_VERSION:=2.02~beta2
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=http://alpha.gnu.org/gnu/grub \
  14. http://gnualpha.uib.no/grub/ \
  15. http://mirrors.fe.up.pt/pub/gnu-alpha/grub/ \
  16. http://www.nic.funet.fi/pub/gnu/alpha/gnu/grub/
  17. PKG_MD5SUM:=be62932eade308a364ea4bbc91295930
  18. HOST_BUILD_PARALLEL:=1
  19. PKG_BUILD_DEPENDS:=grub2/host
  20. PKG_SSP:=0
  21. include $(INCLUDE_DIR)/host-build.mk
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/grub2
  24. CATEGORY:=Boot Loaders
  25. SECTION:=boot
  26. TITLE:=GRand Unified Bootloader
  27. URL:=http://www.gnu.org/software/grub/
  28. DEPENDS:=@TARGET_x86||TARGET_x86_64
  29. endef
  30. define Package/grub2-editenv
  31. CATEGORY:=Utilities
  32. SECTION:=utils
  33. SUBMENU:=Boot Loaders
  34. TITLE:=Grub2 Environment editor
  35. URL:=http://www.gnu.org/software/grub/
  36. DEPENDS:=@TARGET_x86||TARGET_x86_64
  37. endef
  38. define Package/grub2-editenv/description
  39. Edit grub2 environment files.
  40. endef
  41. HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
  42. CONFIGURE_ARGS += \
  43. --target=$(REAL_GNU_TARGET_NAME) \
  44. --disable-werror \
  45. --disable-nls \
  46. --disable-device-mapper \
  47. --disable-libzfs \
  48. --disable-grub-mkfont
  49. HOST_CONFIGURE_ARGS += \
  50. --target=$(REAL_GNU_TARGET_NAME) \
  51. --sbindir="$(STAGING_DIR_HOST)/bin" \
  52. --disable-werror \
  53. --disable-libzfs \
  54. --disable-nls
  55. HOST_MAKE_FLAGS += \
  56. TARGET_RANLIB=$(TARGET_RANLIB) \
  57. LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
  58. define Host/Configure
  59. $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
  60. $(Host/Configure/Default)
  61. endef
  62. define Package/grub2-editenv/install
  63. $(INSTALL_DIR) $(1)/usr/sbin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
  65. endef
  66. $(eval $(call HostBuild))
  67. $(eval $(call BuildPackage,grub2))
  68. $(eval $(call BuildPackage,grub2-editenv))