public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] What is the correct way to configure SPL options?
Date: Fri, 18 May 2012 09:09:12 -0700	[thread overview]
Message-ID: <4FB67428.30300@ti.com> (raw)
In-Reply-To: <201205180923.04813.manningc2@actrix.gen.nz>

On 05/17/2012 02:23 PM, Charles Manning wrote:
> On Friday 18 May 2012 08:58:06 Scott Wood wrote:
>> On 05/17/2012 03:47 PM, Tom Rini wrote:
>>> On 05/17/2012 01:22 PM, Scott Wood wrote:
>>>> We had problems with (B) regarding TEXT_BASE -- the makefile versions of
>>>> the config symbols will only be generated once.
>>>> CONFIG_SKIP_LOW_LEVEL_INIT doesn't seem to be used from makefiles.
>>>>
>>>> I still think (C) is the way to go.
>>>
>>> But since we have CONFIG_SYS_SPL_TEXT_BASE now, (B) is how we do it
>>> normally, yes?
>>
>> That was more of an instance of "OK, I give in, we'll do it the simple
>> but ugly way if it's just this one thing" than "the normal way".
>>
>
> To me it looks like the ugliness comes from an unclear policy resulting in SPL
> configs being handled in two different ways.
>
> IMHO, the policy can be simplified and rationalised in two ways:
>
>
> A) Recognise name each config option that might vary with an SPL and regular
> variant. That will just lead to hell in the Makefiles.
> - non inclusive or-
> C) Each binary has a different config and is built separately. Then there is
> no need for multiple CONFIGs for the same feature.
>
> I have found (C) to work fine for building multiple variants (using a much
> older version of u-boot). For example, I build two stripped u-boots to run a
> manufacturing loader process. I thus build at least 3 different u-boots for
> the same board. Each has a different config and is built separately.
>
> I guess common stuff can be rationalised:
> foo-common.h
> ....
>
> foo-uboot.h
> #include "foo-common.h"
> ...
>
> foo-spl.h
> #include "foo-common.h"
> ...
>
> But that really makes for config file proliferation. Still, that would seem
> more manageable.

My suggestion would be to walk a few boards to that conversion. 
foo-common.h will be 97% of what foo.h is.  A single file and making use 
of boards.cfg to set flags when we really need different builds and 
behaviors should do it.  Of course with the Kconfig wishlist item maybe 
we could revisit this problem :)

-- 
Tom

>
> -- CHarles
>

      reply	other threads:[~2012-05-18 16:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17  0:13 [U-Boot] What is the correct way to configure SPL options? Charles Manning
2012-05-17 18:48 ` Tom Rini
2012-05-17 20:22   ` Scott Wood
2012-05-17 20:47     ` Tom Rini
2012-05-17 20:58       ` Scott Wood
2012-05-17 21:23         ` Charles Manning
2012-05-18 16:09           ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FB67428.30300@ti.com \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox