[PATCH 1/1] sysupgrade need fwtool over the next stages to remove the metadata info for UBI volumes. This patch creates copy of /usr/bin/fwtool to /tmp directory to preserves it after the sysupgrade ramdisk switch. Later fwtool is being referenced from platform.sh script for device specific metadata removal

Todor Colov todorcolov at abv.bg
Mon Jul 20 15:11:46 EDT 2020


Signed-off-by: Todor Colov <todorcolov at abv.bg>
---
 package/base-files/files/lib/upgrade/fwtool.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/base-files/files/lib/upgrade/fwtool.sh b/package/base-files/files/lib/upgrade/fwtool.sh
index a0b3fb0a04..e4736c06f3 100644
--- a/package/base-files/files/lib/upgrade/fwtool.sh
+++ b/package/base-files/files/lib/upgrade/fwtool.sh
@@ -36,7 +36,9 @@ fwtool_check_image() {
 		}
 		[ "$REQUIRE_IMAGE_METADATA" = 1 ] && return 1
 		return 0
-	fi
+	fi	
+	# keep fwtool copy in /tmp for later reference from platform.sh for device specific metadata removal
+	cp /usr/bin/fwtool /tmp/.
 
 	json_load "$(cat /tmp/sysupgrade.meta)" || {
 		echo "Invalid image metadata"
-- 
2.27.0




More information about the openwrt-devel mailing list