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
|
2015-11-01 03:46:56 +08:00
|
|
|
PKG_VERSION:=2015.10
|
|
|
|
PKG_RELEASE:=1
|
2009-10-07 23:14:28 +08:00
|
|
|
|
2014-11-30 09:14:17 +08:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
|
2011-10-25 05:49:24 +08:00
|
|
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
2014-11-30 09:14:17 +08:00
|
|
|
PKG_SOURCE_URL:=\
|
2013-10-28 23:15:05 +08:00
|
|
|
http://mirror2.openwrt.org/sources \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
2016-12-17 00:32:10 +08:00
|
|
|
PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
|
2009-10-07 23:14:28 +08:00
|
|
|
|
2014-06-02 20:44:19 +08:00
|
|
|
PKG_BUILD_DEPENDS:=+fstools
|
|
|
|
|
2014-11-30 07:45:53 +08:00
|
|
|
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
|
|
|
PKG_LICENSE_FILES:=Licenses/README
|
|
|
|
|
2016-11-22 07:04:48 +08:00
|
|
|
PKG_FLAGS:=nonshared
|
|
|
|
|
2014-11-30 09:14:17 +08:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
|
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
|
2016-11-03 03:33:01 +08:00
|
|
|
SUBMENU:=Boot Loaders
|
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
|
|
|
|
|
2014-06-02 20:44:19 +08:00
|
|
|
define Package/uboot-envtools/config
|
|
|
|
source "$(SOURCE)/Config.in"
|
|
|
|
endef
|
|
|
|
|
2013-03-15 09:36:53 +08:00
|
|
|
define Build/Configure
|
2014-05-20 00:41:24 +08:00
|
|
|
touch $(PKG_BUILD_DIR)/include/config.mk
|
|
|
|
touch $(PKG_BUILD_DIR)/include/config.h
|
2015-11-05 06:17:40 +08:00
|
|
|
mkdir -p $(PKG_BUILD_DIR)/include/generated
|
2015-11-01 03:46:56 +08:00
|
|
|
touch $(PKG_BUILD_DIR)/include/generated/autoconf.h
|
2013-03-15 09:36:53 +08:00
|
|
|
endef
|
|
|
|
|
2014-06-02 20:44:19 +08:00
|
|
|
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
|
|
|
|
|
2013-03-15 09:36:53 +08:00
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
2014-05-20 00:41:24 +08:00
|
|
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
|
|
|
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
2014-06-02 20:44:19 +08:00
|
|
|
UBI="$(CONFIG_UBOOT_ENVTOOLS_UBI)" \
|
2015-11-05 06:17:40 +08:00
|
|
|
dot-config=0 \
|
|
|
|
HOSTLDFLAGS= \
|
2013-03-15 09:36:53 +08:00
|
|
|
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
|
2015-04-03 08:07:43 +08:00
|
|
|
$(LN) 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
|
2016-06-08 01:19:01 +08:00
|
|
|
ifneq ($(CONFIG_TARGET_ipq806x),)
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
|
|
|
$(INSTALL_DATA) ./files/ipq $(1)/etc/uci-defaults/30_uboot-envtools
|
|
|
|
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
|
2014-06-29 20:38:35 +08: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 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
|
2014-11-26 17:00:40 +08: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 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))
|