Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #
  2. # Copyright (C) 2006-2011 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:=2011.06
  11. PKG_RELEASE:=4
  12. PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
  14. PKG_MD5SUM:=
  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 Package/uboot-envtools/config
  28. config PACKAGE_uboot-envtools_setenv_symlink
  29. bool "create fw_setenv symlink"
  30. endef
  31. define Package/uboot-envtools/install
  32. $(INSTALL_DIR) $(1)/usr/sbin
  33. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin/
  34. ifneq ($(CONFIG_PACKAGE_uboot-envtools_setenv_symlink),)
  35. ln -s fw_printenv $(1)/usr/sbin/fw_setenv
  36. endif
  37. $(INSTALL_DIR) $(1)/etc/init.d
  38. $(INSTALL_BIN) ./files/uboot-envtools.init $(1)/etc/init.d/uboot-envtools
  39. endef
  40. define Build/Prepare
  41. mkdir -p $(PKG_BUILD_DIR)
  42. tar xvjf $(DL_DIR)/$(PKG_SOURCE) --strip-components=2 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/lib/crc32.c
  43. $(call Build/Prepare/Default)
  44. endef
  45. $(eval $(call BuildPackage,uboot-envtools))