From: Wolfgang Denk Date: Wed, 15 Jun 2011 12:13:07 +0200 Subject: [U-Boot] [PATCH v2 08/22] omap: add spl support In-Reply-To: <4DDE5AFE.9000404@ti.com> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> <1305472900-4004-9-git-send-email-aneesh@ti.com> <20110515195208.EA0971491B06@gemini.denx.de> <4DD13056.3000509@ti.com> <20110516154350.F16DB1491B07@gemini.denx.de> <4DD21CD8.2080409@ti.com> <20110517081637.69CE71491B09@gemini.denx.de> <4DDE5AFE.9000404@ti.com> Message-ID: <20110615101307.7DBFE82491@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 Aneesh V, In message <4DDE5AFE.9000404@ti.com> you wrote: > > I do not have any issue in having media specific files in their > respective directories. However, I would like to see the 'Makefile's > coming from the same directory tree irrespective of the media. So, how > about something like this: > > spl/ > mmc/ > nand/ > one-nand/ > board///Makefile Actually that would be board/[/]/ > The idea is to have the board level Makefile in 'spl/board/ > //' no matter what the SPL type is. This will help in better > consolidation of SPLs. OK. > I see 3 SPL use-cases in general: > 1. A single SPL that supports multiple media(suitable for SoCs with > large internal RAM) > 2. A single SPL supporting a single media(the board supports only one > media) 1. and 2. are actually the same (2. being the special case of N=1) > 3. Multiple SPLs for the same board each supporting a different > memory device(maybe preferred over 1 to keep the foot-print of each > small). > > Supporting (1) and (2) is straight forward with the above directory > structure. > > To support (3) the board level Makefile should conditionally > include the respective image file in the target 'all' based on CONFIG > options. For instance 'all' may include 'onenand-ipl-2k.bin' if > CONFIG_ONENAND_U_BOOT is defined and so on. I don't get this. Why don't we just pass the required make target from the top level Makefile? If we want to build "onenand-ipl-2k.bin" then this would result in running "make onenand-ipl-2k.bin" in the respective directory - this is then also independent of whether this image contains support for one specific boot device or for any set of different devices. 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 I object to intellect without discipline; I object to power without constructive purpose. -- Spock, "The Squire of Gothos", stardate 2124.5