Skip to content

Commit 3b06db3

Browse files
committed
Fix DTC build regression
Root cause: $(BUILD_DTB) had $(DTC_SENTINEL) as a prerequisite, causing the recipe's $^ to expand to both src/devices/minimal.dts and src/dtc/.git. The preprocessor then received two input files instead of one, breaking the device tree compilation with "Error: <stdin>:69.9-11 syntax error". Solution: Remove $(DTC_SENTINEL) from $(BUILD_DTB) dependencies. The BUILD_DTB target uses the system dtc command and doesn't require the submodule. Only BUILD_DTB2C needs the DTC_SENTINEL dependency for libfdt headers.
1 parent 0bf5ee2 commit 3b06db3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ ifeq ($(CONFIG_SYSTEM),y)
201201
ifneq ($(CONFIG_ELF_LOADER),y)
202202
DTB_DEPS := $(BUILD_DTB) $(BUILD_DTB2C)
203203
# Ensure DTC is cloned before building DTB
204-
$(BUILD_DTB) $(BUILD_DTB2C): $(DTC_SENTINEL)
204+
# Note: BUILD_DTB uses system dtc, only BUILD_DTB2C needs submodule headers
205+
$(BUILD_DTB2C): $(DTC_SENTINEL)
205206
endif
206207
endif
207208

0 commit comments

Comments
 (0)