[U-Boot] [RFC PATCH 3/4] Add new folder and build system for SPL

Aneesh V aneesh at ti.com
Fri Jul 8 15:28:33 CEST 2011


On Friday 08 July 2011 06:34 PM, Wolfgang Denk wrote:
> Dear Aneesh V,
>
> In message<4E16FD50.3090005 at ti.com>  you wrote:
>>
>>> - use a different name instead of OBJTREE everywhere, and leave
>>
>> What Daniel suggested about using something like SPLTREE(or SPLOBJTREE)
>> seems to be be right solution then. Are you ok with that?
>
> Yes, if it works without too much effort.
>
>>> - introduce a new variable that stores the original setting of OBJTREE
>>>     so we can refer to this later
>>>
>>>> I used BUILD_DIR/spl/obj as OBJTREE to avoid this problem.
>
> Well, this may cause nasty problems.  Note that BUILD_DIR is usually
> not set for local builds; current Makefile looks like this:
>
> OBJTREE         := $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR))
> SRCTREE         := $(CURDIR)
> TOPDIR          := $(SRCTREE)
> ...
> ifneq ($(OBJTREE),$(SRCTREE))
> ...
>
> Tests like this here will fail if you use BUILD_DIR (which is not set)
> instead of OBJTREE (which is set to CURDIR).

Sorry for the confusion. I was using BUILD_DIR only to explain the
situation because OBJTREE now had a different definition. I did not use
BUILD_DIR in the changes I did.

>
>> You want to continue to maintain nand_boot.c kind of files within
>> $(TOPDIR)/spl/ , right?
>
> Yes.  Copies of, or symlinks to, source files should be avoided.

Symlinks, copies are not involved in either case. My question was this:
Where should something like 'nand_spl/nand_boot.c' go in the new
framework?

1) spl/nand/nand_boot.c OR
2) drivers/nand/spl_nand_boot.c

(2) Helps in having:
SPLOBJTREE := (OBJTREE)/spl

where as with (1) we have:
SPLOBJTREE := (OBJTREE)/spl/obj
and with this nand_boot.o will be in
(OBJTREE)/spl/obj/spl/nand/nand_boot.o !

To me (2) looks cleaner, and goes well with the idea of having all
source files in the original source tree.

best regards,
Aneesh


More information about the U-Boot mailing list