Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=@GNU/grub
  14. PKG_HASH:=810b3798d316394f94096ec2797909dbf23c858e48f7b3830826b8daa06b7b0f
  15. PKG_FIXUP:=autoreconf
  16. HOST_BUILD_PARALLEL:=1
  17. PKG_BUILD_DEPENDS:=grub2/host
  18. PKG_SSP:=0
  19. PKG_FLAGS:=nonshared
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/grub2
  23. CATEGORY:=Boot Loaders
  24. SECTION:=boot
  25. TITLE:=GRand Unified Bootloader
  26. URL:=http://www.gnu.org/software/grub/
  27. DEPENDS:=@TARGET_x86||TARGET_x86_64
  28. endef
  29. define Package/grub2-editenv
  30. CATEGORY:=Utilities
  31. SECTION:=utils
  32. SUBMENU:=Boot Loaders
  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. HOST_BUILD_PREFIX := $(STAGING_DIR_HOST)
  41. CONFIGURE_VARS += \
  42. grub_build_mkfont_excuse="don't want fonts"
  43. CONFIGURE_ARGS += \
  44. --target=$(REAL_GNU_TARGET_NAME) \
  45. --disable-werror \
  46. --disable-nls \
  47. --disable-device-mapper \
  48. --disable-libzfs \
  49. --disable-grub-mkfont
  50. HOST_CONFIGURE_VARS += \
  51. grub_build_mkfont_excuse="don't want fonts"
  52. HOST_CONFIGURE_ARGS += \
  53. --disable-grub-mkfont \
  54. --target=$(REAL_GNU_TARGET_NAME) \
  55. --sbindir="$(STAGING_DIR_HOST)/bin" \
  56. --disable-werror \
  57. --disable-libzfs \
  58. --disable-nls
  59. HOST_MAKE_FLAGS += \
  60. TARGET_RANLIB=$(TARGET_RANLIB) \
  61. LIBLZMA=$(STAGING_DIR_HOST)/lib/liblzma.a
  62. define Host/Configure
  63. $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
  64. $(Host/Configure/Default)
  65. endef
  66. define Package/grub2-editenv/install
  67. $(INSTALL_DIR) $(1)/usr/sbin
  68. $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
  69. endef
  70. $(eval $(call HostBuild))
  71. $(eval $(call BuildPackage,grub2))
  72. $(eval $(call BuildPackage,grub2-editenv))