* [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled
@ 2023-01-29 16:30 Laurent Pinchart
2023-01-29 16:43 ` Marek Vasut
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Laurent Pinchart @ 2023-01-29 16:30 UTC (permalink / raw)
To: u-boot; +Cc: Marek Vasut, Praneeth Bajjuri, Maxime Ripard, Simon Glass
FIT image support is commonly used to bundle a kernel image, a device
tree, and device tree overlays. Applying overlays requires the
OF_LIBFDT_OVERLAY config option to be set, which lots of boards fail to
select, most likely because developers never noticed. This leads to an
error when trying to apply overlays:
"config with overlays but CONFIG_OF_LIBFDT_OVERLAY not set"
TI ARM boards select the option by default. Extend this to all systems
that select the FIT option. This only affects the default, overlay
support can still be disabled manually in the configuration.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
I'm posting this as an RFC to get feedback. If the idea is generally
appreciated, I'll update the defconfig files accordingly.
---
lib/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Kconfig b/lib/Kconfig
index 549bd3577851..d309ccf83c03 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -823,7 +823,7 @@ config OF_LIBFDT_ASSUME_MASK
config OF_LIBFDT_OVERLAY
bool "Enable the FDT library overlay support"
depends on OF_LIBFDT
- default y if ARCH_OMAP2PLUS || ARCH_KEYSTONE
+ default y if FIT
help
This enables the FDT library (libfdt) overlay support.
base-commit: f147aa80f52989c7455022ca1ab959e8545feccc
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled
2023-01-29 16:30 [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled Laurent Pinchart
@ 2023-01-29 16:43 ` Marek Vasut
2023-01-30 15:50 ` Simon Glass
2023-03-10 18:12 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2023-01-29 16:43 UTC (permalink / raw)
To: Laurent Pinchart, u-boot; +Cc: Praneeth Bajjuri, Maxime Ripard, Simon Glass
On 1/29/23 17:30, Laurent Pinchart wrote:
> FIT image support is commonly used to bundle a kernel image, a device
> tree, and device tree overlays. Applying overlays requires the
> OF_LIBFDT_OVERLAY config option to be set, which lots of boards fail to
> select, most likely because developers never noticed. This leads to an
> error when trying to apply overlays:
>
> "config with overlays but CONFIG_OF_LIBFDT_OVERLAY not set"
>
> TI ARM boards select the option by default. Extend this to all systems
> that select the FIT option. This only affects the default, overlay
> support can still be disabled manually in the configuration.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> I'm posting this as an RFC to get feedback. If the idea is generally
> appreciated, I'll update the defconfig files accordingly.
For i.MX, R-Car2/3, STM32MP1xx , this could be enabled just fine.
Enabling it for all fitImage systems sounds even better however, and the
few which do not need DTO could disable this in board defconfig instead,
I suspect there are fewer of those.
> ---
> lib/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/Kconfig b/lib/Kconfig
> index 549bd3577851..d309ccf83c03 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -823,7 +823,7 @@ config OF_LIBFDT_ASSUME_MASK
> config OF_LIBFDT_OVERLAY
> bool "Enable the FDT library overlay support"
> depends on OF_LIBFDT
> - default y if ARCH_OMAP2PLUS || ARCH_KEYSTONE
> + default y if FIT
Reviewed-by: Marek Vasut <marex@denx.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled
2023-01-29 16:30 [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled Laurent Pinchart
2023-01-29 16:43 ` Marek Vasut
@ 2023-01-30 15:50 ` Simon Glass
2023-03-10 18:12 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2023-01-30 15:50 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: u-boot, Marek Vasut, Praneeth Bajjuri, Maxime Ripard
Hi Laurent,
On Sun, 29 Jan 2023 at 09:30, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> FIT image support is commonly used to bundle a kernel image, a device
> tree, and device tree overlays. Applying overlays requires the
> OF_LIBFDT_OVERLAY config option to be set, which lots of boards fail to
> select, most likely because developers never noticed. This leads to an
> error when trying to apply overlays:
>
> "config with overlays but CONFIG_OF_LIBFDT_OVERLAY not set"
>
> TI ARM boards select the option by default. Extend this to all systems
> that select the FIT option. This only affects the default, overlay
> support can still be disabled manually in the configuration.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> I'm posting this as an RFC to get feedback. If the idea is generally
> appreciated, I'll update the defconfig files accordingly.
> ---
> lib/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg@chromium.org>
But I wonder what the code-size increase is?
Regards,
SImon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled
2023-01-29 16:30 [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled Laurent Pinchart
2023-01-29 16:43 ` Marek Vasut
2023-01-30 15:50 ` Simon Glass
@ 2023-03-10 18:12 ` Tom Rini
2023-03-12 9:46 ` Laurent Pinchart
2 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2023-03-10 18:12 UTC (permalink / raw)
To: Laurent Pinchart
Cc: u-boot, Marek Vasut, Praneeth Bajjuri, Maxime Ripard, Simon Glass
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
On Sun, Jan 29, 2023 at 06:30:22PM +0200, Laurent Pinchart wrote:
> FIT image support is commonly used to bundle a kernel image, a device
> tree, and device tree overlays. Applying overlays requires the
> OF_LIBFDT_OVERLAY config option to be set, which lots of boards fail to
> select, most likely because developers never noticed. This leads to an
> error when trying to apply overlays:
>
> "config with overlays but CONFIG_OF_LIBFDT_OVERLAY not set"
>
> TI ARM boards select the option by default. Extend this to all systems
> that select the FIT option. This only affects the default, overlay
> support can still be disabled manually in the configuration.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>
> ---
> I'm posting this as an RFC to get feedback. If the idea is generally
> appreciated, I'll update the defconfig files accordingly.
Alright, so, I put this through a world build, and most platforms grow
by 4-5kB. I think that means what I'd really like to see as a starting
point is more SoCs doing an "imply OF_LIBFDT_OVERLAY if OF_LIBFDT && FIT"
or adding to the default y list below, or similar. If that brings us to
the point where a good number of ARM boards with FIT are enabling it, we
can default y if ARM, for example. But right now it's more like several
hundred boards growing in size, which is uncomfortable, given the size
it's growing by.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled
2023-03-10 18:12 ` Tom Rini
@ 2023-03-12 9:46 ` Laurent Pinchart
0 siblings, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2023-03-12 9:46 UTC (permalink / raw)
To: Tom Rini
Cc: u-boot, Marek Vasut, Praneeth Bajjuri, Maxime Ripard, Simon Glass
Hi Tom,
On Fri, Mar 10, 2023 at 01:12:24PM -0500, Tom Rini wrote:
> On Sun, Jan 29, 2023 at 06:30:22PM +0200, Laurent Pinchart wrote:
>
> > FIT image support is commonly used to bundle a kernel image, a device
> > tree, and device tree overlays. Applying overlays requires the
> > OF_LIBFDT_OVERLAY config option to be set, which lots of boards fail to
> > select, most likely because developers never noticed. This leads to an
> > error when trying to apply overlays:
> >
> > "config with overlays but CONFIG_OF_LIBFDT_OVERLAY not set"
> >
> > TI ARM boards select the option by default. Extend this to all systems
> > that select the FIT option. This only affects the default, overlay
> > support can still be disabled manually in the configuration.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Reviewed-by: Marek Vasut <marex@denx.de>
> > Reviewed-by: Simon Glass <sjg@chromium.org>
> > ---
> > I'm posting this as an RFC to get feedback. If the idea is generally
> > appreciated, I'll update the defconfig files accordingly.
>
> Alright, so, I put this through a world build, and most platforms grow
> by 4-5kB.
Thank you for testing this, despite the patch falling off my radar.
> I think that means what I'd really like to see as a starting
> point is more SoCs doing an "imply OF_LIBFDT_OVERLAY if OF_LIBFDT && FIT"
> or adding to the default y list below, or similar. If that brings us to
> the point where a good number of ARM boards with FIT are enabling it, we
> can default y if ARM, for example. But right now it's more like several
> hundred boards growing in size, which is uncomfortable, given the size
> it's growing by.
I'm fine with that.
I've submitted the original patch because I had to update a
vendor-supplied U-Boot binary to get overlay support, which ended up
being a bit rabbit hole for various reasons. I thought it would be nice
to save users from this kind of trouble. I can send patches to enable
the option for SoC I care about, but generally speaking, who should
decide which SoC(s) should imply OF_LIBFDT_OVERLAY ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-12 9:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-29 16:30 [RFC/PATCH] lib/Kconfig: Enable OF_LIBFDT_OVERLAY by default when FIT is enabled Laurent Pinchart
2023-01-29 16:43 ` Marek Vasut
2023-01-30 15:50 ` Simon Glass
2023-03-10 18:12 ` Tom Rini
2023-03-12 9:46 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox