[PATCH] image: fix device profile specific COMPILE targets
Michael Pratt
mcpratt at pm.me
Mon Nov 21 16:37:39 PST 2022
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 at pm.me>
---
include/image.mk | 3 +++
1 file changed, 3 insertions(+)
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
--
2.30.2
More information about the openwrt-devel
mailing list