[openwrt/openwrt] build: add locking around dtc call after running mkits.sh

LEDE Commits lede-commits at lists.infradead.org
Wed Dec 4 04:33:29 PST 2024


nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/557a7ca70ddc29177e45f0c120b6ae21fc38abbb

commit 557a7ca70ddc29177e45f0c120b6ae21fc38abbb
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Dec 4 13:31:24 2024 +0100

    build: add locking around dtc call after running mkits.sh
    
    mkits.sh creates a root.*.pagesync file with padding, which is global, and
    the generated .its files reference it. Since dtc reads this file, it must
    not run at the same time as mkits.sh
    Fixes generating itb images with broken rootfs.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 include/image-commands.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index a627ffc202..2e129e0347 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -391,8 +391,8 @@ define Build/fit
 		$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \
 		-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
 		-A $(LINUX_KARCH) -v $(LINUX_VERSION), gen-cpio$(if $(TARGET_PER_DEVICE_ROOTFS),.$(ROOTFS_ID/$(DEVICE_NAME))))
-	PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
-		-E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new
+	$(call locked,PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
+		-E -B 0x1000 $(if $(findstring static,$(word 3,$(1))),-p 0x1000)) -f $@.its $@.new)
 	@mv $@.new $@
 endef
 




More information about the lede-commits mailing list