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
|
2022-01-29 12:10:00 +00:00
|
|
|
PKG_VERSION:=2022.01
|
2021-01-07 08:56:54 +00:00
|
|
|
PKG_RELEASE:=$(AUTORELEASE)
|
2020-04-18 22:39:08 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
|
|
|
|
PKG_SOURCE_URL:= \
|
|
|
|
https://ftp.denx.de/pub/u-boot \
|
|
|
|
https://mirror.cyberbits.eu/u-boot \
|
|
|
|
ftp://ftp.denx.de/pub/u-boot
|
2022-01-29 12:10:00 +00:00
|
|
|
PKG_HASH:=81b4543227db228c03f8a1bf5ddbc813b0bb8f6555ce46064ef721a6fc680413
|
2018-05-01 19:59:05 +00:00
|
|
|
PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
|
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
|
2009-10-07 15:14:28 +00:00
|
|
|
|
2018-01-07 18:52:05 +00:00
|
|
|
PKG_BUILD_DEPENDS:=fstools
|
2014-06-02 12:44:19 +00:00
|
|
|
|
2014-11-29 23:45:53 +00:00
|
|
|
PKG_LICENSE:=GPL-2.0 GPL-2.0+
|
|
|
|
PKG_LICENSE_FILES:=Licenses/README
|
|
|
|
|
2016-11-21 23:04:48 +00:00
|
|
|
PKG_FLAGS:=nonshared
|
|
|
|
|
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
|
2016-11-02 19:33:01 +00:00
|
|
|
SUBMENU:=Boot Loaders
|
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
|
|
|
|
|
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.h
|
uboot-envtools: update to 2018.03
Several changes has been made:
+ AES support has been removed by
upstream commit c6831c7 (2017-11-14)
[remove patch "200-fw_env_no_aes.patch"]
+ Support for UBI volumes has beed added by
upstream commit 34255b9 (2017-11-15)
[remove patch "300-support-env-in-ubivol-chardev.patch"]
+ A command line argument has beed added ("-c") to manually indicate
the location of the environment configuration file
Also, patch "400-u-boot-2015.10-stdint.patch" is no longer
necessary, and the config option to enable UBI support has
been removed.
Size comparisons:
fw_printenv size:
Target Before After
ar71xx 15,189 bytes 18,133 bytes (+2,944 bytes)
ipq40xx 20,873 bytes 20,987 bytes (+114 bytes)
mvebu 20,881 bytes 20,991 bytes (+110 bytes)
ramips 15,128 bytes 18,072 bytes (+2,944 bytes)
OPKG package size:
Target Before After
ar71xx 11,309 bytes 12,875 bytes (+1,566 bytes)
ipq40xx 11,772 bytes 13,299 bytes (+1,527 bytes)
mvebu 11,609 bytes 13,114 bytes (+1,505 bytes)
ramips 10,975 bytes 12,503 bytes (+1,528 bytes)
Compile tested: ipq40xx (musl, glibc, gcc5-musl), ar71xx, mvebu, ramips
Run tested: ipq40xx (ASUS RT-AC58U)
Signed-off-by: Luis Araneda <luaraneda@gmail.com>
2018-04-06 14:23:34 +00:00
|
|
|
mkdir -p $(PKG_BUILD_DIR)/include/config
|
|
|
|
touch $(PKG_BUILD_DIR)/include/config/auto.conf
|
2015-11-04 22:17:40 +00:00
|
|
|
mkdir -p $(PKG_BUILD_DIR)/include/generated
|
2015-10-31 19:46:56 +00:00
|
|
|
touch $(PKG_BUILD_DIR)/include/generated/autoconf.h
|
2013-03-15 01:36:53 +00:00
|
|
|
endef
|
|
|
|
|
2019-11-07 20:01:40 +00:00
|
|
|
MAKE_FLAGS += \
|
|
|
|
TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
|
|
|
TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
no-dot-config-targets=envtools \
|
|
|
|
envtools
|
2012-06-04 21:55:49 +00:00
|
|
|
|
|
|
|
define Package/uboot-envtools/conffiles
|
|
|
|
/etc/config/ubootenv
|
|
|
|
/etc/fw_env.config
|
2021-04-06 09:43:03 +00:00
|
|
|
/etc/fw_sys.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
|
2021-04-06 09:43:04 +00:00
|
|
|
$(INSTALL_BIN) ./files/fw_printsys $(1)/usr/sbin
|
|
|
|
$(INSTALL_BIN) ./files/fw_setsys $(1)/usr/sbin
|
2012-06-04 21:55:49 +00:00
|
|
|
$(INSTALL_DIR) $(1)/lib
|
|
|
|
$(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
|
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2021-04-01 22:52:56 +00:00
|
|
|
$(if $(wildcard ./files/$(BOARD)_$(SUBTARGET)), \
|
|
|
|
$(INSTALL_DATA) ./files/$(BOARD)_$(SUBTARGET) \
|
|
|
|
$(1)/etc/uci-defaults/30_uboot-envtools, \
|
|
|
|
$(if $(wildcard ./files/$(BOARD)), \
|
|
|
|
$(INSTALL_DATA) ./files/$(BOARD) \
|
|
|
|
$(1)/etc/uci-defaults/30_uboot-envtools \
|
|
|
|
) \
|
2018-04-19 14:26:39 +00:00
|
|
|
)
|
2011-10-24 21:49:24 +00:00
|
|
|
endef
|
|
|
|
|
2009-10-07 15:14:28 +00:00
|
|
|
$(eval $(call BuildPackage,uboot-envtools))
|