summaryrefslogtreecommitdiff
path: root/scripts/kconfig/conf.c
AgeCommit message (Collapse)Author
2010-08-03kconfig: use long options in confSam Ravnborg
The list of options supported by conf is growing and their abbreviation did not resemble anything usefull. So drop the single letter options in favour of long options. The long options are named equal to what we know from the make target. The internal implmentation was changed to match this, resulting in much more readable code. Support for short options is dropped - no one is supposed to call this program direct anyway. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-12scripts:conf.c Fix warning: variable 'type' set but not usedJustin P. Mattock
Not sure if this is correct or not, but with make menuconfig HOSTCC scripts/kconfig/conf.o scripts/kconfig/conf.c: In function 'conf_sym': scripts/kconfig/conf.c:159:6: warning: variable 'type' set but not used scripts/kconfig/conf.c: In function 'conf_choice': scripts/kconfig/conf.c:231:6: warning: variable 'type' set but not used HOSTLD scripts/kconfig/mconf I get this using gcc 4.6.0 the below change fixes this form me. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-02kconfig: introduce nonint_oldconfig and loose_nonint_oldconfigAristeu Rozanski
This patch has been around for a long time in Fedora and Red Hat Enterprise Linux kernels and it may be useful for others. The nonint_oldconfig target will fail and print the unset config options while loose_nonint_oldconfig will simply let the config option unset. They're useful in distro kernel packages where the config files are built using a combination of smaller config files. Arjan van de Ven wrote the initial nonint_config and Roland McGrath added the loose_nonint_oldconfig. Signed-off-by: Arjan van de Ven <arjan@redhat.com> [defunct email] Whatevered-by: Kyle McMartin <kyle@redhat.com> Acked-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Aristeu Rozanski <aris@redhat.com> [mmarek: whitespace fixes] Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-09-20kbuild: add static to prototypesTrevor Keith
Warnings found via gcc -Wmissing-prototypes. Signed-off-by: Trevor Keith <tsrk@tsrk.net> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-09-20kconfig: make use of menu_get_ext_help in "make config"Cheng Renquan
Signed-off-by: Cheng Renquan <crquan@gmail.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-06-09kconfig: do not hardcode ".config" filenameMarkus Heidelberg
Rather than hardcoding ".config" use conf_get_configname(), which also respects the environment variable KCONFIG_CONFIG. This fixes "make silentoldconfig" when KCONFIG_CONFIG is used and also suggests the given filename for "Load" and "Save as" in qconf. Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-03-15kconfig: improve seed in randconfigIngo Molnar
'make randconfig' uses glibc's rand function, and the seed of that PRNG is set via: srand(time(NULL)); But 'time()' only increases once every second - freezing the randconfig result within a single second. My Nehalem testbox does randconfig much faster than 1 second and i have a few scripts that do 'randconfig until condition X' loops. Those scripts currently waste a lot of CPU time due to randconfig changing its seed only once per second currently. Change the seed to be micrseconds based. (I checked the statistical spread of the seed - the now.tv_sec*now.tv_usec multiplication there further improves it.) Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Roman Zippel <zippel@linux-m68k.org> [sam: fix for systems where usec is zero - noticed by Geert Uytterhoeven] Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-09-29kconfig: fix silentoldconfigzippel@linux-m68k.org
Recent changes to oldconfig have mixed up the silentoldconfig handling, so this fixes that by clearly separating that special mode, e.g. KCONFIG_NOSILENTUPDATE is only relevant here, the .config is written as needed. This will also properly close Bug 11230. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04kconfig: always write out .configSam Ravnborg
Always write out .config also in the case where config did not change. This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=11230 Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Josh Boyer <jwboyer@linux.vnet.ibm.com> Cc: Adrian Bunk <bunk@kernel.org>
2008-07-25kconfig: make defconfig is no longer chattySam Ravnborg
make defconfig generated a lot of output then noone actually read. Use conf_set_all_new_symbols() to generate the default configuration and avoid the chatty output. A typical run now looks like this: $ make defconfig *** Default configuration is based on 'i386_defconfig' arch/x86/configs/i386_defconfig:13:warning: trying to assign nonexistent symbol SEMAPHORE_SLEEPERS arch/x86/configs/i386_defconfig:176:warning: trying to assign nonexistent symbol PREEMPT_BKL ... arch/x86/configs/i386_defconfig:1386:warning: trying to assign nonexistent symbol INSTRUMENTATION $ As an added benefit we now clearly see the warnings generated in the start of the process. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-07-25kconfig: make oldconfig is now less chattySam Ravnborg
Previously when running "make oldconfig" we saw all the propmt lines from kconfig and noone actully read this. With this patch the user will only see output if there is new symbols. This will be seen as "make oldconfig" runs which does not generate any output. A typical run now looks like this: $ make oldconfig scripts/kconfig/conf -o arch/x86/Kconfig $ If a new symbol is found then we restart the config process like this: $ make oldconfig scripts/kconfig/conf -o arch/x86/Kconfig * * Restart config... * * * General setup * Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] y Local version - append to kernel release (LOCALVERSION) [] ... The bahaviour is similar to what we know when running the implicit oldconfig target "make silentoldconfig". "make silentoldconfig" are run as part of the kernel build process if the configuration has changed. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-07-25kconfig: speed up all*config + randconfigSam Ravnborg
Drop the chatty mode when we generate the all*config, randconfig configurations. Ths speeds up the process considerably and noone looked at the output anyway. This patch uses the conf_set_all_new_symbols() function just added to kconfig. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: tristate choices with mixed tristate and boolean valuesJan Beulich
Change kconfig behavior so that mixing bool and tristate config settings in a choice is possible and has the desired effect of offering just the tristate options individually if the choice gets set to M, and a normal boolean selection if the choice gets set to Y. Also fix scripts/kconfig/conf's handling of children of choice values - there may be more than one immediate child, and all of them need to be processed. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: "Roman Zippel" <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2008-01-28kconfig: gettext support for configEGRY Gabor
Gettext support for conf.c [Include locale.h by Kyle]. Signed-off-by: Egry Gabor <gaboregry1@t-online.hu> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Kyle McMartin <kyle@mcmartin.ca>
2008-01-28kconfig: use C89 random functions in conf.cLadislav Michl
rand and srand functions conform also to C89 in addition to POSIX.1-2001, which makes them a bit more portable (work also on MinGW host). Linux man page also says: "The versions of rand() and srand() in the Linux C Library use the same random number generator as random() and srandom()". * Use C89 conformant functions rand() and srand() Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2008-01-28kconfig: fix whitespace and sort includes in conf.cLadislav Michl
Sort includes and remove leading whitespace. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org
2008-01-28kconfig: use getopt() in conf.c for handling command line argumentsAndres Salomon
Switch from doing our own parsing of command line arguments to using getopt(3) to do it. Aside from simplifying things, this allows us to specify multiple arguments; the old code could only accept two arguments (input_mode and kconfig name). Note some subtle changes: - The argument '-?' is no longer supported. - '-h' is not treated as an error, so output goes to stdout, and we exit with '0'. - There is no compatibility checking amongst arguments; the last option will simply override earlier options. For example, 'conf -n -y foo' is perfectly valid now (input_mode will be set_yes). Previously, that would have been an error ("can't find file -y"). Signed-off-by: Andres Salomon <dilinger@debian.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2007-12-23kconfig: obey KCONFIG_ALLCONFIG choices with randconfig.Paul Mundt
Currently when using KCONFIG_ALLCONFIG with randconfig the choice options are clobbered. As recommended by Roman, this adds an is_new test to see whether to select a new option or obey the existing one. This is a resend of the earlier patch a couple of weeks ago, since there was no reply. Original thread is at http://lkml.org/lkml/2007/11/28/94 Signed-off-by: Paul Mundt <lethal@linux-sh.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-17x86: simplify "make ARCH=x86" and fix kconfig all.configSam Ravnborg
Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in all.config. For a fix the diffstat is nice: 6 files changed, 3 insertions(+), 36 deletions(-) The patch reverts these commits: - 0f855aa64b3f63d35a891510cf7db932a435c116 ("kconfig: add helper to set config symbol from environment variable") - 2a113281f5cd2febbab21a93c8943f8d3eece4d3 ("kconfig: use $K64BIT to set 64BIT with all*config targets") Roman Zippel pointed out that kconfig supported string compares so the additional complexity introduced by the above two patches were not needed. With this patch we have following behaviour: # make {allno,allyes,allmod,rand}config [ARCH=...] option \ host arch | 32bit | 64bit ===================================================== ./. | 32bit | 64bit ARCH=x86 | 32bit | 32bit ARCH=i386 | 32bit | 32bit ARCH=x86_64 | 64bit | 64bit The general rule are that ARCH= and native architecture takes precedence over the configuration. So make ARCH=i386 [whatever] will always build a 32-bit kernel no matter what the configuration says. The configuration will be updated to 32-bit if it was configured to 64-bit and the other way around. This behaviour is consistent with previous behaviour so no suprises here. make ARCH=x86 will per default result in a 32-bit kernel but as the only ARCH= value x86 allow the user to select between 32-bit and 64-bit using menuconfig. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Andreas Herrmann <aherrman@arcor.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-12kconfig: use $K64BIT to set 64BIT with all*config targetsSam Ravnborg
The variable K64BIT can now be used to select the value of CONFIG_64BIT. This is for example useful for powerpc to generate allmodconfig for both bit sizes - like this: make ARCH=powerpc K64BIT=y make ARCH=powerpc K64BIT=n To use this the Kconfig file must use "64BIT" as the config value to select between 32 and 64 bit. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2007-09-01kconfig: oldconfig shall not set symbols if it does not need toRoman Zippel
Avoid setting the value if the symbol doesn't need to be changed or can't be changed. Later choices may change the dependencies and thus the possible input range. make oldconfig from a 2.6.22 .config with CONFIG_HOTPLUG_CPU not set was in some configurations setting CONFIG_HOTPLUG_CPU=y without asking, even when there was no actual requirement for CONFIG_HOTPLUG_CPU. This was triggered by SUSPEND_SMP that does a select HOTPLUG_CPU. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Tested-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2007-07-25kconfig: attach help text to menusSam Ravnborg
Roman Zippel wrote: > A simple example would be > help texts, right now they are per symbol, but they should really be per > menu, so archs can provide different help texts for something. This patch does this and at the same time introduce a few API funtions used to access the help text. The relevant api functions are introduced in the various frontends. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org>
2007-05-02kbuild: be more explicit on missing .config fileRandy Dunlap
Somewhat in reponse to kernel bugzilla #8197, be more explicit about why 'make all' fails when there is no .config file. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-12-13[PATCH] kconfig: new function "bool conf_get_changed(void)"Karsten Wiese
Run "make xconfig" on a freshly untarred kernel-tree. Look at the floppy disk icon of the qt application, that has just started: Its in a normal, active state. Mouse click on it: .config is being saved. This patch series changes things so taht after the mouse click on the floppy disk icon, the icon is greyed out. If you mouse click on it now, nothing happens. If you change some CONFIG_*, the floppy disk icon returns to "active state", that is, if you mouse click it now, .config is written. This patch: Returns sym_change_count to reflect the .config's change state. All read only accesses of sym_change_count are replaced by calls to conf_get_changed() . mconfig.c is manipulated to ask for saving only when conf_get_changed() returned true. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-09kconfig: exit if no beginning filenameRandy Dunlap
If the beginning Kconfig file is missing, config segfaults so it might as well exit after the error message. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-09kconfig: allow loading multiple configurationsRoman Zippel
Extend conf_read_simple() so it can load multiple configurations. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-06-09kconfig: fix .config dependenciesRoman Zippel
This fixes one of the worst kbuild warts left - the broken dependencies used to check and regenerate the .config file. This was done via an indirect dependency and the .config itself had an empty command, which can cause make not to reread the changed .config file. Instead of this we generate now a new file include/config/auto.conf from .config, which is used for kbuild and has the proper dependencies. It's also the main make target now for all files generated during this step (and thus replaces include/linux/autoconf.h). This also means we can now relax the syntax requirements for the .config file and we don't have to rewrite it all the time, i.e. silentoldconfig only writes .config now when it's necessary to keep it in sync with the Kconfig files and even this can be suppressed by setting the environment variable KCONFIG_NOSILENTUPDATE, so the update can (and must) be done manually. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-19[PATCH] config: update usage/help infoRandy Dunlap
Replace outdated help message with a reference to README. Update README for make *config variants and environment variable info. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-11kconfig: revert conf behaviour changeRoman Zippel
After the last patch fixed the real problem, revert this needless behaviour change of conf, which only hid the real problem. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-04-11kconfig: fix default value for choice inputRoman Zippel
The wrong default value can cause conf to end up in endless loop for choice questions. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-08[PATCH] kconf: Check for eof from input stream.Ben Collins
Signed-off-by: Ben Collins <bcollins@ubuntu.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] kconfig: preset config during all*configRoman Zippel
Allow to force setting of config variables during all{no,mod,yes,random}config to a specific value. For that conf first checks the KCONFIG_ALLCONFIG environment variable for a file name, otherwise it checks for all{no,mod,yes,random}.config and all.config. The file is a normal config file, which presets the config variables, but they are still subject to normal dependency checks. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-09[PATCH] kconfig: fix restart for choice symbolsRoman Zippel
The restart check whether new symbols became visible, didn't always work for choice symbols. Even if a choice symbol itself isn't changable, the childs are. This also requires to update the new status of all choice values, once one of them is set. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-25[PATCH] Kill signed charsJ.A. Magallon
scripts/ is full of mismatches between char* params an signed char* arguments, and viceversa. gcc4 now complaints loud about this. Patch below deletes all those 'signed'. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-05[PATCH] Kconfig i18n supportArnaldo Carvalho de Melo
This patch adds i18n support for make *config, allowing users to have the config process in their own language. No printk was harmed in the process, don't worry, so all the bug reports, kernel messages, etc, remain in english, just the user tools to configure the kernel are internationalized. Users not interested in translations can just unset the related LANG, LC_ALL, etc env variables and have the config process in plain english, something like: LANG= make menuconfig is enough for having the whole config process in english. Or just don't install any translation file. Translations for brazilian portuguese are being done by a team of volunteers at: http://www.visionflex.inf.br/kernel_ptbr/pmwiki.php/Principal/Traducoes To start the translation process: make update-po-config This will generate the pot template named scripts/kconfig/linux.pot, copy it to, say, ~/es.po, to start the translation for spanish. To test your translation, as root issue this command: msgfmt -o /usr/share/locale/es/LC_MESSAGES/linux.mo ~/es.po Replace "es" with your language code. Then execute, for instance: make menuconfig The current patch doesn't use any optimization to reduce the size of the generated .mo file, it is possible to use the config option as a key, but this doesn't prevent the current patch from being used or the translations done under the current scheme to be in any way lost if we chose to do any kind of keying. Thanks to Fabricio Vaccari for starting the pt_BR (brazilian portuguese) translation effort, Thiago Maciera for helping me with the gconf.cc (QT frontent) i18n coding and to all the volunteers that are already working on the first translation, to pt_BR. I left the question on whether to ship the translations with the stock kernel sources to be discussed here, please share your suggestions. Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!