Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Copyright (C) 2006-2012 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:=2012.04.01
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
  14. PKG_MD5SUM:=192bb231082d9159fb6e16de3039b6b2
  15. PKG_BUILD_DEPENDS:=zlib
  16. include $(INCLUDE_DIR)/package.mk
  17. TAR_OPTIONS+= --strip-components=3 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/tools/env
  18. define Package/uboot-envtools
  19. SECTION:=utils
  20. CATEGORY:=Utilities
  21. TITLE:=read/modify U-Boot bootloader environment
  22. URL:=http://www.denx.de/wiki/U-Boot
  23. endef
  24. define Package/uboot-envtools/description
  25. This package includes tools to read and modify U-Boot bootloader environment.
  26. endef
  27. define Build/Prepare
  28. mkdir -p $(PKG_BUILD_DIR)
  29. tar xvjf $(DL_DIR)/$(PKG_SOURCE) --strip-components=2 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/lib/crc32.c
  30. $(call Build/Prepare/Default)
  31. endef
  32. define Package/uboot-envtools/conffiles
  33. /etc/config/ubootenv
  34. /etc/fw_env.config
  35. endef
  36. define Package/uboot-envtools/install
  37. $(INSTALL_DIR) $(1)/usr/sbin
  38. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin
  39. ln -s fw_printenv $(1)/usr/sbin/fw_setenv
  40. $(INSTALL_DIR) $(1)/lib
  41. $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
  42. ifneq ($(CONFIG_TARGET_ar71xx),)
  43. $(INSTALL_DIR) $(1)/etc/uci-defaults
  44. $(INSTALL_BIN) ./files/ar71xx $(1)/etc/uci-defaults/uboot-envtools
  45. endif
  46. ifneq ($(CONFIG_TARGET_kirkwood),)
  47. $(INSTALL_DIR) $(1)/etc/uci-defaults
  48. $(INSTALL_BIN) ./files/kirkwood $(1)/etc/uci-defaults/uboot-envtools
  49. endif
  50. ifneq ($(CONFIG_TARGET_lantiq),)
  51. $(INSTALL_DIR) $(1)/etc/uci-defaults
  52. $(INSTALL_BIN) ./files/lantiq $(1)/etc/uci-defaults/uboot-envtools
  53. endif
  54. ifneq ($(CONFIG_TARGET_ramips),)
  55. $(INSTALL_DIR) $(1)/etc/uci-defaults
  56. $(INSTALL_BIN) ./files/ramips $(1)/etc/uci-defaults/uboot-envtools
  57. endif
  58. endef
  59. $(eval $(call BuildPackage,uboot-envtools))