[U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
Wolfgang Denk
wd at denx.de
Fri Sep 4 21:42:48 CEST 2009
Dear "Hu Mingkai-B21284",
sorry for the late reply [I have to admit that I kind of loist track
where we are with this discussion - too many diverging statements
found].
In message <73839B4A0818E747864426270AC332C3043F59F0 at zmy16exm20.fsl.freescale.net> you wrote:
>
> How do you think of this method? Or can we handle the different options
> as follows?
>
> MPC8536DS_NAND_config: unconfig
> @echo "" >$(obj)include/config.h;
> @echo "#define CONFIG_$(subst MPC8536DS_,,$(subst
> config,U_BOOT,$@))" \
> > $(obj)include/config.h
> @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale
> @echo "CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@)) = > y"
> \
> >> $(obj)include/config.mk
>
> If there's an orthogonal option, such as 36BIT, we have to handle it
> seperately:
>
> MPC8536DS_NAND_config \
> MPC8536DS_NAND_36BIT_config: unconfig
> @echo "" >$(obj)include/config.h;
> @if [ "$(findstring _36BIT_,$@" ] ; then \
> echo "#define CONFIG_PHYS_64BIT" >>$(obj)include/config.h
> ; \
> fi
> @echo "#define CONFIG_$(subst MPC8536DS_,,$(subst
> config,U_BOOT,$@))" \
> > $(obj)include/config.h
> @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale
> @echo "CONFIG_$(subst MPC8536DS_,,$(subst config,U_BOOT,$@)) = y"
> \
> >> $(obj)include/config.mk
I don't like either of these.
It should be enough to pass the make target name to the mkconfig
script resp. the board config file, i. e. in this case either
"CONFIG_MPC8536DS_NAND" or "CONFIG_MPC8536DS_NAND_36BIT". The rest of
the scripting/decision making can then be done in the board config
file.
If you want to avoid conflicts, feel free to chose a distict prefix,
say CONFIG_MK_* or CONFIG_MAKE_* or so.
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
To get something done, a committee should consist of no more than
three men, two of them absent.
More information about the U-Boot
mailing list