Skip to content

Commit

Permalink
build: add locking around dtc call after running mkits.sh
Browse files Browse the repository at this point in the history
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@nbd.name>
  • Loading branch information
nbd168 committed Dec 4, 2024
1 parent ce66385 commit 557a7ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/image-commands.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 557a7ca

Please sign in to comment.