From: Konrad Eisele <konrad@gaisler.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig
Date: Fri, 18 Nov 2011 08:49:30 +0100 [thread overview]
Message-ID: <4EC60E0A.6090802@gaisler.com> (raw)
In-Reply-To: <1321602124-1761-1-git-send-email-konrad@gaisler.com>
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>.
>
> Signed-off-by: Konrad Eisele <konrad@gaisler.com>
> ---
> Makefile | 8 +-
> support/kconfig/conf.c | 6 +-
> support/kconfig/confdata.c | 100 +++-
> support/kconfig/expr.h | 15 +
> support/kconfig/gconf.c | 3 +
> support/kconfig/lex.zconf.c_shipped | 74 ++-
> support/kconfig/lkc.h | 1 +
> support/kconfig/lkc_proto.h | 5 +
> support/kconfig/mconf.c | 13 +-
> support/kconfig/menu.c | 3 +-
> support/kconfig/nconf.c | 13 +-
> support/kconfig/qconf.cc | 3 +
> support/kconfig/symbol.c | 50 ++-
> support/kconfig/util.c | 55 ++
> support/kconfig/zconf.gperf | 1 +
> support/kconfig/zconf.hash.c_shipped | 145 +++---
> support/kconfig/zconf.l | 50 ++-
> support/kconfig/zconf.tab.c_shipped | 969 ++++++++++++++++++----------------
> support/kconfig/zconf.y | 23 +-
> 19 files changed, 946 insertions(+), 591 deletions(-)
>
This time the patch is only for the "subsource" tag. I implemented "-s" switch (that enables the "subsource" tag)
for mconf, nconf, gconf and qconf.
To test you might want to flatten the Kconfig scripts of for instance busybox, use the script below.
If you create a flattened version in package/busybox/busybox-1.19.x.in you can add i.e.:
subsource "package/busybox/busybox-1.19.x.in" "package/busybox/" "package/busybox/busybox-1.19.x.config" "Busybox 1.19.x configuration" BUSYBOX_ CONFIG_
To get busybox Kconfig as a subtree. (Or you can add the original Kconfig directory hirarchy of course...).
------ flatten.pl -------
#!/usr/bin/perl
flatten($ARGV[0]);
sub readfile {
my ($in) = @_;
usage(\*STDOUT) if (length($in) == 0) ;
open IN, "$in" or die "Reading \"$in\":".$!;
local $/ = undef;
$m = <IN>;
close IN;
return $m;
}
sub flatten {
my ($f) = @_;
foreach my $l (split("\n",readfile($f))) {
if ($l =~ /^\s*source/) {
print ("# -> $l\n");
my $nf = substr($l,length($&));
$nf =~ s/"//g;
flatten($nf);
} else {
print ("$l\n");
}
}
}
next prev parent reply other threads:[~2011-11-18 7:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-17 14:18 [Buildroot] [PATCH 0/2] intro Konrad Eisele
2011-11-17 14:18 ` [Buildroot] [PATCH 1/2] Add a configuration subtree and an execution command to kconfig: Konrad Eisele
2011-11-17 14:18 ` [Buildroot] [PATCH 2/2] Example of how to define a subtree using kconfig tag "subsource": package/busybox/busybox-1.19.x.in is a flattend version of busybox-1.19.3's kconfig scripts (all-in-one). package/busybox/Config.in adds this Kconfig as a subtree to the main configuration tree: subsource "package/busybox/busybox-1.19.x.in" "package/busybox/" "package/busybox/busybox-1.19.x.config" "Busybox 1.19.x configuration" BUSYBOX_ CONFIG_ package/busybox/busybox-1.19.x.config is used as the .config for this subtree. config BR2_BUSYBOX_VERSION_1_19_X has to be selected for the subtree to show up Konrad Eisele
2011-11-17 14:20 ` [Buildroot] [PATCH 1/2] Add a configuration subtree and an execution command to kconfig: Konrad Eisele
2011-11-17 20:09 ` Thomas De Schampheleire
2011-11-18 7:42 ` [Buildroot] [PATCH 1/1] kconfig: Add a configuration subtree command to kconfig Konrad Eisele
2011-11-18 7:49 ` Konrad Eisele [this message]
2011-11-18 9:04 ` [Buildroot] [PATCH 1/1] kconfig: Add "execute" config-type Konrad Eisele
2011-11-17 23:36 ` [Buildroot] [PATCH 0/2] intro Arnout Vandecappelle
2011-11-18 9:30 ` Konrad Eisele
2011-11-18 9:38 ` Thomas De Schampheleire
2011-11-18 10:39 ` Konrad Eisele
2011-11-18 10:46 ` Konrad Eisele
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC60E0A.6090802@gaisler.com \
--to=konrad@gaisler.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox