Skip to contentSkip to conversation

include/configs: Use new CONFIG_CMD_* in 82xx board config files.

PATCH New Jon Loeliger 2 participants 4 messages Jul 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 2/25 include/configs: Use new CONFIG_CMD_* in 82xx board config files.

---
 include/configs/MPC8260ADS.h |   90 +++++++++++++++++++++--------------------
 include/configs/MPC8266ADS.h |   70 +++++++++++++++++----------------
 2 files changed, 82 insertions(+), 78 deletions(-)
include/configs/MPC8260ADS.h +46 -44
index 6195bca..aaecd38 100644
@@ -198,59 +198,61 @@
 
 #define CONFIG_BAUDRATE		115200
 
-#define CFG_EXCLUDE		CFG_CMD_BEDBUG	| \
-				CFG_CMD_BMP	| \
-				CFG_CMD_BSP	| \
-				CFG_CMD_DATE	| \
-				CFG_CMD_DISPLAY | \
-				CFG_CMD_DOC	| \
-				CFG_CMD_DTT	| \
-				CFG_CMD_EEPROM	| \
-				CFG_CMD_ELF	| \
-				CFG_CMD_EXT2	| \
-				CFG_CMD_FAT	| \
-				CFG_CMD_FDC	| \
-				CFG_CMD_FDOS	| \
-				CFG_CMD_HWFLOW	| \
-				CFG_CMD_IDE	| \
-				CFG_CMD_KGDB	| \
-				CFG_CMD_MMC	| \
-				CFG_CMD_NAND	| \
-				CFG_CMD_PCMCIA	| \
-				CFG_CMD_REISER	| \
-				CFG_CMD_SCSI	| \
-				CFG_CMD_SPI	| \
-				CFG_CMD_SNTP	| \
-				CFG_CMD_UNIVERSE | \
-				CFG_CMD_USB	| \
-				CFG_CMD_VFD	| \
-				CFG_CMD_XIMG
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_all.h>
+
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_BMP
+#undef CONFIG_CMD_BSP
+#undef CONFIG_CMD_DATE
+#undef CONFIG_CMD_DISPLAY
+#undef CONFIG_CMD_DOC
+#undef CONFIG_CMD_DTT
+#undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_ELF
+#undef CONFIG_CMD_EXT2
+#undef CONFIG_CMD_FAT
+#undef CONFIG_CMD_FDC
+#undef CONFIG_CMD_FDOS
+#undef CONFIG_CMD_HWFLOW
+#undef CONFIG_CMD_IDE
+#undef CONFIG_CMD_KGDB
+#undef CONFIG_CMD_MMC
+#undef CONFIG_CMD_NAND
+#undef CONFIG_CMD_PCMCIA
+#undef CONFIG_CMD_REISER
+#undef CONFIG_CMD_SCSI
+#undef CONFIG_CMD_SPI
+#undef CONFIG_CMD_SNTP
+#undef CONFIG_CMD_UNIVERSE
+#undef CONFIG_CMD_USB
+#undef CONFIG_CMD_VFD
+#undef CONFIG_CMD_XIMG
 
 #if CONFIG_ADSTYPE == CFG_8272ADS
-#define CONFIG_COMMANDS		(CFG_CMD_ALL & ~( \
-			         CFG_CMD_SDRAM	| \
-				 CFG_CMD_I2C	| \
-				 CFG_EXCLUDE	) )
+    #undef CONFIG_CMD_SDRAM
+    #undef CONFIG_CMD_I2C
+
 #elif CONFIG_ADSTYPE >= CFG_PQ2FADS
-#define CONFIG_COMMANDS		(CFG_CMD_ALL & ~( \
-				 CFG_CMD_SDRAM	| \
-				 CFG_CMD_I2C	| \
-				 CFG_CMD_PCI	| \
-				 CFG_EXCLUDE	) )
+    #undef CONFIG_CMD_SDRAM
+    #undef CONFIG_CMD_I2C
+    #undef CONFIG_CMD_PCI
+
 #else
-#define CONFIG_COMMANDS		(CFG_CMD_ALL & ~( \
-				 CMD_CFG_PCI 	| \
-				 CFG_EXCLUDE 	) )
+    #undef CONFIG_CMD_PCI
+
 #endif /* CONFIG_ADSTYPE >= CFG_PQ2FADS */
 
-/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
-#include <cmd_confdefs.h>
+
+
 
 #define CONFIG_BOOTDELAY	5		/* autoboot after 5 seconds */
 #define CONFIG_BOOTCOMMAND	"bootm fff80000"	/* autoboot command */
 #define CONFIG_BOOTARGS		"root=/dev/mtdblock2"
 
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
 #undef	CONFIG_KGDB_ON_SMC		/* define if kgdb on SMC */
 #define CONFIG_KGDB_ON_SCC		/* define if kgdb on SCC */
 #undef	CONFIG_KGDB_NONE		/* define if kgdb on something else */
@@ -268,7 +270,7 @@
 #define CFG_PROMPT_HUSH_PS2 "> "
 #define CFG_LONGHELP			/* undef to save memory	    */
 #define CFG_PROMPT	"=> "		/* Monitor Command Prompt   */
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG & CFG_CMD_KGDB)
 #define CFG_CBSIZE	1024		/* Console I/O Buffer Size  */
 #else
 #define CFG_CBSIZE	256			/* Console I/O Buffer Size  */
@@ -384,7 +386,7 @@
 #endif /* CFG_RAMBOOT */
 
 #define CFG_CACHELINE_SIZE	32	/* For MPC8260 CPU */
-#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
+#if defined(CONFIG_CMD_KGDB)
 #  define CFG_CACHELINE_SHIFT	5	/* log base 2 of the above value */
 #endif
 
include/configs/MPC8266ADS.h +36 -34

98 lines not on this page · raw message

Signature · 1 line
1.5.2.2.249.g45fd
#1 lore raw

PATCH 2/25 include/configs: Use new CONFIG_CMD_* in 82xx board config files.

Quoted 63 lines · Jon Loeliger
---
 include/configs/MPC8260ADS.h |   90 +++++++++++++++++++++--------------------
 include/configs/MPC8266ADS.h |   70 +++++++++++++++++----------------
 2 files changed, 82 insertions(+), 78 deletions(-)
include/configs/MPC8260ADS.h +22 -27
index 6195bca..aaecd38 100644
@@ -198,59 +198,61 @@
 
 #define CONFIG_BAUDRATE		115200
 
-#define CFG_EXCLUDE		CFG_CMD_BEDBUG	| \
-				CFG_CMD_BMP	| \
-				CFG_CMD_BSP	| \
-				CFG_CMD_DATE	| \
-				CFG_CMD_DISPLAY | \
-				CFG_CMD_DOC	| \
-				CFG_CMD_DTT	| \
-				CFG_CMD_EEPROM	| \
-				CFG_CMD_ELF	| \
-				CFG_CMD_EXT2	| \
-				CFG_CMD_FAT	| \
-				CFG_CMD_FDC	| \
-				CFG_CMD_FDOS	| \
-				CFG_CMD_HWFLOW	| \
-				CFG_CMD_IDE	| \
-				CFG_CMD_KGDB	| \
-				CFG_CMD_MMC	| \
-				CFG_CMD_NAND	| \
-				CFG_CMD_PCMCIA	| \
-				CFG_CMD_REISER	| \
-				CFG_CMD_SCSI	| \
-				CFG_CMD_SPI	| \
-				CFG_CMD_SNTP	| \
-				CFG_CMD_UNIVERSE | \
-				CFG_CMD_USB	| \
-				CFG_CMD_VFD	| \
-				CFG_CMD_XIMG
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_all.h>
+
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_BMP
+#undef CONFIG_CMD_BSP
+#undef CONFIG_CMD_DATE
+#undef CONFIG_CMD_DISPLAY
+#undef CONFIG_CMD_DOC
+#undef CONFIG_CMD_DTT
+#undef CONFIG_CMD_EEPROM
+#undef CONFIG_CMD_ELF
+#undef CONFIG_CMD_EXT2
+#undef CONFIG_CMD_FAT
+#undef CONFIG_CMD_FDC
+#undef CONFIG_CMD_FDOS
+#undef CONFIG_CMD_HWFLOW
+#undef CONFIG_CMD_IDE
+#undef CONFIG_CMD_KGDB
+#undef CONFIG_CMD_MMC

include/configs/MPC8260ADS.h line 232

Quoted 10 lines
include/configs/MPC8260ADS.h +10 -0
+#undef CONFIG_CMD_NAND
+#undef CONFIG_CMD_PCMCIA
+#undef CONFIG_CMD_REISER
+#undef CONFIG_CMD_SCSI
+#undef CONFIG_CMD_SPI
+#undef CONFIG_CMD_SNTP
+#undef CONFIG_CMD_UNIVERSE
+#undef CONFIG_CMD_USB
+#undef CONFIG_CMD_VFD
+#undef CONFIG_CMD_XIMG

This isn't your fault, Jon, but the command definition methodology in the 82xx is Very Very Bad[tm].

It is defining *ALL* commands and then selectively undefining specific ones. I tried to rebuild for my 8272ADS board and noticed the build broke because someone added a command which was incompatible with it, and the above methodology picked up the new command by default.

BAD. VERY VERY BAD.

$ grep -l CMD_ALL *
acadia.h
ADNPESC1.h
DK1C20.h
DK1S10.h
ep8260.h
hymod.h
LANTEC.h
MPC8260ADS.h
MPC8266ADS.h
RBC823.h
RPXClassic.h

I added "fix stupid command configuration" to my job jar, but my job jar is pretty full. :-( If someone else has an empty job jar (yeah, that was a joke ;-) and incentive, this would be a profitable cleanup. I contend that the proper configuration would be to use the "normal" command configuration and then add whatever missing "abnormal" ;-) commands are desired. This is a much safer and saner way.

Is there a good reason to have an config_cmd_all.h "all commands" definition? If not, I propose we remove it and _properly_ fix the breakage that ensues.

I would further propose that, assuming Jon is willing, he be authorized to fix the above listed boards with wrongly configured command sets by simply setting their command set to the "normal" command set. If someone is interested in refining the command set back to the original configuration, that someone can submit a patch to do a proper addition/subtraction after Jon fixes the obvious brokenness.

gvb
P.S. Sorry for volunteering you, Jon. Keep up the good work. :-)

#2 lore raw

PATCH 2/25 include/configs: Use new CONFIG_CMD_* in 82xx board config files.

So, like, the other day Jerry Van Baren mumbled:

Quoted 13 lines
Quoted 9 lines
include/configs/MPC8260ADS.h +8 -0
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_all.h>
+
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_BMP
+#undef CONFIG_CMD_BSP

...

Quoted 2 lines

This isn't your fault, Jon, but the command definition methodology in the 82xx is Very Very Bad[tm].

Um, yeah, I saw that too. :-)

Quoted 6 lines

It is defining *ALL* commands and then selectively undefining specific ones. I tried to rebuild for my 8272ADS board and noticed the build broke because someone added a command which was incompatible with it, and the above methodology picked up the new command by default.

BAD. VERY VERY BAD.

So, I've been pretty faithful in following the command selection that is already in the board files so far. As you have noticed, one of the effects of this work is that we get to more easily identify, um, oportunities for improvment...

And yes, I am absolutely relying on _other_ people to test this set of changes! I've been checking some of the PowerPC boards, but that's really all I can do here...

Quoted 6 lines

I added "fix stupid command configuration" to my job jar, but my job jar is pretty full. :-( If someone else has an empty job jar (yeah, that was a joke ;-) and incentive, this would be a profitable cleanup. I contend that the proper configuration would be to use the "normal" command configuration and then add whatever missing "abnormal" ;-) commands are desired. This is a much safer and saner way.

Right. My plan is this:

1) Continue with the remaining board config files I've not converted yet.
2) Drink.
3) Remove uses of CONFIG_COMMAND from the _entire_ rest of the code base.
4) Drink.
5) Cleanup stragglers, fix typos (!), READMEs, etc.
6) Profit.

