Makefile 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. #
  2. # Copyright (C) 2006-2013 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:=2013.10
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:= \
  14. http://mirror2.openwrt.org/sources \
  15. ftp://ftp.denx.de/pub/u-boot
  16. PKG_MD5SUM:=a076a044b64371edc52f7e562b13f6b2
  17. PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/uboot-envtools
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. TITLE:=read/modify U-Boot bootloader environment
  23. URL:=http://www.denx.de/wiki/U-Boot
  24. endef
  25. define Package/uboot-envtools/description
  26. This package includes tools to read and modify U-Boot bootloader environment.
  27. endef
  28. define Build/Configure
  29. endef
  30. define Build/Compile
  31. touch $(PKG_BUILD_DIR)/include/config.h
  32. $(MAKE) -C $(PKG_BUILD_DIR) \
  33. HOSTCC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gcc" \
  34. HOSTSTRIP="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip" \
  35. env
  36. endef
  37. define Package/uboot-envtools/conffiles
  38. /etc/config/ubootenv
  39. /etc/fw_env.config
  40. endef
  41. define Package/uboot-envtools/install
  42. $(INSTALL_DIR) $(1)/usr/sbin
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
  44. ln -s fw_printenv $(1)/usr/sbin/fw_setenv
  45. $(INSTALL_DIR) $(1)/lib
  46. $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
  47. ifneq ($(CONFIG_TARGET_ar71xx),)
  48. $(INSTALL_DIR) $(1)/etc/uci-defaults
  49. $(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
  50. endif
  51. ifneq ($(CONFIG_TARGET_cns3xxx),)
  52. $(INSTALL_DIR) $(1)/etc/uci-defaults
  53. $(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
  54. endif
  55. ifneq ($(CONFIG_TARGET_imx6),)
  56. $(INSTALL_DIR) $(1)/etc/uci-defaults
  57. $(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
  58. endif
  59. ifneq ($(CONFIG_TARGET_kirkwood),)
  60. $(INSTALL_DIR) $(1)/etc/uci-defaults
  61. $(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
  62. endif
  63. ifneq ($(CONFIG_TARGET_lantiq),)
  64. $(INSTALL_DIR) $(1)/etc/uci-defaults
  65. $(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
  66. endif
  67. ifneq ($(CONFIG_TARGET_mxs),)
  68. $(INSTALL_DIR) $(1)/etc/uci-defaults
  69. $(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
  70. endif
  71. ifneq ($(CONFIG_TARGET_ramips),)
  72. $(INSTALL_DIR) $(1)/etc/uci-defaults
  73. $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
  74. endif
  75. endef
  76. $(eval $(call BuildPackage,uboot-envtools))