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