CFG_ macro renaming
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.
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 2 lines · In message <[email protected]> you wrote:
As announce during OLS conference, it's plain to
s/plain/planned/
Quoted 9 lines
* 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_".
Quoted 5 lines
to keep
CFG_meaning we will rename them in the following change1) Basic config
For environment we will use
CONFIG_ENV_(will be done this merge windows)
i. e. s/CFG_ENV_/CONFIG_ENV_/g
Quoted 1 line
For configuration settings
CONFIG_SYS_
For *other* configuration settings we will use CONFIG_SYS_, i. e. s/CFG_/CONFIG_SYS_g.
Quoted 8 lines
2) Extra config
For memory settings
CONFIG_MEM_orCONFIG_SYS_MEM_For PCI settings
CONFIG_PCI_orCONFIG_SYS_PCI_For USB settings
CONFIG_USEorCONFIG_SYS_PCI_
Quoted 7 lines
For flash settings
CONFIG_FLASHorCONFIG_SYS_FLASH_For nand settins
CONFIG_NANDorCONFIG_SYS_NAND_For dtt settgins
CONFIG_DTTorCONFIG_SYS_DTTetc...
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
Signature · 6 lines
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
Quoted 15 lines
Quoted 15 lines
2) Extra config
For memory settings
CONFIG_MEM_orCONFIG_SYS_MEM_For PCI settings
CONFIG_PCI_orCONFIG_SYS_PCI_For USB settings
CONFIG_USEorCONFIG_SYS_PCI_For flash settings
CONFIG_FLASHorCONFIG_SYS_FLASH_For nand settins
CONFIG_NANDorCONFIG_SYS_NAND_For dtt settgins
CONFIG_DTTorCONFIG_SYS_DTT
Quoted 7 lines
Quoted 1 line
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.
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:
Quoted 30 lines
Quoted 14 lines
Quoted 14 lines
2) Extra config
For memory settings
CONFIG_MEM_orCONFIG_SYS_MEM_For PCI settings
CONFIG_PCI_orCONFIG_SYS_PCI_For USB settings
CONFIG_USEorCONFIG_SYS_PCI_For flash settings
CONFIG_FLASHorCONFIG_SYS_FLASH_For nand settins
CONFIG_NANDorCONFIG_SYS_NAND_For dtt settgins
CONFIG_DTTorCONFIG_SYS_DTTQuoted 7 lines
Quoted 1 line
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
Signature · 8 lines
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
Quoted 5 lines · Luigi 'Comio' Mantellini
Hi Jean-Christophe,
Hi Wolfgang,Can you create a "
deprecated_cfg.h" file that contains directives like:
Quoted 8 lines
#ifdef
CFG_OLD_PARAMATER
#error "CFG_OLD_PARAMETERrenamed! UseCONIFIG_NEW_PARAMETERinstead!" #endiffor each CFG_* renamed directive?
This should avoid to "lost" some configuration parameters during this transitory.phase. this file should be included by
common.hfor 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.
Hi J.
see inline comments.
Il sabato 13 settembre 2008 23:41:55 Jean-Christophe PLAGNIOL-VILLARD ha scritto:
Quoted 12 lines · Luigi 'Comio' Mantellini
Quoted 11 lines
Hi Jean-Christophe,
Hi Wolfgang,Can you create a "
deprecated_cfg.h" file that contains directives like:#ifdef
CFG_OLD_PARAMATER
#error "CFG_OLD_PARAMETERrenamed! UseCONIFIG_NEW_PARAMETERinstead!" #endiffor each CFG_* renamed directive?
Quoted 9 lines
Quoted 2 lines
This should avoid to "lost" some configuration parameters during this transitory.phase. this file should be included by
common.hfor 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
Quoted 2 lines
Best Regards,
J.
Signature · 9 lines
? 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
Quoted 20 lines
Quoted 4 lines
Quoted 4 lines
This should avoid to "lost" some configuration parameters during this
transitory.phase. this file should be included by
common.hforexample.
Quoted 4 lines
IMHO, I do not think it's needed due to there is no "lost" possible with
Quoted 9 lines
this kind of script
git-grep
CFG_| cut -d: -f1 | grep -v -e "CHANGELOG*" | xargs sed -i -e"s:CFG_:CONFIG_SYS_:g"
Quoted 5 lines
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.
Dear Jean-Christophe PLAGNIOL-VILLARD,
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 8 lines
Can you create a "
deprecated_cfg.h" file that contains directives like:#ifdef
CFG_OLD_PARAMATER
#error "CFG_OLD_PARAMETERrenamed! UseCONIFIG_NEW_PARAMETERinstead!" #endiffor each CFG_* renamed directive?
I think this is a good idea.
Quoted 5 lines
Quoted 2 lines
This should avoid to "lost" some configuration parameters during this transitory.phase. this file should be included by
common.hfor 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
Signature · 5 lines
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
Quoted 1 line · Jean-Christophe PLAGNIOL-VILLARD
For USB settings
CONFIG_USEorCONFIG_SYS_PCI_
Huh?
I guess you meant s/USE/USB/ and s/PCI/USB/ ?
Best regards
Markus
Signature · 3 lines
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")