2010-03-06 04:27:58 +08:00
|
|
|
#
|
2014-01-24 08:07:48 +08:00
|
|
|
# Copyright (C) 2006-2014 OpenWrt.org
|
2009-10-07 23:14:28 +08:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=uboot-envtools
|
2011-10-25 05:49:24 +08:00
|
|
|
PKG_DISTNAME:=u-boot
|
2013-10-18 08:39:28 +08:00
|
|
|
PKG_VERSION:=2013.10
|
2014-01-24 08:07:48 +08:00
|
|
|
PKG_RELEASE:=2
|
2009-10-07 23:14:28 +08:00
|
|
|
|
2011-10-25 05:49:24 +08:00
|
|
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
2013-10-28 23:15:05 +08:00
|
|
|
PKG_SOURCE_URL:= \
|
|
|
|
http://mirror2.openwrt.org/sources \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
|
|
|
|
2013-10-18 08:39:28 +08:00
|
|
|
PKG_MD5SUM:=a076a044b64371edc52f7e562b13f6b2
|
2009-10-07 23:14:28 +08:00
|
|
|
|
2013-03-15 09:36:53 +08:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
|
2009-10-07 23:14:28 +08:00
|
|
|
|
2013-03-15 09:36:53 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2011-10-25 05:49:24 +08:00
|
|
|
|
2009-10-07 23:14:28 +08:00
|
|
|
define Package/uboot-envtools
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
2010-03-10 12:17:22 +08:00
|
|
|
TITLE:=read/modify U-Boot bootloader environment
|
2010-04-23 19:27:29 +08:00
|
|
|
URL:=http://www.denx.de/wiki/U-Boot
|
2012-06-05 05:55:49 +08:00
|
|
|
endef
|
|
|
|
|
2009-10-07 23:14:28 +08:00
|
|
|
define Package/uboot-envtools/description
|
2010-03-10 12:17:22 +08:00
|
|
|
This package includes tools to read and modify U-Boot bootloader environment.
|
2009-10-07 23:14:28 +08:00
|
|
|
endef
|
|
|
|
|
2013-03-15 09:36:53 +08:00
|
|
|
define Build/Configure
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
touch $(PKG_BUILD_DIR)/include/config.h
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
HOSTCC="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gcc" \
|
|
|
|
HOSTSTRIP="$(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)strip" \
|
|
|
|
env
|
2012-06-05 05:55:49 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot-envtools/conffiles
|
|
|
|
/etc/config/ubootenv
|
|
|
|
/etc/fw_env.config
|
2011-11-01 17:23:29 +08:00
|
|
|
endef
|
|
|
|
|
2009-10-07 23:14:28 +08:00
|
|
|
define Package/uboot-envtools/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2013-03-15 09:36:53 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
|
2011-11-01 17:23:29 +08:00
|
|
|
ln -s fw_printenv $(1)/usr/sbin/fw_setenv
|
2012-06-05 05:55:49 +08:00
|
|
|
$(INSTALL_DIR) $(1)/lib
|
|
|
|
$(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
|
|
|
|
ifneq ($(CONFIG_TARGET_ar71xx),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-15 03:46:43 +08:00
|
|
|
$(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
|
2013-07-03 07:08:17 +08:00
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_TARGET_cns3xxx),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-15 03:46:43 +08:00
|
|
|
$(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
|
2012-06-05 05:55:49 +08:00
|
|
|
endif
|
2013-07-03 07:08:19 +08:00
|
|
|
ifneq ($(CONFIG_TARGET_imx6),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-15 03:46:43 +08:00
|
|
|
$(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
|
2013-07-03 07:08:19 +08:00
|
|
|
endif
|
2012-07-17 06:32:00 +08:00
|
|
|
ifneq ($(CONFIG_TARGET_kirkwood),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-15 03:46:43 +08:00
|
|
|
$(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
|
2012-07-17 06:32:00 +08:00
|
|
|
endif
|
2012-06-05 05:55:49 +08:00
|
|
|
ifneq ($(CONFIG_TARGET_lantiq),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-15 03:46:43 +08:00
|
|
|
$(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
|
2012-06-05 05:55:49 +08:00
|
|
|
endif
|
2013-11-12 18:07:03 +08:00
|
|
|
ifneq ($(CONFIG_TARGET_mxs),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
|
|
$(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
|
|
|
|
endif
|
2012-08-29 18:37:32 +08:00
|
|
|
ifneq ($(CONFIG_TARGET_ramips),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-15 03:46:43 +08:00
|
|
|
$(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
|
2013-04-12 00:04:31 +08:00
|
|
|
endif
|
2011-10-25 05:49:24 +08:00
|
|
|
endef
|
|
|
|
|
2009-10-07 23:14:28 +08:00
|
|
|
$(eval $(call BuildPackage,uboot-envtools))
|