From: Wolfgang Denk Date: Fri, 16 Apr 2010 09:50:06 +0200 Subject: [U-Boot] [STATUS] Heads-up: Reorganize directory structure In-Reply-To: <20100416065842.GA21982@morgana.gnudd.com> References: <20100415152247.3891BEEE8D9@gemini.denx.de> <20100413092323.44D8719F60@gemini.denx.de> <4BC6BAD2.8040908@monstr.eu> <20100415075232.77202EEE8D8@gemini.denx.de> <1271343853.6519.6.camel@localhost.localdomain> <20100415153127.GA628@morgana.gnudd.com> <1271347099.6519.18.camel@localhost.localdomain> <20100416065842.GA21982@morgana.gnudd.com> Message-ID: <20100416075006.B1345C05E21@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Alessandro Rubini, In message <20100416065842.GA21982@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