6cea1e2b00b7f4b72c48fa44ada2e0a7976acacf
[openwrt/staging/wigyori.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.10
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:=a076a044b64371edc52f7e562b13f6b2
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_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
59 endif
60 ifneq ($(CONFIG_TARGET_cns3xxx),)
61 $(INSTALL_DIR) $(1)/etc/uci-defaults
62 $(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
63 endif
64 ifneq ($(CONFIG_TARGET_imx6),)
65 $(INSTALL_DIR) $(1)/etc/uci-defaults
66 $(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
67 endif
68 ifneq ($(CONFIG_TARGET_kirkwood),)
69 $(INSTALL_DIR) $(1)/etc/uci-defaults
70 $(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
71 endif
72 ifneq ($(CONFIG_TARGET_lantiq),)
73 $(INSTALL_DIR) $(1)/etc/uci-defaults
74 $(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
75 endif
76 ifneq ($(CONFIG_TARGET_ramips),)
77 $(INSTALL_DIR) $(1)/etc/uci-defaults
78 $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
79 endif
80 endef
81
82 $(eval $(call BuildPackage,uboot-envtools))