[U-Boot] [STATUS] Heads-up: Reorganize directory structure
Wolfgang Denk
wd at denx.de
Fri Apr 16 09:50:06 CEST 2010
Dear Alessandro Rubini,
In message <20100416065842.GA21982 at morgana.gnudd.com> you wrote:
>
> > I really like this structure, particularly if the code under
> > $VENDOR/[common, include, lib] is arch independent.
>
> Yes, that would be good, if it was a common case. However,
> arch-independent code is usually under drivers. See at91 and avr32 for
> example: no common code under board/atmel/ . Even boards/freescale,
The Atmel code is a particularly bad example - I never understood why
each of these boards needs it's own copy of "led.c" or "partition.c".
We should not use bad examples as reference, I think.
> In theory you are correct. In practice, such platform independent
> material is using drivers/ .
This is not always true. There are examples for shared code across
different CPU families and even architectures. IIRC, board/keymile/
contains common code that is used on ARM and on PowerPC systems.
And board/tqc/tqm8xx/load_sernum_ethaddr.c is also used in
board/tqc/tqm8260/ - this code predates the creation of vendor
directories by many years, but it could/should be moved to a (to be
created) board/tqc/common directory.
All these examples do not belong into drivers, nor into any arch/cpu
directory.
> If there really was vendor-specific cross-platform code, I agree
> something like you suggest is best.
There is. See examples above.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"May your future be limited only by your dreams."
- Christa McAuliffe
More information about the U-Boot
mailing list