Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
Wolfgang Denk wrote: >> Would this still be a big problem if the auto-generated defines were put >> in their own namespace (such as the CONFIG_MK_* that you suggested)? > > Probably not a big problem, and maybe not even a practical problem. > But it is still ugly, and nothing I really like. Well, yes -- the long term, less-ugly solution is kconfig. > But as it seems that nobody else cares about this, and I don;t have > any better ideas either, I guess I should not block this. Thanks. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
Dear Scott Wood, In message <20090908202143.ga26...@b07421-ec1.am.freescale.net> you wrote: > On Tue, Sep 08, 2009 at 07:46:29PM +0200, Wolfgang Denk wrote: > > > NAND and 36BIT are orthogonal options -- what is wrong with the previous > > > suggestion of splitting them in mkconfig? > > > > I don't like this idea as it will pollute the namespace by a number of > > uncontrolled auto-generated #defines, which may be a nightmare to > > debug because you quickly forget where such definitions might be > > coming from - after you realize that they are actually set because you > > cannot find them in any board-related config or source file. > > Would this still be a big problem if the auto-generated defines were put > in their own namespace (such as the CONFIG_MK_* that you suggested)? Probably not a big problem, and maybe not even a practical problem. But it is still ugly, and nothing I really like. But as it seems that nobody else cares about this, and I don;t have any better ideas either, I guess I should not block this. 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: w...@denx.de "Once they go up, who cares where they come down? That's not my department." - Werner von Braun ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
On Tue, Sep 08, 2009 at 07:46:29PM +0200, Wolfgang Denk wrote: > > NAND and 36BIT are orthogonal options -- what is wrong with the previous > > suggestion of splitting them in mkconfig? > > I don't like this idea as it will pollute the namespace by a number of > uncontrolled auto-generated #defines, which may be a nightmare to > debug because you quickly forget where such definitions might be > coming from - after you realize that they are actually set because you > cannot find them in any board-related config or source file. Would this still be a big problem if the auto-generated defines were put in their own namespace (such as the CONFIG_MK_* that you suggested)? -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
Dear Scott Wood, In message <20090908153825.ga18...@b07421-ec1.am.freescale.net> you wrote: > > > > #ifdef MPC8536DS_36BIT > > > blablabla > > > #endif > > > > That would be CONFIG_MPC8536DS_NAND etc., but except of that that's > > whaty I mean. > > NAND and 36BIT are orthogonal options -- what is wrong with the previous > suggestion of splitting them in mkconfig? I don't like this idea as it will pollute the namespace by a number of uncontrolled auto-generated #defines, which may be a nightmare to debug because you quickly forget where such definitions might be coming from - after you realize that they are actually set because you cannot find them in any board-related config or source file. There are a number of board names that have an underscore embedded which may or may not indicate such options. Also, such auto-generated symbols may be wrong. For example "omap1610inn_cs_autoboot_config" would auto-generate CONFIG_OMAP1610INN CONFIG_CS CONFIG_AUTOBOOT instead of the expected CONFIG_CS_AUTOBOOT > With more than two orthogonal options, things will get rather silly > trying to list every combination -- and it would be nice if it didn't > matter which order the user specifies the options in. Agreed. Unfortunately I don't have a clever idea how to implement this either. 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: w...@denx.de Always borrow money from a pessimist; they don't expect to be paid back. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
On Mon, Sep 07, 2009 at 02:38:22PM +0200, Wolfgang Denk wrote: > > then in the include/configs/*.h: > > #ifdef MPC8536DS_NAND > > blablabla > > #endif > > > > #ifdef MPC8536DS_NAND_36BIT > > blablabla > > #endif > > > > #ifdef MPC8536DS_36BIT > > blablabla > > #endif > > That would be CONFIG_MPC8536DS_NAND etc., but except of that that's > whaty I mean. NAND and 36BIT are orthogonal options -- what is wrong with the previous suggestion of splitting them in mkconfig? With more than two orthogonal options, things will get rather silly trying to list every combination -- and it would be nice if it didn't matter which order the user specifies the options in. -Scott ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
Dear "Hu Mingkai-B21284", In message <73839b4a0818e747864426270ac332c30447e...@zmy16exm20.fsl.freescale.net> you wrote: > ... [Full quote deleted] ... > > You already know the board name, because the board config=20 > > file is clearly related ot one (or eventually more) boards.=20 > > The rest can be done with some trivial #ifdef'fery. Could you please stop full-quoting? Please see http://www.netmeister.org/news/learn2quote.html > Oh... I complicated the matters, you means as the follows, right? > > In the Makefile: > MPC8536DS_NAND_config \ > MPC8536DS_NAND_36BIT_config \ > MPC8536DS_36BIT_config \ > MPC8536DS_config: unconfig > @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h > @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale Yes, except that the "echo" line should not be needed either, as mkconfig would to that automatically for you. > then in the include/configs/*.h: > #ifdef MPC8536DS_NAND > blablabla > #endif > > #ifdef MPC8536DS_NAND_36BIT > blablabla > #endif > > #ifdef MPC8536DS_36BIT > blablabla > #endif That would be CONFIG_MPC8536DS_NAND etc., but except of that that's whaty I mean. [Eventually it might make sense to ise a common prefix for Maefile generated symbols, like CONFIG_MK_ or so.] > I'll intergate your comments, align the patchset to the latest U-Boot > and resend the patches, please comments then. Thanks. 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: w...@denx.de What about WRITING it first and rationalizing it afterwords? :-) - Larry Wall in <8...@jpl-devvax.jpl.nasa.gov> ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
> -Original Message- > From: Wolfgang Denk [mailto:w...@denx.de] > Sent: Monday, September 07, 2009 6:59 PM > 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", > > In message > <73839b4a0818e747864426270ac332c30447e...@zmy16exm20.fsl.frees > cale.net> you wrote: > > > > > > > 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? > > > > > > No, with "board config file" I mean include/configs/*.h > > > > How can I parse the board name in a header file? > > I'm not sure I understand the question (or rather the problem > you are seeing). > > You already know the board name, because the board config > file is clearly related ot one (or eventually more) boards. > The rest can be done with some trivial #ifdef'fery. > Oh... I complicated the matters, you means as the follows, right? In the Makefile: MPC8536DS_NAND_config \ MPC8536DS_NAND_36BIT_config \ MPC8536DS_36BIT_config \ MPC8536DS_config: unconfig @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h @$(MKCONFIG) -a MPC8536DS ppc mpc85xx mpc8536ds freescale then in the include/configs/*.h: #ifdef MPC8536DS_NAND blablabla #endif #ifdef MPC8536DS_NAND_36BIT blablabla #endif #ifdef MPC8536DS_36BIT blablabla #endif > > If config booting from NAND, we also need to override the > TEXT_BASE in > > the board/*/config.mk file, how could we do that? > > You can for example set CONFIG_SYS_MONITOR_BASE (or some > other CONFIG_ variable - but CONFIG_SYS_MONITOR_BASE is used > anyway) as needed in your include/configs/*.h, which then > gets exported through include/autoconf.mk, so you can use > some "TEXT_BASE = $(CONFIG_SYS_MONITOR_BASE)" in your config.mk > Thanks. I'll intergate your comments, align the patchset to the latest U-Boot and resend the patches, please comments then. Many thanks, Mingkai ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
Dear "Hu Mingkai-B21284", In message <73839b4a0818e747864426270ac332c30447e...@zmy16exm20.fsl.freescale.net> you wrote: > > > > > 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? > > > > No, with "board config file" I mean include/configs/*.h > > How can I parse the board name in a header file? I'm not sure I understand the question (or rather the problem you are seeing). You already know the board name, because the board config file is clearly related ot one (or eventually more) boards. The rest can be done with some trivial #ifdef'fery. > If config booting from NAND, we also need to override the TEXT_BASE > in the board/*/config.mk file, how could we do that? You can for example set CONFIG_SYS_MONITOR_BASE (or some other CONFIG_ variable - but CONFIG_SYS_MONITOR_BASE is used anyway) as needed in your include/configs/*.h, which then gets exported through include/autoconf.mk, so you can use some "TEXT_BASE = $(CONFIG_SYS_MONITOR_BASE)" in your config.mk 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: w...@denx.de If you're not part of the solution, then you're part of the precipi- tate. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
> -Original Message- > From: Wolfgang Denk [mailto:w...@denx.de] > Sent: Monday, September 07, 2009 6:18 PM > 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", > > In message > <73839b4a0818e747864426270ac332c30447e...@zmy16exm20.fsl.frees > cale.net> you wrote: > > > > > 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? > > No, with "board config file" I mean include/configs/*.h > How can I parse the board name in a header file? If config booting from NAND, we also need to override the TEXT_BASE in the board/*/config.mk file, how could we do that? Thanks, Mingkai ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
Dear "Hu Mingkai-B21284", In message <73839b4a0818e747864426270ac332c30447e...@zmy16exm20.fsl.freescale.net> you wrote: > > > 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? No, with "board config file" I mean include/configs/*.h 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: w...@denx.de Q: Why do PCs have a reset button on the front? A: Because they are expected to run Microsoft operating systems. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
> -Original Message- > From: Wolfgang Denk [mailto:w...@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 > <73839b4a0818e747864426270ac332c3043f5...@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: > w...@denx.de To get something done, a committee should consist > of no more than three men, two of them absent. > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [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 <73839b4a0818e747864426270ac332c3043f5...@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: w...@denx.de To get something done, a committee should consist of no more than three men, two of them absent. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
> -Original Message- > From: Kumar Gala [mailto:ga...@kernel.crashing.org] > Sent: Tuesday, August 18, 2009 11:07 PM > To: Wolfgang Denk > Cc: Wood Scott-B07421; U-Boot-Users ML; Hu Mingkai-B21284; > Mike Frysinger > Subject: Re: [PATCH 01/10] mkconfig: parse top level makefile > target to multiple config targets > > > On Aug 18, 2009, at 2:37 AM, Mingkai Hu wrote: > > > To simplify the top level makefile it useful to be able to > paree the > > top level makefile target to multiple individual target, > then put them > > to the config.h and config.mk, leave the board config file > and board > > makefile to handle the different targets. > > --- > > mkconfig | 11 +++ > > 1 files changed, 11 insertions(+), 0 deletions(-) > > I know you are swamped w/ARM.. but if we can make some > progress on this one change it would be useful for 'next'. > > thanks > > - k > Hi Wolfgang, 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 Look forward to your comments. Thanks, Mingkai > > > > diff --git a/mkconfig b/mkconfig > > index b0bbbd1..d9e216d 100755 > > --- a/mkconfig > > +++ b/mkconfig > > @@ -10,12 +10,14 @@ > > > > APPEND=no # Default: Create new config file > > BOARD_NAME="" # Name to print in make output > > +TARGETS="" > > > > while [ $# -gt 0 ] ; do > > case "$1" in > > --) shift ; break ;; > > -a) shift ; APPEND=yes ;; > > -n) shift ; BOARD_NAME="${1%%_config}" ; shift ;; > > + -t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; > > shift ;; > > *) break ;; > > esac > > done > > @@ -72,6 +74,10 @@ echo "BOARD = $4" >> config.mk > > > > [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC= $6" >> config.mk > > > > +for i in ${TARGETS} ; do > > + echo "CONFIG_OPT_${i} = y" >> config.mk ; done > > + > > # > > # Create board specific header file > > # > > @@ -82,6 +88,11 @@ else > > > config.h # Create new config file > > fi > > echo "/* Automatically generated - do not edit */" >>config.h > > + > > +for i in ${TARGETS} ; do > > + echo "#define CONFIG_OPT_${i} 1" >>config.h ; done > > + > > echo "#include " >>config.h echo "#include > > " >>config.h > > > > -- > > 1.5.4 > > > ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
On Aug 18, 2009, at 2:37 AM, Mingkai Hu wrote: > To simplify the top level makefile it useful to be able to paree > the top level makefile target to multiple individual target, then > put them to the config.h and config.mk, leave the board config file > and board makefile to handle the different targets. > --- > mkconfig | 11 +++ > 1 files changed, 11 insertions(+), 0 deletions(-) I know you are swamped w/ARM.. but if we can make some progress on this one change it would be useful for 'next'. thanks - k > > diff --git a/mkconfig b/mkconfig > index b0bbbd1..d9e216d 100755 > --- a/mkconfig > +++ b/mkconfig > @@ -10,12 +10,14 @@ > > APPEND=no # Default: Create new config file > BOARD_NAME="" # Name to print in make output > +TARGETS="" > > while [ $# -gt 0 ] ; do > case "$1" in > --) shift ; break ;; > -a) shift ; APPEND=yes ;; > -n) shift ; BOARD_NAME="${1%%_config}" ; shift ;; > + -t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; > shift ;; > *) break ;; > esac > done > @@ -72,6 +74,10 @@ echo "BOARD = $4" >> config.mk > > [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC= $6" >> config.mk > > +for i in ${TARGETS} ; do > + echo "CONFIG_OPT_${i} = y" >> config.mk ; > +done > + > # > # Create board specific header file > # > @@ -82,6 +88,11 @@ else > > config.h # Create new config file > fi > echo "/* Automatically generated - do not edit */" >>config.h > + > +for i in ${TARGETS} ; do > + echo "#define CONFIG_OPT_${i} 1" >>config.h ; > +done > + > echo "#include " >>config.h > echo "#include " >>config.h > > -- > 1.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 01/10] mkconfig: parse top level makefile target to multiple config targets
To simplify the top level makefile it useful to be able to paree the top level makefile target to multiple individual target, then put them to the config.h and config.mk, leave the board config file and board makefile to handle the different targets. --- mkconfig | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/mkconfig b/mkconfig index b0bbbd1..d9e216d 100755 --- a/mkconfig +++ b/mkconfig @@ -10,12 +10,14 @@ APPEND=no # Default: Create new config file BOARD_NAME="" # Name to print in make output +TARGETS="" while [ $# -gt 0 ] ; do case "$1" in --) shift ; break ;; -a) shift ; APPEND=yes ;; -n) shift ; BOARD_NAME="${1%%_config}" ; shift ;; + -t) shift ; TARGETS="`echo $1 | sed 's:_: :g'` ${TARGETS}" ; shift ;; *) break ;; esac done @@ -72,6 +74,10 @@ echo "BOARD = $4" >> config.mk [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC= $6" >> config.mk +for i in ${TARGETS} ; do + echo "CONFIG_OPT_${i} = y" >> config.mk ; +done + # # Create board specific header file # @@ -82,6 +88,11 @@ else > config.h # Create new config file fi echo "/* Automatically generated - do not edit */" >>config.h + +for i in ${TARGETS} ; do + echo "#define CONFIG_OPT_${i} 1" >>config.h ; +done + echo "#include " >>config.h echo "#include " >>config.h -- 1.5.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot