0024-grub2-Add-sub-package-grub-editenv-for-target-installation.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From: blogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>
  2. Date: Tue, 7 May 2013 12:35:07 +0000
  3. Subject: grub2: Add sub package grub-editenv for target installation
  4. grub-editenv allows to modify grub2 environment files. Add a new package
  5. that build grub2 for the target and packs up grub-editenv.
  6. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
  7. diff --git a/package/grub2/Makefile b/package/grub2/Makefile
  8. index b606f54..dd490ff 100644
  9. --- a/package/grub2/Makefile
  10. +++ b/package/grub2/Makefile
  11. @@ -16,7 +16,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/grub
  13. PKG_MD5SUM:=e927540b6eda8b024fb0391eeaa4091c
  14. -PKG_HOST_ONLY:=1
  15. HOST_BUILD_PARALLEL:=1
  16. PKG_BUILD_DEPENDS:=grub2/host
  17. @@ -32,6 +31,23 @@ define Package/grub2
  18. DEPENDS:=@TARGET_x86
  19. endef
  20. +define Package/grub2-editenv
  21. + CATEGORY:=Utilities
  22. + SECTION:=utils
  23. + TITLE:=Grub2 Environment editor
  24. + URL:=http://www.gnu.org/software/grub/
  25. + DEPENDS:=@TARGET_x86
  26. +endef
  27. +
  28. +define Package/grub2-editenv/description
  29. + Edit grub2 environment files.
  30. +endef
  31. +
  32. +CONFIGURE_ARGS += \
  33. + --target=$(REAL_GNU_TARGET_NAME) \
  34. + --disable-werror \
  35. + --disable-nls
  36. +
  37. HOST_CONFIGURE_ARGS += \
  38. --target=$(REAL_GNU_TARGET_NAME) \
  39. --sbindir="$(STAGING_DIR_HOST)/bin" \
  40. @@ -47,5 +63,11 @@ define Host/Configure
  41. $(Host/Configure/Default)
  42. endef
  43. +define Package/grub2-editenv/install
  44. + $(INSTALL_DIR) $(1)/usr/sbin
  45. + $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
  46. +endef
  47. +
  48. $(eval $(call HostBuild))
  49. $(eval $(call BuildPackage,grub2))
  50. +$(eval $(call BuildPackage,grub2-editenv))