u-boot: prefer mirror2.openwrt.org over ftp.denx.de - the denx ftp is slow and unreliable
[openwrt/staging/lynxis/omap.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:= \
17 http://mirror2.openwrt.org/sources \
18 ftp://ftp.denx.de/pub/u-boot
19
20 PKG_MD5SUM:=a076a044b64371edc52f7e562b13f6b2
21
22 PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/uboot-envtools
27 SECTION:=utils
28 CATEGORY:=Utilities
29 TITLE:=read/modify U-Boot bootloader environment
30 URL:=http://www.denx.de/wiki/U-Boot
31 endef
32
33 define Package/uboot-envtools/description
34 This package includes tools to read and modify U-Boot bootloader environment.
35 endef
36
37 define Build/Configure
38 endef
39
40 define Build/Compile
41 touch $(PKG_BUILD_DIR)/include/config.h
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 HOSTCC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gcc" \
44 HOSTSTRIP="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip" \
45 env
46 endef
47
48 define Package/uboot-envtools/conffiles
49 /etc/config/ubootenv
50 /etc/fw_env.config
51 endef
52
53 define Package/uboot-envtools/install
54 $(INSTALL_DIR) $(1)/usr/sbin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
56 ln -s fw_printenv $(1)/usr/sbin/fw_setenv
57 $(INSTALL_DIR) $(1)/lib
58 $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
59 ifneq ($(CONFIG_TARGET_ar71xx),)
60 $(INSTALL_DIR) $(1)/etc/uci-defaults
61 $(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
62 endif
63 ifneq ($(CONFIG_TARGET_cns3xxx),)
64 $(INSTALL_DIR) $(1)/etc/uci-defaults
65 $(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
66 endif
67 ifneq ($(CONFIG_TARGET_imx6),)
68 $(INSTALL_DIR) $(1)/etc/uci-defaults
69 $(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
70 endif
71 ifneq ($(CONFIG_TARGET_kirkwood),)
72 $(INSTALL_DIR) $(1)/etc/uci-defaults
73 $(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
74 endif
75 ifneq ($(CONFIG_TARGET_lantiq),)
76 $(INSTALL_DIR) $(1)/etc/uci-defaults
77 $(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
78 endif
79 ifneq ($(CONFIG_TARGET_ramips),)
80 $(INSTALL_DIR) $(1)/etc/uci-defaults
81 $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
82 endif
83 endef
84
85 $(eval $(call BuildPackage,uboot-envtools))