ramips: WN3000RPv3: do not setup switch
[oweals/openwrt.git] / package / boot / uboot-envtools / Makefile
1 #
2 # Copyright (C) 2006-2014 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:=2015.10
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=\
18         http://mirror2.openwrt.org/sources \
19         ftp://ftp.denx.de/pub/u-boot
20 PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
21
22 PKG_BUILD_DEPENDS:=+fstools
23
24 PKG_LICENSE:=GPL-2.0 GPL-2.0+
25 PKG_LICENSE_FILES:=Licenses/README
26
27 PKG_FLAGS:=nonshared
28
29 PKG_BUILD_PARALLEL:=1
30
31 include $(INCLUDE_DIR)/package.mk
32
33 define Package/uboot-envtools
34   SECTION:=utils
35   CATEGORY:=Utilities
36   SUBMENU:=Boot Loaders
37   TITLE:=read/modify U-Boot bootloader environment
38   URL:=http://www.denx.de/wiki/U-Boot
39 endef
40
41 define Package/uboot-envtools/description
42  This package includes tools to read and modify U-Boot bootloader environment.
43 endef
44
45 define Package/uboot-envtools/config
46         source "$(SOURCE)/Config.in"
47 endef
48
49 define Build/Configure
50         touch $(PKG_BUILD_DIR)/include/config.mk
51         touch $(PKG_BUILD_DIR)/include/config.h
52         mkdir -p $(PKG_BUILD_DIR)/include/generated
53         touch $(PKG_BUILD_DIR)/include/generated/autoconf.h
54 endef
55
56 TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
57
58 define Build/Compile
59         $(MAKE) -C $(PKG_BUILD_DIR) \
60                 CROSS_COMPILE="$(TARGET_CROSS)" \
61                 TARGET_CFLAGS="$(TARGET_CFLAGS)" \
62                 UBI="$(CONFIG_UBOOT_ENVTOOLS_UBI)" \
63                 dot-config=0 \
64                 HOSTLDFLAGS= \
65                 env
66 endef
67
68 define Package/uboot-envtools/conffiles
69 /etc/config/ubootenv
70 /etc/fw_env.config
71 endef
72
73 define Package/uboot-envtools/install
74         $(INSTALL_DIR) $(1)/usr/sbin
75         $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
76         $(LN) fw_printenv $(1)/usr/sbin/fw_setenv
77         $(INSTALL_DIR) $(1)/lib
78         $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
79 ifneq ($(CONFIG_TARGET_ar71xx),)
80         $(INSTALL_DIR) $(1)/etc/uci-defaults
81         $(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
82 endif
83 ifneq ($(CONFIG_TARGET_cns3xxx),)
84         $(INSTALL_DIR) $(1)/etc/uci-defaults
85         $(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
86 endif
87 ifneq ($(CONFIG_TARGET_imx6),)
88         $(INSTALL_DIR) $(1)/etc/uci-defaults
89         $(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
90 endif
91 ifneq ($(CONFIG_TARGET_ipq806x),)
92         $(INSTALL_DIR) $(1)/etc/uci-defaults
93         $(INSTALL_DATA) ./files/ipq $(1)/etc/uci-defaults/30_uboot-envtools
94 endif
95 ifneq ($(CONFIG_TARGET_kirkwood),)
96         $(INSTALL_DIR) $(1)/etc/uci-defaults
97         $(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
98 endif
99 ifneq ($(CONFIG_TARGET_lantiq),)
100         $(INSTALL_DIR) $(1)/etc/uci-defaults
101         $(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
102 endif
103 ifneq ($(CONFIG_TARGET_mvebu),)
104         $(INSTALL_DIR) $(1)/etc/uci-defaults
105         $(INSTALL_BIN) ./files/mvebu $(1)/etc/uci-defaults/30_uboot-envtools
106 endif
107 ifneq ($(CONFIG_TARGET_mxs),)
108         $(INSTALL_DIR) $(1)/etc/uci-defaults
109         $(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
110 endif
111 ifneq ($(CONFIG_TARGET_oxnas),)
112         $(INSTALL_DIR) $(1)/etc/uci-defaults
113         $(INSTALL_BIN) ./files/oxnas $(1)/etc/uci-defaults/30_uboot-envtools
114 endif
115 ifneq ($(CONFIG_TARGET_ramips),)
116         $(INSTALL_DIR) $(1)/etc/uci-defaults
117         $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
118 endif
119 endef
120
121 $(eval $(call BuildPackage,uboot-envtools))