Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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:=2014.10
  11. PKG_RELEASE:=2
  12. PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
  13. PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
  14. PKG_SOURCE_URL:=\
  15. http://mirror2.openwrt.org/sources \
  16. ftp://ftp.denx.de/pub/u-boot
  17. PKG_MD5SUM:=3ddcaee2f05b7c464778112ec83664b5
  18. PKG_BUILD_DEPENDS:=+fstools
  19. PKG_LICENSE:=GPL-2.0 GPL-2.0+
  20. PKG_LICENSE_FILES:=Licenses/README
  21. PKG_BUILD_PARALLEL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/uboot-envtools
  24. SECTION:=utils
  25. CATEGORY:=Utilities
  26. TITLE:=read/modify U-Boot bootloader environment
  27. URL:=http://www.denx.de/wiki/U-Boot
  28. endef
  29. define Package/uboot-envtools/description
  30. This package includes tools to read and modify U-Boot bootloader environment.
  31. endef
  32. define Package/uboot-envtools/config
  33. source "$(SOURCE)/Config.in"
  34. endef
  35. define Build/Configure
  36. touch $(PKG_BUILD_DIR)/include/config.mk
  37. touch $(PKG_BUILD_DIR)/include/config.h
  38. endef
  39. TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
  40. define Build/Compile
  41. $(MAKE) -C $(PKG_BUILD_DIR) \
  42. CROSS_COMPILE="$(TARGET_CROSS)" \
  43. TARGET_CFLAGS="$(TARGET_CFLAGS)" \
  44. UBI="$(CONFIG_UBOOT_ENVTOOLS_UBI)" \
  45. env
  46. endef
  47. define Package/uboot-envtools/conffiles
  48. /etc/config/ubootenv
  49. /etc/fw_env.config
  50. endef
  51. define Package/uboot-envtools/install
  52. $(INSTALL_DIR) $(1)/usr/sbin
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
  54. $(LN) fw_printenv $(1)/usr/sbin/fw_setenv
  55. $(INSTALL_DIR) $(1)/lib
  56. $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
  57. ifneq ($(CONFIG_TARGET_ar71xx),)
  58. $(INSTALL_DIR) $(1)/etc/uci-defaults
  59. $(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
  60. endif
  61. ifneq ($(CONFIG_TARGET_cns3xxx),)
  62. $(INSTALL_DIR) $(1)/etc/uci-defaults
  63. $(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
  64. endif
  65. ifneq ($(CONFIG_TARGET_imx6),)
  66. $(INSTALL_DIR) $(1)/etc/uci-defaults
  67. $(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
  68. endif
  69. ifneq ($(CONFIG_TARGET_kirkwood),)
  70. $(INSTALL_DIR) $(1)/etc/uci-defaults
  71. $(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
  72. endif
  73. ifneq ($(CONFIG_TARGET_lantiq),)
  74. $(INSTALL_DIR) $(1)/etc/uci-defaults
  75. $(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
  76. endif
  77. ifneq ($(CONFIG_TARGET_mvebu),)
  78. $(INSTALL_DIR) $(1)/etc/uci-defaults
  79. $(INSTALL_BIN) ./files/mvebu $(1)/etc/uci-defaults/30_uboot-envtools
  80. endif
  81. ifneq ($(CONFIG_TARGET_mxs),)
  82. $(INSTALL_DIR) $(1)/etc/uci-defaults
  83. $(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
  84. endif
  85. ifneq ($(CONFIG_TARGET_oxnas),)
  86. $(INSTALL_DIR) $(1)/etc/uci-defaults
  87. $(INSTALL_BIN) ./files/oxnas $(1)/etc/uci-defaults/30_uboot-envtools
  88. endif
  89. ifneq ($(CONFIG_TARGET_ramips),)
  90. $(INSTALL_DIR) $(1)/etc/uci-defaults
  91. $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
  92. endif
  93. endef
  94. $(eval $(call BuildPackage,uboot-envtools))