2010-03-05 20:27:58 +00:00
|
|
|
#
|
2014-01-24 00:07:48 +00:00
|
|
|
# Copyright (C) 2006-2014 OpenWrt.org
|
2009-10-07 15:14:28 +00: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-24 21:49:24 +00:00
|
|
|
PKG_DISTNAME:=u-boot
|
2015-10-31 19:46:56 +00:00
|
|
|
PKG_VERSION:=2015.10
|
|
|
|
PKG_RELEASE:=1
|
2009-10-07 15:14:28 +00:00
|
|
|
|
2014-11-30 01:14:17 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
|
2011-10-24 21:49:24 +00:00
|
|
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
2014-11-30 01:14:17 +00:00
|
|
|
PKG_SOURCE_URL:=\
|
2013-10-28 15:15:05 +00:00
|
|
|
http://mirror2.openwrt.org/sources \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
2015-10-31 19:46:56 +00:00
|
|
|
PKG_MD5SUM:=7c203b0fc3390a122d8e8b75f147eac5
|
2009-10-07 15:14:28 +00:00
|
|
|
|
2014-06-02 12:44:19 +00:00
|
|
|
PKG_BUILD_DEPENDS:=+fstools
|
|
|
|
|
2014-11-29 23:45:53 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
|
|
|
PKG_LICENSE_FILES:=Licenses/README
|
|
|
|
|
2014-11-30 01:14:17 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
2013-03-15 01:36:53 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2011-10-24 21:49:24 +00:00
|
|
|
|
2009-10-07 15:14:28 +00:00
|
|
|
define Package/uboot-envtools
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
2010-03-10 04:17:22 +00:00
|
|
|
TITLE:=read/modify U-Boot bootloader environment
|
2010-04-23 11:27:29 +00:00
|
|
|
URL:=http://www.denx.de/wiki/U-Boot
|
2012-06-04 21:55:49 +00:00
|
|
|
endef
|
|
|
|
|
2009-10-07 15:14:28 +00:00
|
|
|
define Package/uboot-envtools/description
|
2010-03-10 04:17:22 +00:00
|
|
|
This package includes tools to read and modify U-Boot bootloader environment.
|
2009-10-07 15:14:28 +00:00
|
|
|
endef
|
|
|
|
|
2014-06-02 12:44:19 +00:00
|
|
|
define Package/uboot-envtools/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
|
|
|
endef
|
|
|
|
|
2013-03-15 01:36:53 +00:00
|
|
|
define Build/Configure
|
2014-05-19 16:41:24 +00:00
|
|
|
touch $(PKG_BUILD_DIR)/include/config.mk
|
|
|
|
touch $(PKG_BUILD_DIR)/include/config.h
|
2015-10-31 19:46:56 +00:00
|
|
|
mkdir $(PKG_BUILD_DIR)/include/generated
|
|
|
|
touch $(PKG_BUILD_DIR)/include/generated/autoconf.h
|
2013-03-15 01:36:53 +00:00
|
|
|
endef
|
|
|
|
|
2014-06-02 12:44:19 +00:00
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
|
|
|
|
2013-03-15 01:36:53 +00:00
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2014-05-19 16:41:24 +00:00
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
2014-06-02 12:44:19 +00:00
|
|
|
UBI="$(CONFIG_UBOOT_ENVTOOLS_UBI)" \
|
2013-03-15 01:36:53 +00:00
|
|
|
env
|
2012-06-04 21:55:49 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/uboot-envtools/conffiles
|
|
|
|
/etc/config/ubootenv
|
|
|
|
/etc/fw_env.config
|
2011-11-01 09:23:29 +00:00
|
|
|
endef
|
|
|
|
|
2009-10-07 15:14:28 +00:00
|
|
|
define Package/uboot-envtools/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/sbin
|
2013-03-15 01:36:53 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
|
2015-04-03 00:07:43 +00:00
|
|
|
$(LN) fw_printenv $(1)/usr/sbin/fw_setenv
|
2012-06-04 21:55:49 +00: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-14 19:46:43 +00:00
|
|
|
$(INSTALL_DATA) ./files/ar71xx $(1)/etc/uci-defaults/30_uboot-envtools
|
2013-07-02 23:08:17 +00:00
|
|
|
endif
|
|
|
|
ifneq ($(CONFIG_TARGET_cns3xxx),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-14 19:46:43 +00:00
|
|
|
$(INSTALL_DATA) ./files/cns3xxx $(1)/etc/uci-defaults/30_uboot-envtools
|
2012-06-04 21:55:49 +00:00
|
|
|
endif
|
2013-07-02 23:08:19 +00:00
|
|
|
ifneq ($(CONFIG_TARGET_imx6),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-14 19:46:43 +00:00
|
|
|
$(INSTALL_DATA) ./files/imx6 $(1)/etc/uci-defaults/30_uboot-envtools
|
2013-07-02 23:08:19 +00:00
|
|
|
endif
|
2012-07-16 22:32:00 +00:00
|
|
|
ifneq ($(CONFIG_TARGET_kirkwood),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-14 19:46:43 +00:00
|
|
|
$(INSTALL_DATA) ./files/kirkwood $(1)/etc/uci-defaults/30_uboot-envtools
|
2012-07-16 22:32:00 +00:00
|
|
|
endif
|
2012-06-04 21:55:49 +00:00
|
|
|
ifneq ($(CONFIG_TARGET_lantiq),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-14 19:46:43 +00:00
|
|
|
$(INSTALL_DATA) ./files/lantiq $(1)/etc/uci-defaults/30_uboot-envtools
|
2012-06-04 21:55:49 +00:00
|
|
|
endif
|
2014-06-29 12:38:35 +00:00
|
|
|
ifneq ($(CONFIG_TARGET_mvebu),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
|
|
$(INSTALL_BIN) ./files/mvebu $(1)/etc/uci-defaults/30_uboot-envtools
|
|
|
|
endif
|
2013-11-12 10:07:03 +00:00
|
|
|
ifneq ($(CONFIG_TARGET_mxs),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
|
|
$(INSTALL_BIN) ./files/mxs $(1)/etc/uci-defaults/30_uboot-envtools
|
|
|
|
endif
|
2014-11-26 09:00:40 +00:00
|
|
|
ifneq ($(CONFIG_TARGET_oxnas),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
|
|
$(INSTALL_BIN) ./files/oxnas $(1)/etc/uci-defaults/30_uboot-envtools
|
|
|
|
endif
|
2012-08-29 10:37:32 +00:00
|
|
|
ifneq ($(CONFIG_TARGET_ramips),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2013-10-14 19:46:43 +00:00
|
|
|
$(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools
|
2013-04-11 16:04:31 +00:00
|
|
|
endif
|
2011-10-24 21:49:24 +00:00
|
|
|
endef
|
|
|
|
|
2009-10-07 15:14:28 +00:00
|
|
|
$(eval $(call BuildPackage,uboot-envtools))
|