Root/package/uboot-envtools/Makefile

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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=uboot-envtools
11PKG_DISTNAME:=u-boot
12PKG_VERSION:=2011.06
13PKG_RELEASE:=4
14
15PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
17PKG_MD5SUM:=
18PKG_BUILD_DEPENDS:=zlib
19
20include $(INCLUDE_DIR)/package.mk
21
22TAR_OPTIONS+= --strip-components=3 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/tools/env
23
24define Package/uboot-envtools
25  SECTION:=utils
26  CATEGORY:=Utilities
27  TITLE:=read/modify U-Boot bootloader environment
28  URL:=http://www.denx.de/wiki/U-Boot
29endef
30
31define Package/uboot-envtools/description
32 This package includes tools to read and modify U-Boot bootloader environment.
33endef
34
35define Package/uboot-envtools/config
36        config PACKAGE_uboot-envtools_setenv_symlink
37                bool "create fw_setenv symlink"
38endef
39
40define Package/uboot-envtools/install
41    $(INSTALL_DIR) $(1)/usr/sbin
42    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin/
43ifneq ($(CONFIG_PACKAGE_uboot-envtools_setenv_symlink),)
44    ln -s fw_printenv $(1)/usr/sbin/fw_setenv
45endif
46    $(INSTALL_DIR) $(1)/etc/init.d
47    $(INSTALL_BIN) ./files/uboot-envtools.init $(1)/etc/init.d/uboot-envtools
48endef
49
50define Build/Prepare
51    mkdir -p $(PKG_BUILD_DIR)
52    tar xvjf $(DL_DIR)/$(PKG_SOURCE) --strip-components=2 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/lib/crc32.c
53    $(call Build/Prepare/Default)
54endef
55
56$(eval $(call BuildPackage,uboot-envtools))
57

Archive Download this file



interactive