* Re: [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig [not found] <1321625774-12749-1-git-send-email-konrad@gaisler.com> @ 2011-11-18 18:09 ` Randy Dunlap 2011-11-18 22:51 ` konrad.gaisler 0 siblings, 1 reply; 7+ messages in thread From: Randy Dunlap @ 2011-11-18 18:09 UTC (permalink / raw) To: Konrad Eisele Cc: linux-kernel, linux kbuild list, mmarek, pefoley2, yann.morin.1998, sam, zippel (changed linux-config@ to linux-kbuild@vger.kernel.org) On 11/18/2011 06:16 AM, Konrad Eisele wrote: > New kconfig command "subsource": > subsource "<kconfig>" "<cwd>" "<.config>" "<title>" <internal_prefix> <.config_prefix> > Allocates <kconfig> as a configuration subtree using <.config> as the configuration > file to save and load from. <cwd> is the directory path to switch to for "source" to > work, "<title>" is the Menu tile of the subtree, <internal_prefix> is a internal prefix, > and <.config_prefix> is the prefix to append/remove when saving/loading <.config>. That explains what but not why. You need some justification(s) for such a large patch. Maybe even some example usages. > Signed-off-by: Konrad Eisele <konrad@gaisler.com> > --- > scripts/kconfig/conf.c | 6 +- > scripts/kconfig/confdata.c | 83 ++- > scripts/kconfig/expr.h | 16 + > scripts/kconfig/gconf.c | 3 + > scripts/kconfig/lkc.h | 1 + > scripts/kconfig/lkc_proto.h | 12 +- > scripts/kconfig/mconf.c | 13 +- > scripts/kconfig/menu.c | 18 +- > scripts/kconfig/nconf.c | 13 +- > scripts/kconfig/qconf.cc | 3 + > scripts/kconfig/symbol.c | 50 ++- > scripts/kconfig/util.c | 49 ++ > scripts/kconfig/zconf.gperf | 1 + > scripts/kconfig/zconf.hash.c_shipped | 252 +++++----- > scripts/kconfig/zconf.l | 50 ++- > scripts/kconfig/zconf.lex.c_shipped | 52 ++- > scripts/kconfig/zconf.tab.c_shipped | 985 ++++++++++++++++++---------------- > scripts/kconfig/zconf.y | 23 +- > 18 files changed, 991 insertions(+), 639 deletions(-) -- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig 2011-11-18 18:09 ` [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig Randy Dunlap @ 2011-11-18 22:51 ` konrad.gaisler 2011-11-18 22:51 ` Randy Dunlap 2011-11-19 6:23 ` Arnaud Lacombe 0 siblings, 2 replies; 7+ messages in thread From: konrad.gaisler @ 2011-11-18 22:51 UTC (permalink / raw) To: Randy Dunlap Cc: linux-kernel, linux kbuild list, mmarek, pefoley2, yann.morin.1998, sam, zippel On 11/18/2011 07:09 PM, Randy Dunlap wrote: > (changed linux-config@ to linux-kbuild@vger.kernel.org) > > On 11/18/2011 06:16 AM, Konrad Eisele wrote: >> New kconfig command "subsource": >> subsource "<kconfig>""<cwd>""<.config>""<title>"<internal_prefix> <.config_prefix> >> Allocates<kconfig> as a configuration subtree using<.config> as the configuration >> file to save and load from.<cwd> is the directory path to switch to for "source" to >> work, "<title>" is the Menu tile of the subtree,<internal_prefix> is a internal prefix, >> and<.config_prefix> is the prefix to append/remove when saving/loading<.config>. > That explains what but not why. You need some justification(s) for such > a large patch. Maybe even some example usages. The patch originated from a buildsystem that uses buildroot and linux. Both use Kconfig and the buildsystem itself uses Kconfig. To configure a subproject you have to exit the toplevel Kconfig and restart to startup a subproject Kconfig, It is even more anoying when looking inside buildroot. It has in its turn subprojects uClibc, busybox, linux, crosstools-ng which all use Kconfig. The subtree patch does make it possible to unify all in one Kconfig. As an example, apply the patch, then add to <top>/Kconfig the lines: subsource "arch/sparc/Kconfig" "." ".config_sparc" "SPARC config" SPARC_ CONFIG_ subsource "arch/mips/Kconfig" "." ".config_mips" "MIPS config" MIPS_ CONFIG_ (my mailclient breaks up the lines, it should be 2 lines only). Then start "make xconfig" once to build "qconfig". The patch adds an extra option to qconfig (also mconfig, gconfig and nconfig) "-s". This option enables the "subsource" tag. Now start qconfig: $<path-to-qconfig>/qconfig -s Kconfig Then you see a subtree "Sparc config" and "Mips config" that is a sparc and mips complete Kconfig. They are independent from another. The Sparc subtree is saved/loaded from .config_sparc, the Mips subtree is saved/loaded from .config_mips. No namespace clash. Note that without the "-s" option the Kconfig behaviour is as usual. I think it would be a help for many projects that use Kconfig. -- Konrad > >> Signed-off-by: Konrad Eisele<konrad@gaisler.com> >> --- >> scripts/kconfig/conf.c | 6 +- >> scripts/kconfig/confdata.c | 83 ++- >> scripts/kconfig/expr.h | 16 + >> scripts/kconfig/gconf.c | 3 + >> scripts/kconfig/lkc.h | 1 + >> scripts/kconfig/lkc_proto.h | 12 +- >> scripts/kconfig/mconf.c | 13 +- >> scripts/kconfig/menu.c | 18 +- >> scripts/kconfig/nconf.c | 13 +- >> scripts/kconfig/qconf.cc | 3 + >> scripts/kconfig/symbol.c | 50 ++- >> scripts/kconfig/util.c | 49 ++ >> scripts/kconfig/zconf.gperf | 1 + >> scripts/kconfig/zconf.hash.c_shipped | 252 +++++----- >> scripts/kconfig/zconf.l | 50 ++- >> scripts/kconfig/zconf.lex.c_shipped | 52 ++- >> scripts/kconfig/zconf.tab.c_shipped | 985 ++++++++++++++++++---------------- >> scripts/kconfig/zconf.y | 23 +- >> 18 files changed, 991 insertions(+), 639 deletions(-) > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig 2011-11-18 22:51 ` konrad.gaisler @ 2011-11-18 22:51 ` Randy Dunlap 2011-11-19 6:23 ` Arnaud Lacombe 1 sibling, 0 replies; 7+ messages in thread From: Randy Dunlap @ 2011-11-18 22:51 UTC (permalink / raw) To: konrad.gaisler Cc: linux-kernel, linux kbuild list, mmarek, pefoley2, yann.morin.1998, sam, zippel On 11/18/2011 02:51 PM, konrad.gaisler wrote: > On 11/18/2011 07:09 PM, Randy Dunlap wrote: >> (changed linux-config@ to linux-kbuild@vger.kernel.org) >> >> On 11/18/2011 06:16 AM, Konrad Eisele wrote: >>> New kconfig command "subsource": >>> subsource "<kconfig>""<cwd>""<.config>""<title>"<internal_prefix> <.config_prefix> >>> Allocates<kconfig> as a configuration subtree using<.config> as the configuration >>> file to save and load from.<cwd> is the directory path to switch to for "source" to >>> work, "<title>" is the Menu tile of the subtree,<internal_prefix> is a internal prefix, >>> and<.config_prefix> is the prefix to append/remove when saving/loading<.config>. >> That explains what but not why. You need some justification(s) for such >> a large patch. Maybe even some example usages. > The patch originated from a buildsystem that uses buildroot and linux. > Both use Kconfig and the buildsystem itself uses Kconfig. To configure > a subproject you have to exit the toplevel Kconfig and restart to > startup a subproject Kconfig, It is even more anoying when looking > inside buildroot. It has in its turn subprojects uClibc, busybox, > linux, crosstools-ng which all use Kconfig. The subtree patch > does make it possible to unify all in one Kconfig. > > As an example, apply the patch, then add to <top>/Kconfig the lines: > > subsource "arch/sparc/Kconfig" "." ".config_sparc" "SPARC config" SPARC_ CONFIG_ > subsource "arch/mips/Kconfig" "." ".config_mips" "MIPS config" MIPS_ CONFIG_ > (my mailclient breaks up the lines, it should be 2 lines only). > > Then start "make xconfig" once to build "qconfig". The patch adds an > extra option to qconfig (also mconfig, gconfig and nconfig) "-s". This > option enables the "subsource" tag. Now start qconfig: > $<path-to-qconfig>/qconfig -s Kconfig > > Then you see a subtree "Sparc config" and "Mips config" that is a sparc > and mips complete Kconfig. They are independent from another. The Sparc > subtree is saved/loaded from .config_sparc, the Mips subtree is > saved/loaded from .config_mips. No namespace clash. > > Note that without the "-s" option the Kconfig behaviour is as usual. I > think it would be a help for many projects that use Kconfig. OK, thanks for the explanation. -- ~Randy *** Remember to use Documentation/SubmitChecklist when testing your code *** ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig 2011-11-18 22:51 ` konrad.gaisler 2011-11-18 22:51 ` Randy Dunlap @ 2011-11-19 6:23 ` Arnaud Lacombe 2011-11-19 7:52 ` konrad.gaisler 1 sibling, 1 reply; 7+ messages in thread From: Arnaud Lacombe @ 2011-11-19 6:23 UTC (permalink / raw) To: konrad.gaisler Cc: Randy Dunlap, linux-kernel, linux kbuild list, mmarek, pefoley2, yann.morin.1998, sam, zippel Hi, On Fri, Nov 18, 2011 at 5:51 PM, konrad.gaisler <konrad@gaisler.com> wrote: > On 11/18/2011 07:09 PM, Randy Dunlap wrote: >> >> (changed linux-config@ to linux-kbuild@vger.kernel.org) >> >> On 11/18/2011 06:16 AM, Konrad Eisele wrote: >>> >>> New kconfig command "subsource": >>> subsource "<kconfig>""<cwd>""<.config>""<title>"<internal_prefix> >>> <.config_prefix> >>> Allocates<kconfig> as a configuration subtree using<.config> as the >>> configuration >>> file to save and load from.<cwd> is the directory path to switch to for >>> "source" to >>> work, "<title>" is the Menu tile of the subtree,<internal_prefix> is a >>> internal prefix, >>> and<.config_prefix> is the prefix to append/remove when >>> saving/loading<.config>. >> >> That explains what but not why. You need some justification(s) for such >> a large patch. Maybe even some example usages. > > The patch originated from a buildsystem that uses buildroot and linux. > Both use Kconfig and the buildsystem itself uses Kconfig. To configure > a subproject you have to exit the toplevel Kconfig and restart to > startup a subproject Kconfig, It is even more anoying when looking > inside buildroot. It has in its turn subprojects uClibc, busybox, > linux, crosstools-ng which all use Kconfig. The subtree patch > does make it possible to unify all in one Kconfig. > > As an example, apply the patch, then add to <top>/Kconfig the lines: > > subsource "arch/sparc/Kconfig" "." ".config_sparc" "SPARC config" SPARC_ > CONFIG_ > subsource "arch/mips/Kconfig" "." ".config_mips" "MIPS config" MIPS_ CONFIG_ > ETOOMUCHARGUMENT! I wonder if we could not get all these parameters specified dynamically in the Kconfig. This would replace the `mainmenu' entry ala: config title "Linux ..." prefix "CONFIG_" file .config endconfig That way, everytime you parse a tree, you can generate the structure on-the-fly in a non-intrusive manner. I have been thinking of doing something like that with a config file, but doing it in the Kconfig would make much more sense. Btw, what are you calling "<internal_prefix>" ? Thanks, - Arnaud ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig 2011-11-19 6:23 ` Arnaud Lacombe @ 2011-11-19 7:52 ` konrad.gaisler 2011-11-20 13:36 ` Michal Marek 0 siblings, 1 reply; 7+ messages in thread From: konrad.gaisler @ 2011-11-19 7:52 UTC (permalink / raw) To: Arnaud Lacombe Cc: Randy Dunlap, linux-kernel, linux kbuild list, mmarek, pefoley2, yann.morin.1998, sam, zippel On 11/19/2011 07:23 AM, Arnaud Lacombe wrote: > Hi, > > On Fri, Nov 18, 2011 at 5:51 PM, konrad.gaisler<konrad@gaisler.com> wrote: >> On 11/18/2011 07:09 PM, Randy Dunlap wrote: >>> (changed linux-config@ to linux-kbuild@vger.kernel.org) >>> >>> On 11/18/2011 06:16 AM, Konrad Eisele wrote: >>>> New kconfig command "subsource": >>>> subsource "<kconfig>""<cwd>""<.config>""<title>"<internal_prefix> >>>> <.config_prefix> >>>> Allocates<kconfig> as a configuration subtree using<.config> as the >>>> configuration >>>> file to save and load from.<cwd> is the directory path to switch to for >>>> "source" to >>>> work, "<title>" is the Menu tile of the subtree,<internal_prefix> is a >>>> internal prefix, >>>> and<.config_prefix> is the prefix to append/remove when >>>> saving/loading<.config>. >>> That explains what but not why. You need some justification(s) for such >>> a large patch. Maybe even some example usages. >> The patch originated from a buildsystem that uses buildroot and linux. >> Both use Kconfig and the buildsystem itself uses Kconfig. To configure >> a subproject you have to exit the toplevel Kconfig and restart to >> startup a subproject Kconfig, It is even more anoying when looking >> inside buildroot. It has in its turn subprojects uClibc, busybox, >> linux, crosstools-ng which all use Kconfig. The subtree patch >> does make it possible to unify all in one Kconfig. >> >> As an example, apply the patch, then add to<top>/Kconfig the lines: >> >> subsource "arch/sparc/Kconfig" "." ".config_sparc" "SPARC config" SPARC_ >> CONFIG_ >> subsource "arch/mips/Kconfig" "." ".config_mips" "MIPS config" MIPS_ CONFIG_ >> > ETOOMUCHARGUMENT! > > I wonder if we could not get all these parameters specified > dynamically in the Kconfig. This would replace the `mainmenu' entry > ala: > > config > title "Linux ..." > prefix "CONFIG_" > file .config > endconfig Yes maybe it can be done that way. Personally I think it is more difficult. > > That way, everytime you parse a tree, you can generate the structure > on-the-fly in a non-intrusive manner. > > I have been thinking of doing something like that with a config file, > but doing it in the Kconfig would make much more sense. > > Btw, what are you calling "<internal_prefix>" ? It is a left-over of a previous iteration where I was prefixing all symbols to avoid namespace clashes. Now I use the symbol->level field. It can be removed to: subsource "<kconfig>""<cwd>""<.config>""<title>"<.config_prefix> -- Konrad > > Thanks, > - Arnaud > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig 2011-11-19 7:52 ` konrad.gaisler @ 2011-11-20 13:36 ` Michal Marek 2011-11-21 11:03 ` Konrad Eisele 0 siblings, 1 reply; 7+ messages in thread From: Michal Marek @ 2011-11-20 13:36 UTC (permalink / raw) To: konrad.gaisler Cc: Arnaud Lacombe, Randy Dunlap, linux-kernel, linux kbuild list, pefoley2, yann.morin.1998, sam, zippel On 19.11.2011 08:52, konrad.gaisler wrote: > On 11/19/2011 07:23 AM, Arnaud Lacombe wrote: >> On Fri, Nov 18, 2011 at 5:51 PM, konrad.gaisler<konrad@gaisler.com> wrote: >>> As an example, apply the patch, then add to<top>/Kconfig the lines: >>> >>> subsource "arch/sparc/Kconfig" "." ".config_sparc" "SPARC config" SPARC_ >>> CONFIG_ >>> subsource "arch/mips/Kconfig" "." ".config_mips" "MIPS config" MIPS_ CONFIG_ >>> >> ETOOMUCHARGUMENT! >> >> I wonder if we could not get all these parameters specified >> dynamically in the Kconfig. This would replace the `mainmenu' entry >> ala: >> >> config >> title "Linux ..." >> prefix "CONFIG_" >> file .config >> endconfig > Yes maybe it can be done that way. Personally I think it is > more difficult. A <command> <argument> syntax fits well into the existing Kconfig language and it more readable, as you don't have to count the position of the arguments and check their meaning in the documentation. Michal ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig 2011-11-20 13:36 ` Michal Marek @ 2011-11-21 11:03 ` Konrad Eisele 0 siblings, 0 replies; 7+ messages in thread From: Konrad Eisele @ 2011-11-21 11:03 UTC (permalink / raw) To: Michal Marek Cc: Arnaud Lacombe, Randy Dunlap, linux-kernel, linux kbuild list, pefoley2, yann.morin.1998, sam, zippel Michal Marek wrote: > On 19.11.2011 08:52, konrad.gaisler wrote: >> On 11/19/2011 07:23 AM, Arnaud Lacombe wrote: >>> On Fri, Nov 18, 2011 at 5:51 PM, konrad.gaisler<konrad@gaisler.com> wrote: >>>> As an example, apply the patch, then add to<top>/Kconfig the lines: >>>> >>>> subsource "arch/sparc/Kconfig" "." ".config_sparc" "SPARC config" SPARC_ >>>> CONFIG_ >>>> subsource "arch/mips/Kconfig" "." ".config_mips" "MIPS config" MIPS_ CONFIG_ >>>> >>> ETOOMUCHARGUMENT! >>> >>> I wonder if we could not get all these parameters specified >>> dynamically in the Kconfig. This would replace the `mainmenu' entry >>> ala: >>> >>> config >>> title "Linux ..." >>> prefix "CONFIG_" >>> file .config >>> endconfig >> Yes maybe it can be done that way. Personally I think it is >> more difficult. > > A <command> <argument> syntax fits well into the existing Kconfig > language and it more readable, as you don't have to count the position > of the arguments and check their meaning in the documentation. > > Michal > > Ok, I'll do it with "Config" and type "title". It will take a while until I have a new patch... -- Konrad ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-21 11:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1321625774-12749-1-git-send-email-konrad@gaisler.com>
2011-11-18 18:09 ` [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig Randy Dunlap
2011-11-18 22:51 ` konrad.gaisler
2011-11-18 22:51 ` Randy Dunlap
2011-11-19 6:23 ` Arnaud Lacombe
2011-11-19 7:52 ` konrad.gaisler
2011-11-20 13:36 ` Michal Marek
2011-11-21 11:03 ` Konrad Eisele
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).