From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vipin KUMAR Date: Mon, 19 Jul 2010 09:11:12 +0530 Subject: [U-Boot] [PATCH 13/28] SPEAr : Supporting various configurations for spear3xx and spear6xx boards In-Reply-To: <20100716112449.042B9153A82@gemini.denx.de> References: <1279084204-3263-1-git-send-email-vipin.kumar@st.com> <1279084204-3263-2-git-send-email-vipin.kumar@st.com> <1279084204-3263-3-git-send-email-vipin.kumar@st.com> <1279084204-3263-4-git-send-email-vipin.kumar@st.com> <1279084204-3263-5-git-send-email-vipin.kumar@st.com> <1279084204-3263-6-git-send-email-vipin.kumar@st.com> <1279084204-3263-7-git-send-email-vipin.kumar@st.com> <1279084204-3263-8-git-send-email-vipin.kumar@st.com> <1279084204-3263-9-git-send-email-vipin.kumar@st.com> <1279084204-3263-10-git-send-email-vipin.kumar@st.com> <1279084204-3263-11-git-send-email-vipin.kumar@st.com> <1279084204-3263-12-git-send-email-vipin.kumar@st.com> <1279084204-3263-13-git-send-email-vipin.kumar@st.com> <1279084204-3263-14-git-send-email-vipin.kumar@st.com> <20100715215512.00B93153A7E@gemini.denx.de> <20100716112449.042B9153A82@gemini.denx.de> Message-ID: <4C43C958.7090908@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 7/16/2010 4:54 PM, Wolfgang Denk wrote: > Dear Vipin KUMAR, > > I wrote: > >>> --- a/Makefile >>> +++ b/Makefile >>> @@ -2088,12 +2088,27 @@ omap730p2_cs3boot_config : unconfig >>> @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap >>> >>> spear300_config \ >>> +spear300_nand_config \ >>> +spear300_usbtty_config \ >>> +spear300_usbtty_nand_config \ >>> spear310_config \ >>> -spear320_config : unconfig >>> - @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear >>> - >>> -spear600_config : unconfig >>> - @$(MKCONFIG) -n $@ -t $@ spear6xx arm arm926ejs $(@:_config=) spear spear >>> +spear310_nand_config \ >>> +spear310_usbtty_config \ >>> +spear310_usbtty_nand_config \ >>> +spear320_config \ >>> +spear320_nand_config \ >>> +spear320_usbtty_config \ >>> +spear320_usbtty_nand_config : unconfig >>> + @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear >>> + >>> +spear600_config \ >>> +spear600_nand_config \ >>> +spear600_usbtty_config \ >>> +spear600_usbtty_nand_config : unconfig >>> + @$(MKCONFIG) -n $@ -t $@ spear6xx_evb arm arm926ejs $(@:_config=) spear spear >>> + >>> +suen3_config: unconfig >>> + @$(MKCONFIG) $(@:_config=) arm arm926ejs km_arm keymile kirkwood >> >> NAK. >> >> >> I don't want to have such stuff in the Makefile any more. Please try >> to find a way how to do this using boards.cfg instead. >> >> [I know that tis is non-trivial; you may want to talk to Detlev about >> this - he was thinking about the same issue, but I don;t know if he >> came to any conclusions.] > > > I discussed this topic with Detlev. This is the suggestion we came up > with: > > - At the moment, the first fieled in the boards.cfg file is used to > determine the name of the board configuration file. > - We will now extend this and allow for additional configuration > parameters to be appended. > - Unlike in the Makefile, where we were restricted by the make > syntax, we suggest to use a comma as separator character. > - There can be an arbitrary number of such parameters (zero or more), > but of course the list should be kept short to keep the file > readable. > - The configuration parameters can take the simple form "name" (as we > use now in the Makefile) or "name=value". > - The code in "mkconfig" that processes these parameters (similar to > what the "-t" option is doing now) will translate a plain "name" > entry into a "#define CONFIG_MK_ 1", and a "name=value" entry > into "#define CONFIG_MK_ value". > > > In the result, instead of adding these lines to the Makefile: > > +spear310_nand_config \ > +spear310_usbtty_config \ > +spear310_usbtty_nand_config \ > +spear320_config \ > +spear320_nand_config \ > +spear320_usbtty_config \ > +spear320_usbtty_nand_config : unconfig > + @$(MKCONFIG) -n $@ -t $@ spear3xx_evb arm arm926ejs $(@:_config=) spear spear > > we would add these lines to the boards.cfg file: > > spear310 arm arm926ejs arm926ejs spear310 spear spear > spear310,nand arm arm926ejs arm926ejs spear310 spear spear > spear310,usbtty arm arm926ejs arm926ejs spear310 spear spear > spear310,usbtty,nand arm arm926ejs arm926ejs spear310 spear spear > spear320 arm arm926ejs arm926ejs spear310 spear spear > spear320,nand arm arm926ejs arm926ejs spear310 spear spear > spear320,usbtty arm arm926ejs arm926ejs spear310 spear spear > spear320,usbtty,nand arm arm926ejs arm926ejs spear310 spear spear > > Dear Wolfgang, Got it. This is nice. Clears up a little mess in the Makefile I would make the changes as suggested. Thanks.. Regards Vipin > > What do you think? > > Best regards, > > Wolfgang Denk >