Skip to content

Commit 014dbd4

Browse files
rsuszjacmet
authored andcommitted
package/linux: fix custom dts files handling
Custom dts files are still conditionally copied based on non existing boolean. So it is currently not possible to use custom dts file(s) at all. List of dts files is now iterated and files are copied into dedicated kernel arch dir. Signed-off-by: Rafal Susz <[email protected]> Tested-by: Jan Kundrát <[email protected]> Signed-off-by: Peter Korsgaard <[email protected]> (cherry picked from commit 54157c6) Signed-off-by: Peter Korsgaard <[email protected]>
1 parent 34b8a1c commit 014dbd4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

linux/linux.mk

+5-4
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,9 @@ endif
367367
# Compilation. We make sure the kernel gets rebuilt when the
368368
# configuration has changed.
369369
define LINUX_BUILD_CMDS
370-
$(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
371-
cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)
370+
@for dts in $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)); do \
371+
cp -f $${dts} $(KERNEL_ARCH_PATH)/boot/dts/ ; \
372+
done
372373
$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
373374
@if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \
374375
$(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \
@@ -479,9 +480,9 @@ $(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUST
479480
endif
480481
endif
481482

482-
ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y)
483+
ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT):$(strip $(KERNEL_DTS_NAME)),y:)
483484
$(error No kernel device tree source specified, check your \
484-
BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings)
485+
BR2_LINUX_KERNEL_INTREE_DTS_NAME / BR2_LINUX_KERNEL_CUSTOM_DTS_PATH settings)
485486
endif
486487

487488
endif # BR_BUILDING

0 commit comments

Comments
 (0)