Browse Source

ar71xx: fix kernel relocate stub parallel build issue

Use per-kernel directory

Signed-off-by: Felix Fietkau <[email protected]>
Felix Fietkau 9 years ago
parent
commit
462a7c0e96
1 changed files with 5 additions and 4 deletions
  1. 5 4
      target/linux/ar71xx/image/Makefile

+ 5 - 4
target/linux/ar71xx/image/Makefile

@@ -79,15 +79,16 @@ define Build/loader-okli
 endef
 
 define Build/relocate-kernel
-	rm -rf $(KDIR)/relocate
-	$(CP) ../../generic/image/relocate $(KDIR)
-	$(MAKE) -C $(KDIR)/relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
+	rm -rf $@.relocate
+	$(CP) ../../generic/image/relocate $@.relocate
+	$(MAKE) -j1 -C $@.relocate KERNEL_ADDR=$(KERNEL_LOADADDR) CROSS_COMPILE=$(TARGET_CROSS)
 	( \
-		dd if=$(KDIR)/relocate/loader.bin bs=32 conv=sync && \
+		dd if=$@.relocate/loader.bin bs=32 conv=sync && \
 		perl -e '@s = stat("$@"); print pack("N", @s[7])' && \
 		cat "$@" \
 	) > "[email protected]"
 	mv "[email protected]" "$@"
+	rm -rf [email protected]
 endef
 
 define Build/copy-file