summaryrefslogtreecommitdiffstats
path: root/scripts/config
AgeCommit message (Collapse)AuthorFilesLines
2014-06-10kbuild: trivial - remove trailing empty linesMasahiro Yamada1-1/+0
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-09-13scripts/config: fix variable substitution commandClement Chauplannaz1-1/+1
Commit 229455bc02b87f7128f190c4491b4ceffff38648 accidentally changed the separator between sed `s' command and its parameters from ':' to '/'. Revert this change. Reported-and-tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Clement Chauplannaz <chauplac@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-08-15scripts/config: use sed's POSIX interfaceClement Chauplannaz1-3/+41
Script `config' relies on extensions of `GNU sed', and is thus not working on all Unixes: - in-place edition of files (-i), which can be replaced with a temporary file; - extended-regexps (-r), which can be split into basic regexps; - single-line calls to `a' command, while some implementations require a leading newline before the parameter. Rewrite calls to `sed' to comply with POSIX interface, and move them to helper functions. Signed-off-by: Clement Chauplannaz <chauplac@gmail.com> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2013-07-10Merge branch 'kconfig' of ↵Linus Torvalds1-5/+7
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig updates from Michal Marek: - dependency solver fix for make defconfig - randconfig fixes, one of which had to be reverted again - more user-friendly sorting of search results - hex and range keywords support longs - fix for [mn]conf not to rely on particular behavior of the LINES and COLS variables - cleanup of magic constants in kconfig/lxdialog - [mn]conf formatting fixes - fix for scripts/config's help text in out-of-tree usage (under a different name) * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig: allow "hex" and "range" to support longs Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG kconfig: loop as long as we changed some symbols in randconfig kconfig/[mn]conf: make it explicit in the search box that a regexp is possible kconfig: sort found symbols by relevance kconfig/conf: print the seed used to initialise the RNG for randconfig kconfig/conf: accept a base-16 seed for randconfig kconfig/conf: fix randconfig setting multiple symbols in a choice scripts/config: replace hard-coded script name by a dynamic value mconf/nconf: mark empty menus/menuconfigs different from non-empty ones nconf: use function calls instead of ncurses' variables LINES and COLS mconf: use function calls instead of ncurses' variables LINES and COLS kconfig/lxdialog: handle newline characters in print_autowrap() kconfig/lxdialog: Use new mininimum resize definitions in conf_choice() kconfig/lxdialog: Add definitions for mininimum (re)size values kconfig: Fix defconfig when one choice menu selects options that another choice menu depends on
2013-06-18scripts/config: replace hard-coded script name by a dynamic valueClement Chauplannaz1-5/+7
The script `config' prints its name in usage() function. It is currently hard-coded to value `config'. However, the script may be reused under a different name in contexts other than the Linux Kernel. Replace the hard-coded value `config' by the name of the script at runtime. Signed-off-by: Clement Chauplannaz <chauplac@gmail.com> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2013-05-20scripts/config: fix assignment of parameters for short version of --*-after ↵Clement Chauplannaz1-1/+1
options When --*-after options are used, two parameters are parsed from the command-line before the adequate function is called: - the `before' option, after which the new option will be inserted, - the name of the option to enable/disable/modularise. With the short version of --*-after options (namely -E, -D, -M), the parsing step is not performed which leads to processing unset variables. Add options -E, -D, -M to the test that triggers assignment of parameters for --*-after options. Signed-off-by: Clement Chauplannaz <chauplac@gmail.com> Acked-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2012-12-14scripts/config: Fix wrong "shift" for --keep-caseHiroshi Doyu1-1/+0
Remove wrong "shift" for --keep-case. There is always "shift" at beginning of while-loop. No need "shift" at --keep-case just before "continue" to process next argument. Now the following works as expected: ./scripts/config -e aAa -k -e bBb -e cCc && tail -3 .config CONFIG_AAA=y CONFIG_bBb=y CONFIG_cCc=y Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-07-30Merge branch 'misc' of ↵Linus Torvalds1-16/+44
git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild changes from Michal Marek: "This is the non-critical part of kbuild for v3.6-rc1: - Two new coccinelle semantic patches - New scripts/tags.sh regexp - scripts/config improvements that I mistakenly applied here instead of in the kconfig branch (but there are no conflicts) - Debian packaging fixes" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts/tags.sh: Teach [ce]tags about libtraceeevent error codes scripts/coccinelle: list iterator variable semantic patch scripts/coccinelle: Find threaded IRQs requests which are missing IRQF_ONESHOT deb-pkg: Add all Makefiles to header package deb-pkg: Install linux-firmware-image in versioned dir scripts/config: add option to undef a symbol scripts/config: allow alternate prefix to config option symbol scripts/config: add option to not upper-case symbols
2012-07-26scripts/config: fix double-quotes un-escapingYann E. MORIN1-1/+1
When reporting a string value, only the first double-quote was un-escaped. We need to un-escape all escaped double-quotes. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-06-28scripts/config: add option to undef a symbolYann E. MORIN1-0/+10
It is currently possible to enable, disable or modularise a symbol. Also, an undefined symbol is reported as such. Add a new command to undefine a symbol, by removing the corresponding line from the .config file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-06-28scripts/config: allow alternate prefix to config option symbolYann E. MORIN1-13/+19
While the Linux kernel uses 'CONFIG_' as a prefix to the config options symbols, many projects that use kconfig may use different prefixes, or even none at all. If the CONFIG_ environment variable is set, use it as the prefix (empty is a valid prefix). Otherwise, use the default prefix 'CONFIG_'. This matches the support for alternate prefixes in scripts/kconfig/lkc.h, which uses the same logic (albeit with a C define instead of an environment variable). Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-06-28scripts/config: add option to not upper-case symbolsYann E. MORIN1-3/+15
Currently, scripts/config mangles the config option symbols to always be upper-case. While the Linux kernel almost exclusively uses upper-case symbols, there are still a few symbols with lower-case which this script can not handle: $ grep -r -E '^[[:space:]]*config[[:space:]]+[^[:space:]]*[[:lower:]][^[:space:]=.]*$' . |wc -l 173 (that's roughly 1.3% of the symbols in 3.5-rc1) Eg.: ./arch/arm/Kconfig:config VFPv3 ./arch/powerpc/platforms/Kconfig.cputype:config 40x ./arch/x86/Kconfig:config SCx200HR_TIMER ./drivers/video/console/Kconfig:config FONT_8x8 ./drivers/video/Kconfig:config NTSC_640x480 Also, other projects that use kconfig may allow for lower- or mixed-case symbols, and may find easier to reuse this script than implement each their own (potentially flawed) logic. For such a use-case, see: http://marc.info/?l=linux-kbuild&m=133409932115848&w=2 This patch adds a new option to keep the given case, and keep the current default to upper-case the symbols. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Michal Marek <mmarek@suse.cz>
2012-05-16scripts/config: properly report and set string optionsYann E. MORIN1-4/+7
Currently, scripts/config removes the leading double-quote from string options, but leaves the trailing double-quote. Also, double-quotes in a string are escaped, but scripts/config does not unescape those when printing Finally, scripts/config does not escape double-quotes when setting string options. Eg. the current behavior: $ grep -E '^CONFIG_FOO=' .config CONFIG_FOO="Bar \"Buz\" Meh" $ ./scripts/config -s FOO Bar \"Buz\" Meh" $ ./scripts/config --set-str FOO 'Alpha "Bravo" Charlie' $ grep -E '^CONFIG_FOO=' .config CONFIG_FOO="Alpha "Bravo" Charlie" Fix those three, giving this new behavior: $ grep -E '^CONFIG_FOO=' .config CONFIG_FOO="Bar \"Buz\" Meh" $ ./scripts/config -s FOO Bar "Buz" Meh $ ./scripts/config --set-str FOO 'Alpha "Bravo" Charlie' $ grep -E '^CONFIG_FOO=' .config CONFIG_FOO="Alpha \"Bravo\" Charlie" Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: Andi Kleen <andi@firstfloor.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-12-15kbuild: add numeric --set-val option to scripts/configJonas Aaberg1-2/+9
Add new option to scripts/config for changing .config numeric values Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-11-25Kconfig: fix single letter command in scripts/configAndi Kleen1-1/+1
The one letter commands in scripts/config didn't work and always printed usage. Fix this here. Cc: erick@openchill.org Reported-by: erick@openchill.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-06-14kbuild: add generic --set-str option to scripts/configMichal Marek1-2/+9
Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kbuild: simplify argument loop in scripts/configMichal Marek1-28/+16
Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-14kbuild: handle non-existing options in scripts/configMichal Marek1-18/+18
If an option does not exist in .config, set it at the end of the file. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-14kbuild: print usage with no arguments in scripts/configAndi Kleen1-0/+4
Requested by Sam. Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-01-07kconfig: add script to manipulate .config files on the command lineAndi Kleen1-0/+150
I often change single options in .config files. Instead of using an editor or one of the frontends it's convenient to do this from the command line. It's also useful to do from automated build scripts when building different variants from a base config file. I extracted most of the CONFIG manipulation code from one of my build scripts into a new shell script scripts/config The script is not integrated with the normal Kconfig machinery and doesn't do any checking against Kconfig files, but just manipulates that text format. This is always done at make time anyways. I believe this script would be a useful standard addition for scripts/* Sample usage: ./scripts/config --disable smp Disable SMP in .config file ./scripts/config --file otherdir/.config --module e1000e Enable E1000E as module in otherdir/.config ./scripts/config --state smp y Check state of config option CONFIG_SMP After merging into git please make scripts/config executable Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>