1
0

Makefile 3.4 KB

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