[openwrt/openwrt] ramips: clean UBI tempdir before image creation

LEDE Commits lede-commits at lists.infradead.org
Wed May 14 10:02:52 PDT 2025


blocktrron pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d97c01a11f7397de960fcac642bee49847176ade

commit d97c01a11f7397de960fcac642bee49847176ade
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed May 14 01:32:34 2025 +0200

    ramips: clean UBI tempdir before image creation
    
    Clean the temporary directory the UBI image is generated from before
    generation.
    
    Currently it is removed after the image generation, which leads to files
    possibly not being cleared after a build failure in this step.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ramips/image/mt7621.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 38f102c1b6..79027c8c32 100755
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -92,6 +92,7 @@ define Build/inteno-y3-header
 endef
 
 define Build/inteno-bootfs
+	rm -rf $@.ubifs-dir
 	mkdir -p $@.ubifs-dir/boot
 
 	# populate the boot fs with the dtb and the kernel image
@@ -100,7 +101,6 @@ define Build/inteno-bootfs
 
 	# create ubifs
 	$(STAGING_DIR_HOST)/bin/mkfs.ubifs ${MKUBIFS_OPTS} -r $@.ubifs-dir/ -o $@.new
-	rm -rf $@.ubifs-dir
 	mv $@.new $@
 endef
 




More information about the lede-commits mailing list