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_<name> 1", and a "name=value" entry
  into "#define CONFIG_MK_<name> 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



What do you think?

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
Whom the gods would destroy, they first teach BASIC.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to