[U-Boot] when stuff in a "common/" directory has no value?

Robert P. J. Day rpjday at crashcourse.ca
Sat May 14 20:22:15 CEST 2016


  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?

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