Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] boot/uboot: fix uboot build failure with UBOOT_CUSTOM_DTS_PATH on uboot version >= 2020.x
@ 2021-02-09 20:13 Giulio Benetti
  2021-03-27 22:33 ` Giulio Benetti
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Giulio Benetti @ 2021-02-09 20:13 UTC (permalink / raw)
  To: buildroot

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 <giulio.benetti@benettiengineering.com>
---
 boot/uboot/uboot.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index 2478a2a1e9..a5ad101d68 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -303,6 +303,11 @@ 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-07-14 17:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-09 20:13 [Buildroot] [PATCH] boot/uboot: fix uboot build failure with UBOOT_CUSTOM_DTS_PATH on uboot version >= 2020.x Giulio Benetti
2021-03-27 22:33 ` Giulio Benetti
2021-07-12 21:07   ` Giulio Benetti
2021-07-14 17:02 ` Yann E. MORIN
2021-07-14 17:05 ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox