ath79: do not build TP-Link tiny images by default
[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:=2020.04
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:= \
17     https://ftp.denx.de/pub/u-boot \
18     https://mirror.cyberbits.eu/u-boot \
19     ftp://ftp.denx.de/pub/u-boot
20 PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
21 PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
23
24 PKG_BUILD_DEPENDS:=fstools
25
26 PKG_LICENSE:=GPL-2.0 GPL-2.0+
27 PKG_LICENSE_FILES:=Licenses/README
28
29 PKG_FLAGS:=nonshared
30
31 PKG_BUILD_PARALLEL:=1
32
33 include $(INCLUDE_DIR)/package.mk
34
35 define Package/uboot-envtools
36   SECTION:=utils
37   CATEGORY:=Utilities
38   SUBMENU:=Boot Loaders
39   TITLE:=read/modify U-Boot bootloader environment
40   URL:=http://www.denx.de/wiki/U-Boot
41 endef
42
43 define Package/uboot-envtools/description
44  This package includes tools to read and modify U-Boot bootloader environment.
45 endef
46
47 define Build/Configure
48         touch $(PKG_BUILD_DIR)/include/config.h
49         mkdir -p $(PKG_BUILD_DIR)/include/config
50         touch $(PKG_BUILD_DIR)/include/config/auto.conf
51         mkdir -p $(PKG_BUILD_DIR)/include/generated
52         touch $(PKG_BUILD_DIR)/include/generated/autoconf.h
53 endef
54
55 MAKE_FLAGS += \
56         TARGET_CFLAGS="$(TARGET_CFLAGS)" \
57         TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
58         no-dot-config-targets=envtools \
59         envtools
60
61 define Package/uboot-envtools/conffiles
62 /etc/config/ubootenv
63 /etc/fw_env.config
64 endef
65
66 define Package/uboot-envtools/install
67         $(INSTALL_DIR) $(1)/usr/sbin
68         $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
69         $(LN) fw_printenv $(1)/usr/sbin/fw_setenv
70         $(INSTALL_DIR) $(1)/lib
71         $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
72         $(INSTALL_DIR) $(1)/etc/uci-defaults
73         $(if $(wildcard ./files/$(BOARD)), \
74                 $(INSTALL_DATA) ./files/$(BOARD) \
75                 $(1)/etc/uci-defaults/30_uboot-envtools \
76         )
77 endef
78
79 $(eval $(call BuildPackage,uboot-envtools))