* [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
* [Buildroot] [PATCH] boot/uboot: fix uboot build failure with UBOOT_CUSTOM_DTS_PATH on uboot version >= 2020.x
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
2 siblings, 1 reply; 5+ messages in thread
From: Giulio Benetti @ 2021-03-27 22:33 UTC (permalink / raw)
To: buildroot
Hi All,
On 2/9/21 9:13 PM, Giulio Benetti wrote:
> 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/
> )
>
Any new about this patch? It's essential to build an external u-boot dts
after u-boot 2020.x
Kind regards
--
Giulio Benetti
Benetti Engineering sas
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] boot/uboot: fix uboot build failure with UBOOT_CUSTOM_DTS_PATH on uboot version >= 2020.x
2021-03-27 22:33 ` Giulio Benetti
@ 2021-07-12 21:07 ` Giulio Benetti
0 siblings, 0 replies; 5+ messages in thread
From: Giulio Benetti @ 2021-07-12 21:07 UTC (permalink / raw)
To: buildroot
Ping again
Giulio
> Il giorno 27 mar 2021, alle ore 23:34, Giulio Benetti <giulio.benetti@benettiengineering.com> ha scritto:
>
> ?Hi All,
>
>> On 2/9/21 9:13 PM, Giulio Benetti wrote:
>> 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/
>> )
>
> Any new about this patch? It's essential to build an external u-boot dts after u-boot 2020.x
>
> Kind regards
> --
> Giulio Benetti
> Benetti Engineering sas
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] boot/uboot: fix uboot build failure with UBOOT_CUSTOM_DTS_PATH on uboot version >= 2020.x
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-14 17:02 ` Yann E. MORIN
2021-07-14 17:05 ` Yann E. MORIN
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2021-07-14 17:02 UTC (permalink / raw)
To: buildroot
Giulio, All,
On 2021-02-09 21:13 +0100, Giulio Benetti spake thusly:
> Starting from version 2020.x
Do we know exactly what upstream commit made that impossible?
Maybe looking at that commit can hint at an upstremable fix?
> 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
How will this behave when one does 'make uboot-rebuild' ?
As far as I can see, this is going to endlessly inject the custom dtb,
leading to multiple instances of it...
Also, it means that the sources we provide as part of legal-info would
not contain this line, and thus could be considered non compliant.
So, I don't think this is a good solution.
If we were to do that, then I think we should;
0. remove the possibility to use out-of-tree custom DTS, and instruct
users to provide a patch against uboot, that adds the dts and the
corresponding Makefile rule;
1. patch the dts Makefiles to add the possibility to build an arbitrary
(set of) dtb from the command line;
2. work with upstream to re-isntate the possibility to specify an
arbitrary (set of) dtb to build from the command line.
Of course, I think the first option (0) is the dsafest one, because it
means the legal-info *will* be complete, as the dts and its rules are
then part of the patches saved by legal-info, while options 1 and 2
makes it too easy to forget about providing those dts when gettign in
compliance.
Of corse, options 0 is also a bit inconvenient for one-off builds. But
between a bit of inconvenience, and being non-compliant, I know where my
vote goes.
Regards,
Yann E. MORIN.
> + )
> $(if $(UBOOT_CUSTOM_DTS_PATH),
> cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/
> )
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH] boot/uboot: fix uboot build failure with UBOOT_CUSTOM_DTS_PATH on uboot version >= 2020.x
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-14 17:02 ` Yann E. MORIN
@ 2021-07-14 17:05 ` Yann E. MORIN
2 siblings, 0 replies; 5+ messages in thread
From: Yann E. MORIN @ 2021-07-14 17:05 UTC (permalink / raw)
To: buildroot
Giulio, All,
(sorry, I sent the previous reply too fast...)
On 2021-02-09 21:13 +0100, Giulio Benetti spake thusly:
> 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),
Even if this is going to change: why did you duplicate the condition,
ather than inject the sed call in the cisting conditional block?
Regards,
Yann E. MORIN.
> cp -f $(UBOOT_CUSTOM_DTS_PATH) $(@D)/arch/$(UBOOT_ARCH)/dts/
> )
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.