2 # Copyright (C) 2006-2013 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 HOSTSTRIP="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip" \
48 define Package/uboot-envtools/conffiles
53 define Package/uboot-envtools/install
54 $(INSTALL_DIR) $(1)/usr/sbin
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
56 ln -s fw_printenv $(1)/usr/sbin/fw_setenv
57 $(INSTALL_DIR) $(1)/lib
58 $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
59 ifneq ($(CONFIG_TARGET_ar71xx),)
60 $(INSTALL_DIR) $(1)/etc/uci-defaults
61 $(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
63 ifneq ($(CONFIG_TARGET_cns3xxx),)
64 $(INSTALL_DIR) $(1)/etc/uci-defaults
65 $(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
67 ifneq ($(CONFIG_TARGET_imx6),)
68 $(INSTALL_DIR) $(1)/etc/uci-defaults
69 $(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
71 ifneq ($(CONFIG_TARGET_kirkwood),)
72 $(INSTALL_DIR) $(1)/etc/uci-defaults
73 $(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
75 ifneq ($(CONFIG_TARGET_lantiq),)
76 $(INSTALL_DIR) $(1)/etc/uci-defaults
77 $(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
79 ifneq ($(CONFIG_TARGET_mxs),)
80 $(INSTALL_DIR) $(1)/etc/uci-defaults
81 $(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
83 ifneq ($(CONFIG_TARGET_ramips),)
84 $(INSTALL_DIR) $(1)/etc/uci-defaults
85 $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
89 $(eval $(call BuildPackage,uboot-envtools))