[U-Boot] SPL framework re-design

Aneesh V aneesh at ti.com
Fri Jun 17 09:00:33 CEST 2011


On Thursday 16 June 2011 10:15 PM, Scott Wood wrote:
> On Thu, 16 Jun 2011 13:38:00 +0530
> Aneesh V<aneesh at ti.com>  wrote:
>
>> New Design Proposed by Wolfgang:
>> * Have a top-level Makefile in the SPL root-directory - for instance
>> 'nand_spl/Makefile'
>> * nand_spl/Makefile builds a generic library with the generic source
>> files at this level.
>
> What is a "generic SPL library", or even a "generic NAND SPL library"?
>
> There is no code that is shared by all NAND SPLs.  The files directly under
> "nand_spl/" are alternatives that the board makefile can choose.
>
> Counterproposal: keep the basic structure the same, but refactor the
> makefiles so that they use a common template but supply their own policy.
>
> That is, the board makefile would just set some variables to be lists of
> objects it's interested in (and any other relevant tunables, or special
> rules), and then include the common SPL makefile that will do all the
> symlinking and building.

A crude form of this is what I had done in my patch-set. OMAP4 SDP and
OMAP4 Panda Makefiles were identical because there was no board
specific content. So, I moved them into an omap4.mk and rules.mk and
included these two files from the board level Makefiles. But Wolfgang
apparently didn't like this because I was having board level Makefile
despite not having any board specific content.

I still believe that extending this to more granular re-usable
components such as mmc.mk, nand.mk, console.mk, fat.mk etc may be a
less disruptive but effective solution.

>
> And no, I don't think we can get rid of building the objects separately,
> and I don't want a situation where #ifdef NAND_SPL is honored in some files
> but not others.

Agree.

best regards,
Aneesh


More information about the U-Boot mailing list