ath79: fix parallel image generation for Zyxel NBG6716
authorAndré Valentin <avalentin@marcant.net>
Fri, 17 Sep 2021 19:48:55 +0000 (21:48 +0200)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sun, 31 Oct 2021 20:24:47 +0000 (21:24 +0100)
This changes the image generation to use a unique directory. With
parallel building it may occur that two concurrent jobs try
to create an image which leds to errors. It also removes a needless
subdirecory.

Signed-off-by: André Valentin <avalentin@marcant.net>
target/linux/ath79/image/nand.mk

index 52631789d9c5b34bd40743cf79eea784efa77aaa..8d3d2ce5b286ce7ff053ad633323114fa65f295e 100644 (file)
@@ -1,13 +1,12 @@
 # attention: only zlib compression is allowed for the boot fs
 define Build/zyxel-buildkerneljffs
-       rm -rf  $(KDIR_TMP)/zyxelnbg6716
-       mkdir -p $(KDIR_TMP)/zyxelnbg6716/image/boot
-       cp $@ $(KDIR_TMP)/zyxelnbg6716/image/boot/vmlinux.lzma.uImage
+       mkdir -p $@.tmp/boot
+       cp $@ $@.tmp/boot/vmlinux.lzma.uImage
        $(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
                --big-endian --squash-uids -v -e 128KiB -q -f -n -x lzma -x rtime \
                -o $@ \
-               -d $(KDIR_TMP)/zyxelnbg6716/image
-       rm -rf $(KDIR_TMP)/zyxelnbg6716
+               -d $@.tmp
+       rm -rf $@.tmp
 endef
 
 define Build/zyxel-factory