2 # Copyright (C) 2006-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
10 PKG_NAME
:=uboot-envtools
15 PKG_BUILD_DIR
:=$(BUILD_DIR
)/u-boot-
$(PKG_VERSION
)
16 PKG_SOURCE
:=$(PKG_DISTNAME
)-$(PKG_VERSION
).
tar.bz2
18 http
://mirror2.openwrt.org
/sources \
19 ftp
://ftp.denx.de
/pub
/u-boot
20 PKG_HASH
:=7e7477534409d5368eb1371ffde6820f0f79780a1a1f676161c48442cb303dfd
22 PKG_BUILD_DEPENDS
:=fstools
24 PKG_LICENSE
:=GPL-2.0 GPL-2.0
+
25 PKG_LICENSE_FILES
:=Licenses
/README
31 include $(INCLUDE_DIR
)/package.mk
33 define Package
/uboot-envtools
37 TITLE
:=read
/modify U-Boot bootloader environment
38 URL
:=http
://www.denx.de
/wiki
/U-Boot
41 define Package
/uboot-envtools
/description
42 This package includes tools to read and modify U-Boot bootloader environment.
45 define Build
/Configure
46 touch
$(PKG_BUILD_DIR
)/include/config.h
47 mkdir
-p
$(PKG_BUILD_DIR
)/include/config
48 touch
$(PKG_BUILD_DIR
)/include/config
/auto.conf
49 mkdir
-p
$(PKG_BUILD_DIR
)/include/generated
50 touch
$(PKG_BUILD_DIR
)/include/generated
/autoconf.h
53 TARGET_CFLAGS
+= -I
$(STAGING_DIR
)/usr
/include
56 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
57 CROSS_COMPILE
="$(TARGET_CROSS)" \
58 TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
60 no-dot-config-targets
=envtools \
64 define Package
/uboot-envtools
/conffiles
69 define Package
/uboot-envtools
/install
70 $(INSTALL_DIR
) $(1)/usr
/sbin
71 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/tools
/env
/fw_printenv
$(1)/usr
/sbin
72 $(LN
) fw_printenv
$(1)/usr
/sbin
/fw_setenv
73 $(INSTALL_DIR
) $(1)/lib
74 $(INSTALL_DATA
) .
/files
/uboot-envtools.sh
$(1)/lib
75 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
76 $(if
$(wildcard .
/files
/$(BOARD
)), \
77 $(INSTALL_DATA
) .
/files
/$(BOARD
) \
78 $(1)/etc
/uci-defaults
/30_uboot-envtools \
82 $(eval
$(call BuildPackage
,uboot-envtools
))