diff mbox series

image: fix device profile specific COMPILE targets

Message ID mailman.40844.1669077476.4154159.openwrt-devel@lists.openwrt.org
State Superseded, archived
Headers show
Series image: fix device profile specific COMPILE targets | expand

Commit Message

Michael Pratt Nov. 22, 2022, 12:37 a.m. UTC
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Commit a01d23e75 ("image: always rebuild kernel loaders")
is a step in the right direction, but exposed some issues
and regressions in the makefile.

1. Some of the files made by device specific COMPILE targets
start with an "append" command (i.e. >> instead of > redirection)
and if the file already exists, the target file is the
input to itself before the first recipe-specified input.

2. Some of the device specific COMPILE targets, like the lzma-loader
have multiple steps and the uImage target requires the bin or ELF first,
so the two COMPILE operations cannot be run in parallel.

Fixes: a01d23e75 ("image: always rebuild kernel loaders")
Fixes: a7fb589e8 ("image: always rebuild kernel loaders")
Signed-off-by: Michael Pratt <mcpratt@pm.me>
---
 include/image.mk | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/image.mk b/include/image.mk
index e9dc53f82e..575df15899 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -520,8 +520,11 @@  define Device/Build/compile
   $$(_COMPILE_TARGET): $(KDIR)/$(1)
   $(eval $(call Device/Export,$(KDIR)/$(1)))
   $(KDIR)/$(1): FORCE
+	rm -f $(KDIR)/$(1)
 	$$(call concat_cmd,$(COMPILE/$(1)))
 
+  .NOTPARALLEL: $$(_COMPILE_TARGET)
+
 endef
 
 ifndef IB