I would encourage folks to read through their favorite config files in the testing tree and make sure it is sane, compiles, or even boots. If you want to then fix stuff, please submit it against "testing" so we can be pretty sure it is working there before pulling it into the mainline repo.

Quoted 3 lines

Is there a good reason to have an config_cmd_all.h "all commands" definition? If not, I propose we remove it and _properly_ fix the breakage that ensues.

I'm not convinced there is, long term. However, like I said, I am currently doing the straight-forward conversion right now. We can (and should) fix the fallout. I am in favor of removing the "config_cmd_all.h" file. That would be step 5), above.

Quoted 3 lines

I would further propose that, assuming Jon is willing, he be authorized to fix the above listed boards with wrongly configured command sets by simply setting their command set to the "normal" command set.

And in the meantime, patches against the testing repo are welcome too!

Quoted 2 lines

gvb
P.S. Sorry for volunteering you, Jon. Keep up the good work. :-)

I hear you. :-)

jdl

#3 lore raw

PATCH 2/25 include/configs: Use new CONFIG_CMD_* in 82xx board config files.

Quoted 71 lines · Jon Loeliger

So, like, the other day Jerry Van Baren mumbled:

Quoted 12 lines
Quoted 9 lines
include/configs/MPC8260ADS.h +8 -0
+/*
+ * Command line configuration.
+ */
+#include <config_cmd_all.h>
+
+#undef CONFIG_CMD_BEDBUG
+#undef CONFIG_CMD_BMP
+#undef CONFIG_CMD_BSP

...

Quoted 2 lines

This isn't your fault, Jon, but the command definition methodology in the 82xx is Very Very Bad[tm].

Um, yeah, I saw that too. :-)

Quoted 6 lines

It is defining *ALL* commands and then selectively undefining specific ones. I tried to rebuild for my 8272ADS board and noticed the build broke because someone added a command which was incompatible with it, and the above methodology picked up the new command by default.

BAD. VERY VERY BAD.

So, I've been pretty faithful in following the command selection that is already in the board files so far. As you have noticed, one of the effects of this work is that we get to more easily identify, um, oportunities for improvment...

And yes, I am absolutely relying on _other_ people to test this set of changes! I've been checking some of the PowerPC boards, but that's really all I can do here...

Quoted 6 lines

I added "fix stupid command configuration" to my job jar, but my job jar is pretty full. :-( If someone else has an empty job jar (yeah, that was a joke ;-) and incentive, this would be a profitable cleanup. I contend that the proper configuration would be to use the "normal" command configuration and then add whatever missing "abnormal" ;-) commands are desired. This is a much safer and saner way.

Right. My plan is this:

1) Continue with the remaining board config files I've not converted yet.
2) Drink.
3) Remove uses of CONFIG_COMMAND from the _entire_ rest of the code base.
4) Drink.
5) Cleanup stragglers, fix typos (!), READMEs, etc.
6) Profit.

I would encourage folks to read through their favorite config files in the testing tree and make sure it is sane, compiles, or even boots. If you want to then fix stuff, please submit it against "testing" so we can be pretty sure it is working there before pulling it into the mainline repo.

Quoted 3 lines

Is there a good reason to have an config_cmd_all.h "all commands" definition? If not, I propose we remove it and _properly_ fix the breakage that ensues.

I'm not convinced there is, long term. However, like I said, I am currently doing the straight-forward conversion right now. We can (and should) fix the fallout. I am in favor of removing the "config_cmd_all.h" file. That would be step 5), above.

Quoted 3 lines

I would further propose that, assuming Jon is willing, he be authorized to fix the above listed boards with wrongly configured command sets by simply setting their command set to the "normal" command set.

Quoted 8 lines

And in the meantime, patches against the testing repo are welcome too!

Quoted 2 lines

gvb
P.S. Sorry for volunteering you, Jon. Keep up the good work. :-)

I hear you. :-)

jdl

ACK on the "all commands" cleanup being part of Step 5. My proposal would short-circuit the orderly process. :-(

gvb
P.S. I'll split the work with you, I'll do the even steps and you can do the odd steps. ;-)