diff mbox series

[v2,2/2] uboot-envtools: add wrapper scripts for alternate config

Message ID 20201213190735.31978-3-bjorn@mork.no
State Superseded
Headers show
Series uboot-envtools: support for multiple config partitions | expand

Commit Message

Bjørn Mork Dec. 13, 2020, 7:07 p.m. UTC
Now that we can create an alternate configuration file, add two
wrapper scripts for simple access to it using the alternate
alternate application names `fw_printsys' and `fw_setsys'.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
 package/boot/uboot-envtools/Makefile          | 4 +++-
 package/boot/uboot-envtools/files/fw_printsys | 2 ++
 package/boot/uboot-envtools/files/fw_setsys   | 2 ++
 3 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 package/boot/uboot-envtools/files/fw_printsys
 create mode 100644 package/boot/uboot-envtools/files/fw_setsys
diff mbox series

Patch

diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
index 601627011d56..1e2115754551 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -10,7 +10,7 @@  include $(TOPDIR)/rules.mk
 PKG_NAME:=uboot-envtools
 PKG_DISTNAME:=u-boot
 PKG_VERSION:=2020.04
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
@@ -68,6 +68,8 @@  define Package/uboot-envtools/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin
 	$(LN) fw_printenv $(1)/usr/sbin/fw_setenv
+	$(INSTALL_BIN) ./files/fw_printsys $(1)/usr/sbin
+	$(INSTALL_BIN) ./files/fw_setsys $(1)/usr/sbin
 	$(INSTALL_DIR) $(1)/lib
 	$(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib
 	$(INSTALL_DIR) $(1)/etc/uci-defaults
diff --git a/package/boot/uboot-envtools/files/fw_printsys b/package/boot/uboot-envtools/files/fw_printsys
new file mode 100644
index 000000000000..0c4c4ab25702
--- /dev/null
+++ b/package/boot/uboot-envtools/files/fw_printsys
@@ -0,0 +1,2 @@ 
+#!/bin/sh
+[ -e /etc/fw_sys.config ] && exec /usr/sbin/fw_printenv -c /etc/fw_sys.config "$@"
diff --git a/package/boot/uboot-envtools/files/fw_setsys b/package/boot/uboot-envtools/files/fw_setsys
new file mode 100644
index 000000000000..1cdb1a70f7f4
--- /dev/null
+++ b/package/boot/uboot-envtools/files/fw_setsys
@@ -0,0 +1,2 @@ 
+#!/bin/sh
+[ -e /etc/fw_sys.config ] && exec /usr/sbin/fw_setenv -c /etc/fw_sys.config "$@"