Dear Alessandro Rubini, In message <20100416065842.ga21...@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: w...@denx.de "May your future be limited only by your dreams." - Christa McAuliffe _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot