From: Giulio Benetti Date: Thu, 24 Dec 2020 13:27:08 +0100 Subject: [Buildroot] [RFC PATCH] boot/uboot: fix uboot build failure with UBOOT_CUSTOM_DTS_PATH on uboot version >= 2020.x Message-ID: <20201224122708.588130-1-giulio.benetti@benettiengineering.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Starting from version 2020.x uboot can't build .dts files not listed in dts/Makefile leading to a build failure when trying to pass a .dts file to UBOOT_CUSTOM_DTS_PATH. So let's prepend that file(s) to dts/Makefile if UBOOT_CUSTOM_DTS_PATH is used. Signed-off-by: Giulio Benetti --- boot/uboot/uboot.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index d2b4e8dc60..1f5ef4b9d2 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -296,6 +296,9 @@ endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY UBOOT_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_DTS_PATH)) define UBOOT_BUILD_CMDS + $(if $(UBOOT_CUSTOM_DTS_PATH), + $(Q)$(SED) '1s;^;dtb-y += $(subst .dts,.dtb,$(call notdir,$(UBOOT_CUSTOM_DTS_PATH)))\n;' $(@D)/arch/$(UBOOT_ARCH)/dts/Makefile + ) $(if $(UBOOT_CUSTOM_DTS_PATH), cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/ ) -- 2.25.1