[U-Boot] tegra: allow build to succeed with SPL disabled

Submitted by Vidya Sagar on Oct. 31, 2013, 9:21 a.m.

Details

Message ID 1383211298-31071-1-git-send-email-vidyas@nvidia.com
State Accepted
Delegated to: Tom Warren
Headers show

Commit Message

Vidya Sagar Oct. 31, 2013, 9:21 a.m.
u-boot-dtb-tegra.bin and u-boot-nodtb-tegra.bin binaries
are generated only if the SPL build is enabled as they have
dependency on SPL build

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stephen Warren Oct. 31, 2013, 4:29 p.m.
On 10/31/2013 03:21 AM, Vidya Sagar wrote:
> u-boot-dtb-tegra.bin and u-boot-nodtb-tegra.bin binaries
> are generated only if the SPL build is enabled as they have
> dependency on SPL build

Should they though? If there's no SPL, surely we still want to generate
the same output filenames, so that consumers of the binaries don't have
to care whether a particular board needs the SPL tacked onto the binary.

In other words, rather than:

u-boot-nodtb-tegra.bin == SPL + U-Boot
u-boot-dtb-tegra.bin == SPL + U-Boot + DTB

... when SPL is disabled, shouldn't we generate:

u-boot-nodtb-tegra.bin == U-Boot
u-boot-dtb-tegra.bin == U-Boot + DTB

That would require modifying the rules that generate those files not to
include the SPL binary in the concatenation, rather than simply not
generating those files at all.
Vidya Sagar Nov. 1, 2013, 5:27 p.m.
> -----Original Message-----
> From: Tom Warren
> Sent: Thursday, October 31, 2013 9:38 PM
> To: Vidya Sagar; u-boot@lists.denx.de
> Cc: Stephen Warren; Vidya Sagar; Tom Warren
> Subject: RE: [PATCH] tegra: allow build to succeed with SPL disabled
> 
> Vidya,
> 
> > -----Original Message-----
> > From: Vidya Sagar [mailto:vidyas@nvidia.com]
> > Sent: Thursday, October 31, 2013 2:22 AM
> > To: u-boot@lists.denx.de
> > Cc: Tom Warren; Stephen Warren; Vidya Sagar
> > Subject: [PATCH] tegra: allow build to succeed with SPL disabled
> >
> > u-boot-dtb-tegra.bin and u-boot-nodtb-tegra.bin binaries are generated
> > only if the SPL build is enabled as they have dependency on SPL build
> >
> > Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
> > ---
> >  Makefile | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/Makefile b/Makefile
> > index 1365db6..3c71082 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -407,12 +407,14 @@ endif
> >
> >  # enable combined SPL/u-boot/dtb rules for tegra  ifneq
> > ($(CONFIG_TEGRA),)
> > +ifeq ($(CONFIG_SPL),y)
> >  ifeq ($(CONFIG_OF_SEPARATE),y)
> >  ALL-y += $(obj)u-boot-dtb-tegra.bin
> >  else
> >  ALL-y += $(obj)u-boot-nodtb-tegra.bin  endif  endif
> > +endif
> >
> >  all:		$(ALL-y) $(SUBDIR_EXAMPLES)
> >
> > --
> > 1.8.1.5
> LGTM, thanks.  I assume you built all Tegra boards using MAKEALL?
> 
> If so, then:
> Acked-by: Tom Warren <twarren@nvidia.com>
> --
> nvpublic

I've run "./MAKEALL -v nvidia" and didn't see any issue.

--
nvpublic
Vidya Sagar Nov. 1, 2013, 5:29 p.m.
> -----Original Message-----
> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
> Sent: Thursday, October 31, 2013 9:59 PM
> To: Vidya Sagar; u-boot@lists.denx.de
> Cc: Stephen Warren; Tom Warren
> Subject: Re: [U-Boot] [PATCH] tegra: allow build to succeed with SPL disabled
> 
> On 10/31/2013 03:21 AM, Vidya Sagar wrote:
> > u-boot-dtb-tegra.bin and u-boot-nodtb-tegra.bin binaries are generated
> > only if the SPL build is enabled as they have dependency on SPL build
> 
> Should they though? If there's no SPL, surely we still want to generate the
> same output filenames, so that consumers of the binaries don't have to care
> whether a particular board needs the SPL tacked onto the binary.
> 
> In other words, rather than:
> 
> u-boot-nodtb-tegra.bin == SPL + U-Boot
> u-boot-dtb-tegra.bin == SPL + U-Boot + DTB
> 
> ... when SPL is disabled, shouldn't we generate:
> 
> u-boot-nodtb-tegra.bin == U-Boot
> u-boot-dtb-tegra.bin == U-Boot + DTB
> 
> That would require modifying the rules that generate those files not to
> include the SPL binary in the concatenation, rather than simply not
> generating those files at all.

When the SPL build is disabled, we are already generating u-boot.bin and u-boot-dtb.bin.
Do we really want to generate two more binaries with the same content but with different names ?

--
nvpublic
Stephen Warren Nov. 1, 2013, 5:34 p.m.
On 11/01/2013 11:27 AM, Vidya Sagar wrote:
>Tom Warren wrote at Thursday, October 31, 2013 9:38 PM:
>> If so, then:
>> Acked-by: Tom Warren <twarren@nvidia.com>
>> --
>> nvpublic
> 
> I've run "./MAKEALL -v nvidia" and didn't see any issue.

You want "./MAKEALL -s tegra", since not all Tegra boards were created
by NVIDIA; quite a few come from other vendors.
Stephen Warren Nov. 1, 2013, 5:39 p.m.
On 11/01/2013 11:29 AM, Vidya Sagar wrote:
> 
> 
>> -----Original Message-----
>> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
>> Sent: Thursday, October 31, 2013 9:59 PM
>> To: Vidya Sagar; u-boot@lists.denx.de
>> Cc: Stephen Warren; Tom Warren
>> Subject: Re: [U-Boot] [PATCH] tegra: allow build to succeed with SPL disabled
>>
>> On 10/31/2013 03:21 AM, Vidya Sagar wrote:
>>> u-boot-dtb-tegra.bin and u-boot-nodtb-tegra.bin binaries are generated
>>> only if the SPL build is enabled as they have dependency on SPL build
>>
>> Should they though? If there's no SPL, surely we still want to generate the
>> same output filenames, so that consumers of the binaries don't have to care
>> whether a particular board needs the SPL tacked onto the binary.
>>
>> In other words, rather than:
>>
>> u-boot-nodtb-tegra.bin == SPL + U-Boot
>> u-boot-dtb-tegra.bin == SPL + U-Boot + DTB
>>
>> ... when SPL is disabled, shouldn't we generate:
>>
>> u-boot-nodtb-tegra.bin == U-Boot
>> u-boot-dtb-tegra.bin == U-Boot + DTB
>>
>> That would require modifying the rules that generate those files not to
>> include the SPL binary in the concatenation, rather than simply not
>> generating those files at all.
> 
> When the SPL build is disabled, we are already generating u-boot.bin and u-boot-dtb.bin.
> Do we really want to generate two more binaries with the same content but with different names ?

Oh, I guess that the way u-boot-tegra-*.bin is a bit different to what I
thought, so indeed if you just disable those, then the desired
U-Boot+DTB files are still created. So, I guess it's fine the way you
have it.

It's a bit annoying that the output filenames are different based on
whether you have SPL or not, but I guess I can make our flasher scripts
cope with that easily enough.
Vidya Sagar Nov. 1, 2013, 5:41 p.m.
> -----Original Message-----
> From: Stephen Warren [mailto:swarren@wwwdotorg.org]
> Sent: Friday, November 01, 2013 11:05 PM
> To: Vidya Sagar; Tom Warren; u-boot@lists.denx.de
> Cc: Tom Warren; Stephen Warren
> Subject: Re: [U-Boot] [PATCH] tegra: allow build to succeed with SPL disabled
> 
> On 11/01/2013 11:27 AM, Vidya Sagar wrote:
> >Tom Warren wrote at Thursday, October 31, 2013 9:38 PM:
> >> If so, then:
> >> Acked-by: Tom Warren <twarren@nvidia.com>
> >> --
> >> nvpublic
> >
> > I've run "./MAKEALL -v nvidia" and didn't see any issue.
> 
> You want "./MAKEALL -s tegra", since not all Tegra boards were created by
> NVIDIA; quite a few come from other vendors.

just now gave a try. Total number of boards compiled are 13 and didn't see any issue.

--
nvpublic

Patch hide | download patch | download mbox

diff --git a/Makefile b/Makefile
index 1365db6..3c71082 100644
--- a/Makefile
+++ b/Makefile
@@ -407,12 +407,14 @@  endif
 
 # enable combined SPL/u-boot/dtb rules for tegra
 ifneq ($(CONFIG_TEGRA),)
+ifeq ($(CONFIG_SPL),y)
 ifeq ($(CONFIG_OF_SEPARATE),y)
 ALL-y += $(obj)u-boot-dtb-tegra.bin
 else
 ALL-y += $(obj)u-boot-nodtb-tegra.bin
 endif
 endif
+endif
 
 all:		$(ALL-y) $(SUBDIR_EXAMPLES)