]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ramips: clean UBI tempdir before image creation
authorDavid Bauer <mail@david-bauer.net>
Tue, 13 May 2025 23:32:34 +0000 (01:32 +0200)
committerDavid Bauer <mail@david-bauer.net>
Wed, 14 May 2025 16:39:56 +0000 (18:39 +0200)
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@david-bauer.net>
target/linux/ramips/image/mt7621.mk

index 38f102c1b6e8cb86fef858aa15b94779fbbeca83..79027c8c32a16e2d1a6d8c5e57e6e0c1878c3c1d 100755 (executable)
@@ -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