[U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets

Hu Mingkai-B21284 Mingkai.Hu at freescale.com
Mon Sep 7 10:54:17 CEST 2009


 

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de] 
> Sent: Saturday, September 05, 2009 3:43 AM
> To: Hu Mingkai-B21284
> Cc: Kumar Gala; Wood Scott-B07421; U-Boot-Users ML; Mike Frysinger
> Subject: Re: [PATCH 01/10] mkconfig: parse top level makefile 
> target to multiple config targets
> 
> 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.frees
> cale.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.
> 

Thanks for your replay, but I'm not totally catch on you.
"the board config file" in your words refer to board/*/config.mk, right?
If yes, in the config.mk file we parse the board config name to tell
the file include/configs/MPC8536DS.h what config we have, such as,
36BIT, boot from NAND, etc, but how can I implement this?

I try to use echo in config.mk to put the macro definition to the file
include/config.h,
but it complains the following errors:
"*** commands commence before first target.  Stop."

> 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