public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [Announce][RFC] CFG_ macro renaming
@ 2008-09-01 23:56 Jean-Christophe PLAGNIOL-VILLARD
  2008-09-02  0:34 ` Wolfgang Denk
  2008-09-02  6:19 ` Markus Klotzbücher
  0 siblings, 2 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-09-01 23:56 UTC (permalink / raw)
  To: u-boot

Hi,

	As announce during OLS conference, it's plain to
	use kconfig to manage board configuration.

	For this purpose and Makefile conditional compile we're
	move CFG_ macro to new CONFIG_ marco

	For memory

	There are two classes of configuration variables:

	* Configuration _OPTIONS_:
	  These are selectable by the user and have names beginning with
	  "CONFIG_".

	* Configuration _SETTINGS_:
	  These depend on the hardware etc. and should not be meddled with if
	  you don't know what you're doing; they have names beginning with
	  "CFG_".

	to keep CFG_ meaning we will rename them in the following change

	1) Basic config

	For environment we will use CONFIG_ENV_ (will be done this merge windows)

	For configuration settings CONFIG_SYS_

	additional proposition

	2) Extra config

	For memory settings CONFIG_MEM_ or CONFIG_SYS_MEM_

	For PCI settings CONFIG_PCI_ or CONFIG_SYS_PCI_

	For USB settings CONFIG_USE or CONFIG_SYS_PCI_

	For flash settings CONFIG_FLASH or CONFIG_SYS_FLASH_

	For nand settins CONFIG_NAND or CONFIG_SYS_NAND_

	For dtt settgins CONFIG_DTT or CONFIG_SYS_DTT

	etc...

	Comments are welcome.

	The move to new style will be done for the beggining of the next merge window

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-01 23:56 [U-Boot] [Announce][RFC] CFG_ macro renaming Jean-Christophe PLAGNIOL-VILLARD
@ 2008-09-02  0:34 ` Wolfgang Denk
  2008-09-02  0:59   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-09-02  6:19 ` Markus Klotzbücher
  1 sibling, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2008-09-02  0:34 UTC (permalink / raw)
  To: u-boot

Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20080901235624.GC316@game.jcrosoft.org> you wrote:
> 
> 	As announce during OLS conference, it's plain to

s/plain/planned/

> 	* Configuration _OPTIONS_:
> 	  These are selectable by the user and have names beginning with
> 	  "CONFIG_".
> 
> 	* Configuration _SETTINGS_:
> 	  These depend on the hardware etc. and should not be meddled with if
> 	  you don't know what you're doing; they have names beginning with
> 	  "CFG_".
> 
> 	to keep CFG_ meaning we will rename them in the following change
> 
> 	1) Basic config
> 
> 	For environment we will use CONFIG_ENV_ (will be done this merge windows)

i. e. s/CFG_ENV_/CONFIG_ENV_/g

> 	For configuration settings CONFIG_SYS_

For *other* configuration settings we will use CONFIG_SYS_, i. e. 
s/CFG_/CONFIG_SYS_g.

> 	2) Extra config
> 
> 	For memory settings CONFIG_MEM_ or CONFIG_SYS_MEM_
> 
> 	For PCI settings CONFIG_PCI_ or CONFIG_SYS_PCI_
> 
> 	For USB settings CONFIG_USE or CONFIG_SYS_PCI_
> 
> 	For flash settings CONFIG_FLASH or CONFIG_SYS_FLASH_
> 
> 	For nand settins CONFIG_NAND or CONFIG_SYS_NAND_
> 
> 	For dtt settgins CONFIG_DTT or CONFIG_SYS_DTT
> 
> 	etc...

Please do not do that, as it will interfere with  a  lot  of  already
existing definitions. Stick with CONFIG_SYS_ in general. There may be
some  cases  where  your suggestion makes sense, but these need to be
carefully hand-selected,  i.  e.  this  must  not  be  done  by  some
automatically running script.

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
: ... and it's got weird formatting - Notepad, Write, Works  3  can't
: decipher it, and it's too big to go in DOS Edit. Help!
Install an operating system. :-)                  -- Tom Christiansen

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-02  0:34 ` Wolfgang Denk
@ 2008-09-02  0:59   ` Jean-Christophe PLAGNIOL-VILLARD
  2008-09-13 21:38     ` Luigi 'Comio' Mantellini
  0 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-09-02  0:59 UTC (permalink / raw)
  To: u-boot

> 
> > 	2) Extra config
> > 
> > 	For memory settings CONFIG_MEM_ or CONFIG_SYS_MEM_
> > 
> > 	For PCI settings CONFIG_PCI_ or CONFIG_SYS_PCI_
> > 
> > 	For USB settings CONFIG_USE or CONFIG_SYS_PCI_
> > 
> > 	For flash settings CONFIG_FLASH or CONFIG_SYS_FLASH_
> > 
> > 	For nand settins CONFIG_NAND or CONFIG_SYS_NAND_
> > 
> > 	For dtt settgins CONFIG_DTT or CONFIG_SYS_DTT
> > 
> > 	etc...
> 
> Please do not do that, as it will interfere with  a  lot  of  already
> existing definitions. Stick with CONFIG_SYS_ in general. There may be
> some  cases  where  your suggestion makes sense, but these need to be
> carefully hand-selected,  i.  e.  this  must  not  be  done  by  some
> automatically running script.

As you point this part was plain to be done manually.

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-01 23:56 [U-Boot] [Announce][RFC] CFG_ macro renaming Jean-Christophe PLAGNIOL-VILLARD
  2008-09-02  0:34 ` Wolfgang Denk
@ 2008-09-02  6:19 ` Markus Klotzbücher
  1 sibling, 0 replies; 9+ messages in thread
From: Markus Klotzbücher @ 2008-09-02  6:19 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 02, 2008 at 01:56:24AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:

> 	For USB settings CONFIG_USE or CONFIG_SYS_PCI_

Huh? 

I guess you meant s/USE/USB/ and s/PCI/USB/ ?

Best regards
Markus

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de")

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-02  0:59   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-09-13 21:38     ` Luigi 'Comio' Mantellini
  2008-09-13 21:41       ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 9+ messages in thread
From: Luigi 'Comio' Mantellini @ 2008-09-13 21:38 UTC (permalink / raw)
  To: u-boot

Hi Jean-Christophe,
Hi Wolfgang,

Can you create a "deprecated_cfg.h" file that contains directives like:

#ifdef CFG_OLD_PARAMATER
#error "CFG_OLD_PARAMETER renamed! Use CONIFIG_NEW_PARAMETER instead!"
#endif

for each CFG_* renamed directive?

This should avoid to "lost" some configuration parameters during this 
transitory.phase. this file should be included by common.h for example.

my2cents

best regards,

luigi


Il marted? 02 settembre 2008 02:59:58 Jean-Christophe PLAGNIOL-VILLARD ha 
scritto:
> > > 	2) Extra config
> > >
> > > 	For memory settings CONFIG_MEM_ or CONFIG_SYS_MEM_
> > >
> > > 	For PCI settings CONFIG_PCI_ or CONFIG_SYS_PCI_
> > >
> > > 	For USB settings CONFIG_USE or CONFIG_SYS_PCI_
> > >
> > > 	For flash settings CONFIG_FLASH or CONFIG_SYS_FLASH_
> > >
> > > 	For nand settins CONFIG_NAND or CONFIG_SYS_NAND_
> > >
> > > 	For dtt settgins CONFIG_DTT or CONFIG_SYS_DTT
> > >
> > > 	etc...
> >
> > Please do not do that, as it will interfere with  a  lot  of  already
> > existing definitions. Stick with CONFIG_SYS_ in general. There may be
> > some  cases  where  your suggestion makes sense, but these need to be
> > carefully hand-selected,  i.  e.  this  must  not  be  done  by  some
> > automatically running script.
>
> As you point this part was plain to be done manually.
>
> Best Regards,
> J.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot

-- 
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4
20068 Peschiera Borromeo (MI), Italy
Tel.:  +39 02 5167 2813
Fax:   +39 02 5167 2459
Email: luigi.mantellini at idf-hit.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-13 21:38     ` Luigi 'Comio' Mantellini
@ 2008-09-13 21:41       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-09-13 22:12         ` Luigi 'Comio' Mantellini
  2008-09-13 22:54         ` Wolfgang Denk
  0 siblings, 2 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-09-13 21:41 UTC (permalink / raw)
  To: u-boot

On 23:38 Sat 13 Sep     , Luigi 'Comio' Mantellini wrote:
> Hi Jean-Christophe,
> Hi Wolfgang,
> 
> Can you create a "deprecated_cfg.h" file that contains directives like:
> 
> #ifdef CFG_OLD_PARAMATER
> #error "CFG_OLD_PARAMETER renamed! Use CONIFIG_NEW_PARAMETER instead!"
> #endif
> 
> for each CFG_* renamed directive?
> 
> This should avoid to "lost" some configuration parameters during this 
> transitory.phase. this file should be included by common.h for example.
IMHO, I do not think it's needed due to there is no "lost" possible with this kind of script

git-grep CFG_ | cut -d: -f1 | grep -v -e "CHANGELOG*" | xargs sed -i -e "s:CFG_:CONFIG_SYS_:g"

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-13 21:41       ` Jean-Christophe PLAGNIOL-VILLARD
@ 2008-09-13 22:12         ` Luigi 'Comio' Mantellini
  2008-09-13 22:18           ` Jean-Christophe PLAGNIOL-VILLARD
  2008-09-13 22:54         ` Wolfgang Denk
  1 sibling, 1 reply; 9+ messages in thread
From: Luigi 'Comio' Mantellini @ 2008-09-13 22:12 UTC (permalink / raw)
  To: u-boot

Hi J.

see inline comments.
Il sabato 13 settembre 2008 23:41:55 Jean-Christophe PLAGNIOL-VILLARD ha 
scritto:
> On 23:38 Sat 13 Sep     , Luigi 'Comio' Mantellini wrote:
> > Hi Jean-Christophe,
> > Hi Wolfgang,
> >
> > Can you create a "deprecated_cfg.h" file that contains directives like:
> >
> > #ifdef CFG_OLD_PARAMATER
> > #error "CFG_OLD_PARAMETER renamed! Use CONIFIG_NEW_PARAMETER instead!"
> > #endif
> >
> > for each CFG_* renamed directive?
> >
> > This should avoid to "lost" some configuration parameters during this
> > transitory.phase. this file should be included by common.h for example.
>
> IMHO, I do not think it's needed due to there is no "lost" possible with
> this kind of script
>
> git-grep CFG_ | cut -d: -f1 | grep -v -e "CHANGELOG*" | xargs sed -i -e
> "s:CFG_:CONFIG_SYS_:g"
>

This doesn't apply on CFG_ENV_IS_* / CONFIG_ENV_IS_* macros (for example). and 
I should use this grep/sed only at the end of the macro renaming. I'm speaking 
about the transitory time.

Best regards,

luigi

> Best Regards,
> J.

-- 


?
Luigi Mantellini
R&D - Software
Industrie Dial Face S.p.A.
Via Canzo, 4 
20068 Peschiera Borromeo (MI), Italy
Tel.:?? +39 02 5167 2813
Fax:??? +39 02 5167 2459
E-mail: luigi.mantellini at idf-hit.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-13 22:12         ` Luigi 'Comio' Mantellini
@ 2008-09-13 22:18           ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2008-09-13 22:18 UTC (permalink / raw)
  To: u-boot

> 
>    > > This should avoid to "lost" some configuration parameters during this
> 
>    > > transitory.phase. this file should be included by common.h for
>    example.
> 
>    >
> 
>    > IMHO, I do not think it's needed due to there is no "lost" possible with
> 
>    > this kind of script
> 
>    >
> 
>    > git-grep CFG_ | cut -d: -f1 | grep -v -e "CHANGELOG*" | xargs sed -i -e
> 
>    > "s:CFG_:CONFIG_SYS_:g"
> 
>    >
> 
>    This doesn't apply on CFG_ENV_IS_* / CONFIG_ENV_IS_* macros (for example).
>    and
> 
>    I should use this grep/sed only at the end of the macro renaming. I'm
>    speaking about the transitory time.

The CFG_ENV_ is already renammed into CONFIG_ENV_ and applied in Wolfgang's
tree.

Best Regards,
J.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [Announce][RFC] CFG_ macro renaming
  2008-09-13 21:41       ` Jean-Christophe PLAGNIOL-VILLARD
  2008-09-13 22:12         ` Luigi 'Comio' Mantellini
@ 2008-09-13 22:54         ` Wolfgang Denk
  1 sibling, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2008-09-13 22:54 UTC (permalink / raw)
  To: u-boot

Dear Jean-Christophe PLAGNIOL-VILLARD,

In message <20080913214155.GA32194@game.jcrosoft.org> you wrote:
>
> > Can you create a "deprecated_cfg.h" file that contains directives like:
> > 
> > #ifdef CFG_OLD_PARAMATER
> > #error "CFG_OLD_PARAMETER renamed! Use CONIFIG_NEW_PARAMETER instead!"
> > #endif
> > 
> > for each CFG_* renamed directive?

I think this is a good idea.

> > This should avoid to "lost" some configuration parameters during this 
> > transitory.phase. this file should be included by common.h for example.
> IMHO, I do not think it's needed due to there is no "lost" possible with this kind of script
> 
> git-grep CFG_ | cut -d: -f1 | grep -v -e "CHANGELOG*" | xargs sed -i -e "s:CFG_:CONFIG_SYS_:g"

It may not be needed for code in mainline, but it  is  a  simple  and
efficient  way  to  catch mistakes when someone submits new code that
has been smoldering for some while in some private repository.

It protects against errors, and it doesn't hurt...

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
A wise person makes his  own  decisions,  a  weak  one  obeys  public
opinion.                                           -- Chinese proverb

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-09-13 22:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01 23:56 [U-Boot] [Announce][RFC] CFG_ macro renaming Jean-Christophe PLAGNIOL-VILLARD
2008-09-02  0:34 ` Wolfgang Denk
2008-09-02  0:59   ` Jean-Christophe PLAGNIOL-VILLARD
2008-09-13 21:38     ` Luigi 'Comio' Mantellini
2008-09-13 21:41       ` Jean-Christophe PLAGNIOL-VILLARD
2008-09-13 22:12         ` Luigi 'Comio' Mantellini
2008-09-13 22:18           ` Jean-Christophe PLAGNIOL-VILLARD
2008-09-13 22:54         ` Wolfgang Denk
2008-09-02  6:19 ` Markus Klotzbücher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox