From: Wolfgang Denk Date: Wed, 15 Jun 2011 12:07:15 +0200 Subject: [U-Boot] [PATCH v2 09/22] omap4: add spl support for OMAP4 SDP In-Reply-To: <4DDE54E5.7080404@ti.com> References: <1298893591-17636-1-git-send-email-aneesh@ti.com> <1305472900-4004-10-git-send-email-aneesh@ti.com> <20110515183343.9D6771491B06@gemini.denx.de> <4DD134DD.6040802@ti.com> <20110516154814.D92D81491B07@gemini.denx.de> <4DD21FB9.6070901@ti.com> <20110517081949.54B731491B09@gemini.denx.de> <4DD26B36.4050102@ti.com> <20110517125309.A50B81491B09@gemini.denx.de> <4DDE54E5.7080404@ti.com> Message-ID: <20110615100715.15259655C6@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 <4DDE54E5.7080404@ti.com> you wrote: > > >> And how do you distinguish between the two cases at the top level > >> Makefile? Using a CONFIG flag or on a per platform basis? > > > > The decision should not be make in the top level makefile, but in > > spl/Makefile. And this can simply check if a board directory exists > > in the first place. > > 1. How about the case where there is some board dependent code but also > code shared by the boards(SoC based code). Will we have different > 'Makefile's then - one for board and one for SoC. Will we then build > different libraries at each leavel and link them together etc? Yes. If a board directory exists the code there gets built and then linked. > 2. I think one key thing that you are perhaps missing is that in SPL > the board level Makefile is not just meant for board level files. This probably should be reworked. We should have a Makefile in nand_spl/ which covers the general code and then runs the respective SoC and/or board specific sub-makes. > Instead it is used to pull together files from all the layers and make > a custom image. IMHO, we will get into un-necessary complexities if we Yes, but most of thisis actually not board specific, but more SoC specific, if not general at all. > lose this property of SPL. We may rather spend efforts on making the > regular U-Boot more configurable. Indeed we should allow for more fine granular selection. > The board level Makefile needs to have all the files. For the SoC level No. It needs only those files that are actually board specific. > selection of files and the SoC level rules, include the respective *.mk > files. Because in this case there are no board specific files there is I don;t think that this is actually board specific - if we follow that route, we will duplicate the same stuff for all boards that use the same SoC. > nothing more in the Makefile. Please note that this may not be the case > in general. Most boards, I suspect, may have some board specific files > too. That's why I suggest to separate common, SoC specific and board specific stuff . 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 There were meetings. There were always meetings. And they were dull, which is part of the reason they were meetings. Dull likes company. - Terry Pratchett, _Making_Money_