[U-Boot] [PATCH 2/2] arm: cortexa9: adding support for TI OMAP4430 SDP

John Rigby john.rigby at linaro.org
Tue Jun 8 20:40:39 CEST 2010


Looks like mpc85xx and mpc86xx share:

ifeq ($(CPU),mpc85xx)
LIBS += drivers/qe/qe.a
LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.a
LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.a
endif
ifeq ($(CPU),mpc86xx)
LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.a
LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.a
endif

So something like
ifeq ($(SOC),omap3)
LIBS += $(CPUDIR)/omap-common/libomap-common.a
endif
ifeq(#(SOC),omap4)
LIBS += $(CPUDIR)/omap-common/libomap-common.a
endif

would work.  But it is a bit brute force and not general.

You could also add a config.mk to arch/arm/cpu/armv7/omap[34] that
defines SOC_COMMON as omap-common and then add

ifdef SOC_COMMON
LIBS += $(CPUDIR)/$(SOC_COMMON)/lib$(SOC_COMMON).a
endif

to the root Makefile.  This solution seems more clean but a little less
obvious.

On Tue, Jun 8, 2010 at 10:49 AM, Steve Sakoman <sakoman at gmail.com> wrote:

> On Fri, Jun 4, 2010 at 2:58 PM, John Rigby <jcrigby at gmail.com> wrote:
> > Aneesh:
> >
> > On Tue, May 25, 2010 at 12:39 AM, Aneesh V <aneesh at ti.com> wrote:
> >> Adding support for OMAP4430 SDP board based on the TI OMAP4430 SOC.
> >
> > ---
> >
> > arch/arm/cpu/armv7/omap4/reset.S:
> > Identical to omap3 version.  I think they should be shared. Perhaps
> > have a arch/arm/cpu/armv7/omap directory for shared files.
>
> How about we call it omap-common?
>
> Is there a good example of how to handle this shared code?  The
> existing build system will only build the contents of the omap4
> directory and not omap-common.  Offhand I don't see any other
> architectures that do this, so I thought I would ask before making
> something up :-)
>
> Steve
>
> > arch/arm/cpu/armv7/omap4/timer.c:
> > Apart from the include of asm/arch/omap4.h this file is identical to
> > the omap3 version.  See sharing comment above.
> >
> > arch/arm/include/asm/arch-omap4/cpu.h:
> > I think there is opportunity for sharing here as well.  Not the whole
> file
> > so some refactoring needs to happen.
> >
> > Thanks,
> > John
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
> >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>


More information about the U-Boot mailing list