[U-Boot] SPL framework re-design

Aneesh V aneesh at ti.com
Tue Jun 21 05:22:09 CEST 2011


On Monday 20 June 2011 09:49 PM, Scott Wood wrote:
> On Sun, 19 Jun 2011 15:52:29 +0530
> "V, Aneesh"<aneesh at ti.com>  wrote:
>
>> On Sat, Jun 18, 2011 at 3:58 AM, Scott Wood<scottwood at freescale.com>  wrote:
>>> On Fri, 17 Jun 2011 22:18:57 +0530
>>> Aneesh V<aneesh at ti.com>  wrote:
>>>
>>>> @@ -1158,6 +1164,7 @@ clobber:        clean
>>>>        @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l
>>>> -print | xargs rm -f
>>>>        @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type
>>>> l -print | xargs rm -f
>>>>        @[ ! -d $(obj)mmc_spl ] || find $(obj)mmc_spl -name "*" -type l
>>>> -print | xargs rm -f
>>>> +     @[ ! -d $(obj)spl ] || find $(obj)mmc_spl -name "*" -type l -print |
>>>> xargs rm -f
>>>
>>> That last mmc_spl should just be spl.
>>>
>>>> +LIBS-$(CONFIG_SYS_SPL_NAND_SUPPORT) += mmc/libnand.o
>>>> +LIBS-$(CONFIG_SYS_SPL_ONENAND_SUPPORT) += mmc/libonenand.o
>>
>> Oops!! That was a copy paste error. It was intended to be:
>> +LIBS-$(CONFIG_SYS_SPL_NAND_SUPPORT) += nand/libnand.o
>> +LIBS-$(CONFIG_SYS_SPL_ONENAND_SUPPORT) += onenand/libonenand.o
>
> Still, what would go in those files?

That's actually one rule per sub-directory in the directory structure.
What goes in there can be decided by the respective Makefile in the
sub-directory. It can have more fine-grained selection like what you
have mentioned below.

>
> It'd have to be something more specific, like:
>
> LIBS-$(CONFIG_SYS_SPL_NAND_SIMPLE) += nand/nand_boot.o
> LIBS-$(CONFIG_SYS_SPL_NAND_FSL_ELBC) += nand/nand_boot_fsl_elbc.o
> ...
>
> Hmm, I guess you'd stick this in a recursive makefile.  Seems like overkill.
>
>> The top-level Makefile doesn't include any source files by itself.
>> All SPL content comes from one or more of libraries. So, there
>> will be at least one library defined, I believe(unless there
>> is an error, of course).
>
> Couldn't there be only OBJS?

It looks to me at the moment that the root directory for SPL, 'spl/',
need not have any source files. We will have an spl/common directory
for such needs(I forgot to add this in the list of libraries)

If this framework looks reasonable I shall go ahead an convert the
OMAP4 spl to this framework, so that we can thrash out some more
details.

best regards,
Aneesh


More information about the U-Boot mailing list