Makefile 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/grub2
  23. SUBMENU:=Boot Loaders
  24. CATEGORY:=Utilities
  25. SECTION:=utils
  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. TITLE:=Grub2 Environment editor
  34. URL:=http://www.gnu.org/software/grub/
  35. DEPENDS:=@TARGET_x86||TARGET_x86_64
  36. endef
  37. define Package/grub2-editenv/description
  38. Edit grub2 environment files.
  39. endef
  40. CONFIGURE_ARGS += \
  41. --target=$(REAL_GNU_TARGET_NAME) \
  42. --disable-werror \
  43. --disable-nls \
  44. --disable-device-mapper \
  45. --disable-libzfs \
  46. --disable-grub-mkfont
  47. HOST_CONFIGURE_ARGS += \
  48. --target=$(REAL_GNU_TARGET_NAME) \
  49. --sbindir="$(STAGING_DIR_HOST)/bin" \
  50. --disable-werror \
  51. --disable-libzfs \
  52. --disable-nls
  53. HOST_MAKE_FLAGS += \
  54. TARGET_RANLIB=$(TARGET_RANLIB) \
  55. LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
  56. define Host/Configure
  57. $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
  58. $(Host/Configure/Default)
  59. endef
  60. define Package/grub2-editenv/install
  61. $(INSTALL_DIR) $(1)/usr/sbin
  62. $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
  63. endef
  64. $(eval $(call HostBuild))
  65. $(eval $(call BuildPackage,grub2))
  66. $(eval $(call BuildPackage,grub2-editenv))