[U-Boot] [PATCH] Add support to mkconfig for setting simple #defines in config.h
Scott Wood
scottwood at freescale.com
Fri Aug 7 21:22:15 CEST 2009
On Fri, Aug 07, 2009 at 09:03:03AM -0500, Kumar Gala wrote:
> while [ $# -gt 0 ] ; do
> case "$1" in
> --) shift ; break ;;
> -a) shift ; APPEND=yes ;;
> -n) shift ; BOARD_NAME="${1%%_config}" ; shift ;;
> + -D) shift ; DEFINES="#define ${1/=/\t}\n"${DEFINES} ; shift ;;
How about something like:
-D) shift ; DEFINES="${1//_/ } ${DEFINES}"; shift ;;
...
for i in ${DEFINES}; do
echo "#define CONFIG_${i}" >> config.h
done
?
This would allow multiple underscore-separated booleans in the target
name.
If we really need values on the options, we could change CONFIG_${i} to
CONFIG_${i/=/\t} similar to what you do above, and embed the "=value" in
the target name (MPC83536DS_NAND_FOO=2_36BIT_BAR=blah ends up defining
NAND, FOO as 2, 36BIT, and BAR as blah). I think simple bools
(MPC8536DS_NAND_36BIT) will be enough until we get kconfig, though.
-Scott
More information about the U-Boot
mailing list