[U-Boot-Users] [PATCH 02/25] include/configs: Use new CONFIG_CMD_* in 82xx board config files.

Jerry Van Baren gerald.vanbaren at smiths-aerospace.com
Thu Jul 5 14:54:40 CEST 2007


Jon Loeliger wrote:
> Signed-off-by: Jon Loeliger <jdl at freescale.com>
> ---
>  include/configs/MPC8260ADS.h |   90 +++++++++++++++++++++--------------------
>  include/configs/MPC8266ADS.h |   70 +++++++++++++++++----------------
>  2 files changed, 82 insertions(+), 78 deletions(-)
> 
> diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h
> index 6195bca..aaecd38 100644
> --- a/include/configs/MPC8260ADS.h
> +++ b/include/configs/MPC8260ADS.h
> @@ -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

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. :-)




More information about the U-Boot mailing list