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_SOURCE
:=$(PKG_DISTNAME
)-$(PKG_VERSION
).
tar.bz2
17 http
://mirror2.openwrt.org
/sources \
18 ftp
://ftp.denx.de
/pub
/u-boot
20 PKG_MD5SUM
:=a076a044b64371edc52f7e562b13f6b2
22 PKG_BUILD_DIR
:=$(BUILD_DIR
)/u-boot-
$(PKG_VERSION
)
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/uboot-envtools
29 TITLE
:=read
/modify U-Boot bootloader environment
30 URL
:=http
://www.denx.de
/wiki
/U-Boot
33 define Package
/uboot-envtools
/description
34 This package includes tools to read and modify U-Boot bootloader environment.
37 define Build
/Configure
41 touch
$(PKG_BUILD_DIR
)/include/config.h
42 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
43 HOSTCC
="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gcc" \
44 HOSTOPTFLAGS
="$(TARGET_CFLAGS)" \
45 HOSTSTRIP
="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip" \
49 define Package
/uboot-envtools
/conffiles
54 define Package
/uboot-envtools
/install
55 $(INSTALL_DIR
) $(1)/usr
/sbin
56 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/tools
/env
/fw_printenv
$(1)/usr
/sbin
57 ln
-s fw_printenv
$(1)/usr
/sbin
/fw_setenv
58 $(INSTALL_DIR
) $(1)/lib
59 $(INSTALL_DATA
) .
/files
/uboot-envtools.sh
$(1)/lib
60 ifneq ($(CONFIG_TARGET_ar71xx
),)
61 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
62 $(INSTALL_DATA
) .
/files
/ar71xx
$(1)/etc
/uci-defaults
/30_uboot-envtools
64 ifneq ($(CONFIG_TARGET_cns3xxx
),)
65 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
66 $(INSTALL_DATA
) .
/files
/cns3xxx
$(1)/etc
/uci-defaults
/30_uboot-envtools
68 ifneq ($(CONFIG_TARGET_imx6
),)
69 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
70 $(INSTALL_DATA
) .
/files
/imx6
$(1)/etc
/uci-defaults
/30_uboot-envtools
72 ifneq ($(CONFIG_TARGET_kirkwood
),)
73 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
74 $(INSTALL_DATA
) .
/files
/kirkwood
$(1)/etc
/uci-defaults
/30_uboot-envtools
76 ifneq ($(CONFIG_TARGET_lantiq
),)
77 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
78 $(INSTALL_DATA
) .
/files
/lantiq
$(1)/etc
/uci-defaults
/30_uboot-envtools
80 ifneq ($(CONFIG_TARGET_mxs
),)
81 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
82 $(INSTALL_BIN
) .
/files
/mxs
$(1)/etc
/uci-defaults
/30_uboot-envtools
84 ifneq ($(CONFIG_TARGET_ramips
),)
85 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
86 $(INSTALL_DATA
) .
/files
/ramips
$(1)/etc
/uci-defaults
/30_uboot-envtools
90 $(eval
$(call BuildPackage
,uboot-envtools
))