Root/package/boot/uboot-envtools/Makefile

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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=uboot-envtools
11PKG_DISTNAME:=u-boot
12PKG_VERSION:=2012.04.01
13PKG_RELEASE:=1
14
15PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
16PKG_SOURCE_URL:=ftp://ftp.denx.de/pub/u-boot
17PKG_MD5SUM:=192bb231082d9159fb6e16de3039b6b2
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 Build/Prepare
36    mkdir -p $(PKG_BUILD_DIR)
37    tar xvjf $(DL_DIR)/$(PKG_SOURCE) --strip-components=2 -C $(PKG_BUILD_DIR) $(PKG_DISTNAME)-$(PKG_VERSION)/lib/crc32.c
38    $(call Build/Prepare/Default)
39endef
40
41define Package/uboot-envtools/conffiles
42/etc/config/ubootenv
43/etc/fw_env.config
44endef
45
46define Package/uboot-envtools/install
47    $(INSTALL_DIR) $(1)/usr/sbin
48    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fw_printenv $(1)/usr/sbin
49    ln -s fw_printenv $(1)/usr/sbin/fw_setenv
50    $(INSTALL_DIR) $(1)/lib
51    $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
52ifneq ($(CONFIG_TARGET_ar71xx),)
53    $(INSTALL_DIR) $(1)/etc/uci-defaults
54    $(INSTALL_BIN) ./files/ar71xx $(1)/etc/uci-defaults/uboot-envtools
55endif
56ifneq ($(CONFIG_TARGET_kirkwood),)
57    $(INSTALL_DIR) $(1)/etc/uci-defaults
58    $(INSTALL_BIN) ./files/kirkwood $(1)/etc/uci-defaults/uboot-envtools
59endif
60ifneq ($(CONFIG_TARGET_lantiq),)
61    $(INSTALL_DIR) $(1)/etc/uci-defaults
62    $(INSTALL_BIN) ./files/lantiq $(1)/etc/uci-defaults/uboot-envtools
63endif
64ifneq ($(CONFIG_TARGET_ramips),)
65    $(INSTALL_DIR) $(1)/etc/uci-defaults
66    $(INSTALL_BIN) ./files/ramips $(1)/etc/uci-defaults/uboot-envtools
67endif
68endef
69
70$(eval $(call BuildPackage,uboot-envtools))
71

Archive Download this file



interactive