[U-Boot] when stuff in a "common/" directory has no value?
Robert P. J. Day
rpjday at crashcourse.ca
Sun May 15 15:38:08 CEST 2016
On Sun, 15 May 2016, Mario Six wrote:
> On Sat, May 14, 2016 at 8:22 PM, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
> >
> > i know i asked something similar to this a while back, but a
> > followup question ...
> >
> > i'm aware of the value of a vendor's "common/" directory where,
> > under "board/<vendor>/", one can establish a common directory to avoid
> > all sorts of silly duplication, but it seems like some of that content
> > is no longer even accessed.
> >
> > first, in the top-level Makefile, it seems the *proper* way to set
> > up a common directory is with its own Makefile, as in:
> >
> > ... snip ...
> > HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n)
> >
> > libs-y += lib/
> > libs-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/
> > ... snip ...
> >
> > tackier alternatives appear to be, first, to have source files in a
> > specific board directory "#include" source files from the common
> > directory (hack! barf!). and, in some cases like under
> > board/keymile/km83xx/, do something like this:
> >
> > km83xx/Makefile:obj-y += km83xx.o ../common/common.o ../common/ivm.o km83xx_i2c.o
> >
> > but i just noticed, in board/Marvell/common/, the source file
> > memory.c, which seems totally unreferenced in any way. am i missing
> > something? is there anything under /board/Marvell/* that, in some way,
> > selects and compiles common/memory.c?
> >
>
> board/Marvell/common/memory.c is one of two files that still "use" the ancient
> GTREGREAD macro, the last definition of which has been removed from the source
> with d92866; the only other file that uses it is drivers/rtc/ds1302.c, where I
> just stumbled across it.
>
> So, to answer your question: nope, the file wouldn't even compile :-)
>
> I'd say post a patch series that axes both files on grounds of using
> undefined ancient macros (if somebody wants to rescue the DS1302
> driver, they're welcome, but I doubt it, since no board in the tree
> uses it, anyway).
from what i see, Marvell/common/ directory has a few dead files:
* memory.c
* intel_flash.h
* i2c.h
those last two had corresponding source files deleted in
03b004074fb641cffd7d2150505ef8afc13231bf. i'm starting to think
there's not much in that Marvell/common/ directory that has much
value.
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
More information about the U-Boot
mailing list