diff mbox series

[U-Boot,047/126] spl: Allow SPL/TPL to use of-platdata without libfdt

Message ID 20190925145750.200592-48-sjg@chromium.org
State Superseded
Delegated to: Bin Meng
Headers show
Series x86: Add initial support for apollolake | expand

Commit Message

Simon Glass Sept. 25, 2019, 2:56 p.m. UTC
At present libfdt is included in SPL/TPL if SPL/TPL_OF_CONTROL is enabled.
But if of-platdata is in use this is not required. Update the condition to
avoid building this extra code. This ensures that if a libfdt function is
used it will produce a link error rather than silently increasing the
build size.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Bin Meng Oct. 5, 2019, 3:30 p.m. UTC | #1
On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
>
> At present libfdt is included in SPL/TPL if SPL/TPL_OF_CONTROL is enabled.
> But if of-platdata is in use this is not required. Update the condition to
> avoid building this extra code. This ensures that if a libfdt function is
> used it will produce a link error rather than silently increasing the
> build size.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  lib/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Bin Meng Oct. 7, 2019, 1:55 a.m. UTC | #2
On Sat, Oct 5, 2019 at 11:30 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > At present libfdt is included in SPL/TPL if SPL/TPL_OF_CONTROL is enabled.
> > But if of-platdata is in use this is not required. Update the condition to
> > avoid building this extra code. This ensures that if a libfdt function is
> > used it will produce a link error rather than silently increasing the
> > build size.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> >  lib/Kconfig | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

applied to u-boot-x86/next, thanks!
Bin Meng Oct. 8, 2019, 5:46 a.m. UTC | #3
On Mon, Oct 7, 2019 at 9:55 AM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Sat, Oct 5, 2019 at 11:30 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > At present libfdt is included in SPL/TPL if SPL/TPL_OF_CONTROL is enabled.
> > > But if of-platdata is in use this is not required. Update the condition to
> > > avoid building this extra code. This ensures that if a libfdt function is
> > > used it will produce a link error rather than silently increasing the
> > > build size.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > ---
> > >
> > >  lib/Kconfig | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> >
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>
> applied to u-boot-x86/next, thanks!

This patch unfortunately breaks some ARM boards build, eg: chromebook_jerry

See
https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/17131
https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/17132

I will have to drop this patch from my queue.

Regards,
Bin
Simon Glass Oct. 13, 2019, 6:30 p.m. UTC | #4
Hi Bin,

On Mon, 7 Oct 2019 at 23:46, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Oct 7, 2019 at 9:55 AM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > On Sat, Oct 5, 2019 at 11:30 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > >
> > > On Wed, Sep 25, 2019 at 10:58 PM Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > At present libfdt is included in SPL/TPL if SPL/TPL_OF_CONTROL is enabled.
> > > > But if of-platdata is in use this is not required. Update the condition to
> > > > avoid building this extra code. This ensures that if a libfdt function is
> > > > used it will produce a link error rather than silently increasing the
> > > > build size.
> > > >
> > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > ---
> > > >
> > > >  lib/Kconfig | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > >
> > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> >
> > applied to u-boot-x86/next, thanks!
>
> This patch unfortunately breaks some ARM boards build, eg: chromebook_jerry
>
> See
> https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/17131
> https://gitlab.denx.de/u-boot/custodians/u-boot-x86/-/jobs/17132
>
> I will have to drop this patch from my queue.

I'll put this one in a separate series.

Regards,
SImon
diff mbox series

Patch

diff --git a/lib/Kconfig b/lib/Kconfig
index 135f0b372b0..bab57eb3059 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -473,7 +473,7 @@  config OF_LIBFDT_OVERLAY
 
 config SPL_OF_LIBFDT
 	bool "Enable the FDT library for SPL"
-	default y if SPL_OF_CONTROL
+	default y if SPL_OF_CONTROL && !SPL_OF_PLATDATA
 	help
 	  This enables the FDT library (libfdt). It provides functions for
 	  accessing binary device tree images in memory, such as adding and
@@ -483,7 +483,7 @@  config SPL_OF_LIBFDT
 
 config TPL_OF_LIBFDT
 	bool "Enable the FDT library for TPL"
-	default y if TPL_OF_CONTROL
+	default y if TPL_OF_CONTROL && !TPL_OF_PLATDATA
 	help
 	  This enables the FDT library (libfdt). It provides functions for
 	  accessing binary device tree images in memory, such as adding and