mpc85xx: fix address config for ws-ap3825i
[openwrt/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:=2024.01
13 PKG_RELEASE:=2
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:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3
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 $(call Build/Compile/Default,tools-only_defconfig)
49 endef
50
51 define Build/Compile
52 $(call Build/Compile/Default,envtools)
53 endef
54
55 # We need to override the ARCH passed by buildsystem as otherwise the defconfig
56 # for tools-only wont match and the includes for sandbox will be dropped
57 MAKE_FLAGS += \
58 ARCH="sandbox" \
59 TARGET_CFLAGS="$(TARGET_CFLAGS)" \
60 TARGET_LDFLAGS="$(TARGET_LDFLAGS)"
61
62 define Package/uboot-envtools/conffiles
63 /etc/config/ubootenv
64 /etc/fw_env.config
65 /etc/fw_sys.config
66 endef
67
68 define Package/uboot-envtools/install
69 $(INSTALL_DIR) $(1)/usr/sbin
70 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
71 $(LN) fw_printenv $(1)/usr/sbin/fw_setenv
72 $(INSTALL_BIN) ./files/fw_printsys $(1)/usr/sbin
73 $(INSTALL_BIN) ./files/fw_setsys $(1)/usr/sbin
74 $(INSTALL_DIR) $(1)/lib
75 $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
76 $(INSTALL_DIR) $(1)/etc/uci-defaults
77 $(if $(wildcard ./files/$(BOARD)_$(SUBTARGET)), \
78 $(INSTALL_DATA) ./files/$(BOARD)_$(SUBTARGET) \
79 $(1)/etc/uci-defaults/30_uboot-envtools, \
80 $(if $(wildcard ./files/$(BOARD)), \
81 $(INSTALL_DATA) ./files/$(BOARD) \
82 $(1)/etc/uci-defaults/30_uboot-envtools \
83 ) \
84 )
85 endef
86
87 $(eval $(call BuildPackage,uboot-envtools))