Makefile 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Copyright (C) 2006-2014 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. PKG_NAME:=uboot-envtools
  9. PKG_DISTNAME:=u-boot
  10. PKG_VERSION:=2024.07
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:= \
  14. https://ftp.denx.de/pub/u-boot \
  15. https://mirror.cyberbits.eu/u-boot \
  16. ftp://ftp.denx.de/pub/u-boot
  17. PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f
  18. PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
  20. PKG_BUILD_DEPENDS:=fstools
  21. PKG_LICENSE:=GPL-2.0 GPL-2.0+
  22. PKG_LICENSE_FILES:=Licenses/README
  23. PKG_FLAGS:=nonshared
  24. PKG_BUILD_PARALLEL:=1
  25. include $(INCLUDE_DIR)/package.mk
  26. define Package/uboot-envtools
  27. SECTION:=utils
  28. CATEGORY:=Utilities
  29. SUBMENU:=Boot Loaders
  30. TITLE:=read/modify U-Boot bootloader environment
  31. URL:=http://www.denx.de/wiki/U-Boot
  32. endef
  33. define Package/uboot-envtools/description
  34. This package includes tools to read and modify U-Boot bootloader environment.
  35. endef
  36. define Build/Configure
  37. $(call Build/Compile/Default,tools-only_defconfig)
  38. endef
  39. define Build/Compile
  40. $(call Build/Compile/Default,envtools)
  41. endef
  42. # We need to override the ARCH passed by buildsystem as otherwise the defconfig
  43. # for tools-only wont match and the includes for sandbox will be dropped
  44. MAKE_FLAGS += \
  45. ARCH="sandbox" \
  46. TARGET_CFLAGS="$(TARGET_CFLAGS)" \
  47. TARGET_LDFLAGS="$(TARGET_LDFLAGS)"
  48. define Package/uboot-envtools/conffiles
  49. /etc/config/ubootenv
  50. /etc/fw_env.config
  51. /etc/fw_sys.config
  52. endef
  53. define Package/uboot-envtools/install
  54. $(INSTALL_DIR) $(1)/usr/sbin
  55. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
  56. $(LN) fw_printenv $(1)/usr/sbin/fw_setenv
  57. $(INSTALL_BIN) ./files/fw_printsys $(1)/usr/sbin
  58. $(INSTALL_BIN) ./files/fw_setsys $(1)/usr/sbin
  59. $(INSTALL_BIN) ./files/fw_loadenv $(1)/usr/sbin
  60. $(INSTALL_DIR) $(1)/etc/board.d
  61. $(INSTALL_DATA) ./files/fw_defaults $(1)/etc/board.d/05_fw_defaults
  62. $(INSTALL_DIR) $(1)/lib
  63. $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
  64. $(INSTALL_DIR) $(1)/etc/uci-defaults
  65. $(if $(wildcard ./files/$(BOARD)_$(SUBTARGET)), \
  66. $(INSTALL_DATA) ./files/$(BOARD)_$(SUBTARGET) \
  67. $(1)/etc/uci-defaults/30_uboot-envtools, \
  68. $(if $(wildcard ./files/$(BOARD)), \
  69. $(INSTALL_DATA) ./files/$(BOARD) \
  70. $(1)/etc/uci-defaults/30_uboot-envtools \
  71. ) \
  72. )
  73. endef
  74. $(eval $(call BuildPackage,uboot-envtools))