uboot-envtools: add wrapper scripts for alternate config
authorBjørn Mork <bjorn@mork.no>
Tue, 6 Apr 2021 09:43:04 +0000 (11:43 +0200)
committerPetr Štetiar <ynezz@true.cz>
Thu, 8 Apr 2021 07:20:59 +0000 (09:20 +0200)
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
package/boot/uboot-envtools/files/fw_printsys [new file with mode: 0644]
package/boot/uboot-envtools/files/fw_setsys [new file with mode: 0644]

index 03dc6c678d748e0bcabc277667879e06d3360d22..02bca9cea3f6a7d9a177a99947ea7394e83bd5ad 100644 (file)
@@ -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 (file)
index 0000000..0c4c4ab
--- /dev/null
@@ -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 (file)
index 0000000..1cdb1a7
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+[ -e /etc/fw_sys.config ] && exec /usr/sbin/fw_setenv -c /etc/fw_sys.config "$@"