02 Jul, 2011
3 commits
-
This function has not much reason to be public. In the mean time, convert
declaration from K&R C to ISO C.Signed-off-by: Arnaud Lacombe
-
Signed-off-by: Arnaud Lacombe
-
This variable is not used outside of main() so there is not much reason keeping
it global. Ensure it is initialized as gcc has no way to know that normal
execution path expect only one option switch to be given on the command line
(except when we request help). As a result, we always initialize
`defconfig_file' before using it.Signed-off-by: Arnaud Lacombe
07 Jun, 2011
2 commits
-
This interface is not (and has never been ?) used by any frontend, just get rid
of it.Signed-off-by: Arnaud Lacombe
-
Signed-off-by: Arnaud Lacombe
24 Apr, 2011
1 commit
-
Commit 40aee729b350 ('kconfig: fix default value for choice input')
fixed some cases where kconfig would select the wrong option from a
choice with a single valid option and thus enter an infinite loop.However, this broke the test for user input of the form 'N?', because
when kconfig selects the single valid option the input is zero-length
and the test will read the byte before the input buffer. If this
happens to contain '?' (as it will in a mips build on Debian unstable
today) then kconfig again enters an infinite loop.Signed-off-by: Ben Hutchings
Cc: stable@kernel.org [2.6.17+]
Signed-off-by: Linus Torvalds
15 Dec, 2010
1 commit
-
Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
12 Oct, 2010
1 commit
-
We need to revert the temporary hack in 71ebc01, hence the merge.
10 Oct, 2010
1 commit
-
Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on
if (input_mode == nonint_oldconfig ||
input_mode == oldnoconfig) {
if (input_mode == nonint_oldconfig &&
sym->name &&
!sym_is_choice_value(sym)) {
to avoid oldnoconfig chugging through the else stanza.Fix that to restore expected behaviour (which I've confirmed in the
Fedora kernel build that the configs end up looking the same.)Signed-off-by: Kyle McMartin
Acked-by: Sam Ravnborg
Signed-off-by: Michal Marek
20 Sep, 2010
2 commits
-
Signed-off-by: Arnaud Lacombe
Reviewed-by: Randy Dunlap
Reviewed-by: Sam Ravnborg
Reviewed-by: Michal Marek -
Signed-off-by: Arnaud Lacombe
Reviewed-by: Sam Ravnborg
Reviewed-by: Michal Marek
08 Sep, 2010
1 commit
-
Commit 861b4ea4 broke oldnoconfig when removed the oldnoconfig checks on
if (input_mode == nonint_oldconfig ||
input_mode == oldnoconfig) {
if (input_mode == nonint_oldconfig &&
sym->name &&
!sym_is_choice_value(sym)) {
to avoid oldnoconfig chugging through the else stanza.Fix that to restore expected behaviour (which I've confirmed in the
Fedora kernel build that the configs end up looking the same.)Signed-off-by: Kyle McMartin
Acked-by: Sam Ravnborg
Signed-off-by: Michal Marek
31 Aug, 2010
1 commit
-
NetBSD lacks getopt_long_only() whereas getopt_long() works just fine.
Signed-off-by: Arnaud Lacombe
Acked-by: Sam Ravnborg
Signed-off-by: Michal Marek
14 Aug, 2010
1 commit
-
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
kconfig: Fix warning: ignoring return value of 'fgets'
kconfig: Fix warning: ignoring return value of 'fwrite'
nconfig: Fix segfault when menu is empty
kconfig: fix tristate choice with minimal config
kconfig: fix savedefconfig for tristate choices
13 Aug, 2010
1 commit
-
This fix facilitates fgets() either it returns on success or on error or
when end of file occurs.Signed-off-by: Jean Sacren
Signed-off-by: Michal Marek
07 Aug, 2010
1 commit
-
Linus wrote:
This seems to make "make oldconfig" a _lot_ more verbose than it
used to be. In a very annoying way.I just did a quick git bisect. It's introduced by commit 4062f1a4c030
("kconfig: use long options in conf") by Sam Ravnborg. Apparently that
thing is totally buggy, and doesn't just change the option names, but
actively breaks them.The old behaviour (from years ago) were reintroduced by accident. Fix
this so we are back to the version that are silent if there is nothing
to ask about.Reported-by: Linus Torvalds
Signed-off-by: Sam Ravnborg
Reviewed-by: Michal Marek
Signed-off-by: Linus Torvalds
03 Aug, 2010
5 commits
-
savedefconfig will save a minimal config to a file
named "defconfig".The config symbols are saved in the same order as
they appear in the menu structure so it should
be possible to map them to the relevant menus
if desired.The implementation was tested against several minimal
configs for arm which was created using brute-force.There was one regression related to default numbers
which had their valid range further limited by another symbol.Sample:
config FOO
int "foo"
default 4config BAR
int "bar"
range 0 FOOIf FOO is set to 3 then BAR cannot take a value higher than 3.
But the current implementation will set BAR equal to 4.This is seldomly used and the final configuration is OK,
and the fix was non-trivial.
So it was documented in the code and left as is.Signed-off-by: Sam Ravnborg
Acked-by: Uwe Kleine-König
Signed-off-by: Michal Marek -
alldefconfig create a configuration with all values set
to their default value (form the Kconfig files).This may be useful when we try to use more sensible default
values and may also be used in combination with
the minimal defconfigs.Signed-off-by: Sam Ravnborg
Signed-off-by: Michal Marek -
Rename to a name that better match the other kconfig targets.
listnewconfig shall read as:
- list new options compared to current configuration
New options are now written to stdout so one can redirect the output.
Do not exit with an error code if there is new options.
These are feature changes compared to the original
nonint_oldconfig - but as this feature has not yet been in a
released kernel it should not matter.It is still possible to do:
make listnewconfig
lookup new config options in Kconfig*
edit .configSigned-off-by: Sam Ravnborg
Cc: Aristeu Rozanski
Acked-by: Aristeu Rozanski
Signed-off-by: Michal Marek -
Rename target to something that fall more in line
with the other kconfig targets.oldnoconfig shall read as:
- read the old configuration and set all new options to no
Signed-off-by: Sam Ravnborg
Cc: Aristeu Rozanski
Signed-off-by: Michal Marek -
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
Signed-off-by: Michal Marek
12 Jun, 2010
1 commit
-
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/mconfI get this using gcc 4.6.0 the below change fixes this form me.
Signed-off-by: Justin P. Mattock
Signed-off-by: Michal Marek
02 Jun, 2010
1 commit
-
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 [defunct email]
Whatevered-by: Kyle McMartin
Acked-by: Arjan van de Ven
Acked-by: Randy Dunlap
Signed-off-by: Aristeu Rozanski
[mmarek: whitespace fixes]
Signed-off-by: Michal Marek
20 Sep, 2009
2 commits
-
Warnings found via gcc -Wmissing-prototypes.
Signed-off-by: Trevor Keith
Acked-by: WANG Cong
Signed-off-by: Andrew Morton
Signed-off-by: Sam Ravnborg -
Signed-off-by: Cheng Renquan
Cc: Roman Zippel
Signed-off-by: Sam Ravnborg
10 Jun, 2009
1 commit
-
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
Signed-off-by: Sam Ravnborg
16 Mar, 2009
1 commit
-
'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
Cc: Roman Zippel
[sam: fix for systems where usec is zero - noticed by Geert Uytterhoeven]
Signed-off-by: Sam Ravnborg
29 Sep, 2008
1 commit
-
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
Signed-off-by: Linus Torvalds
05 Aug, 2008
1 commit
-
Always write out .config also in the case where config
did not change.
This fixes: http://bugzilla.kernel.org/show_bug.cgi?id=11230Signed-off-by: Sam Ravnborg
Cc: Josh Boyer
Cc: Adrian Bunk
26 Jul, 2008
3 commits
-
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
Cc: Roman Zippel -
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
Cc: Roman Zippel -
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
Cc: Roman Zippel
29 Jan, 2008
5 commits
-
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
Cc: "Roman Zippel"
Signed-off-by: Sam Ravnborg -
Gettext support for conf.c
[Include locale.h by Kyle].
Signed-off-by: Egry Gabor
Reviewed-by: Sam Ravnborg
Signed-off-by: Sam Ravnborg
Cc: Roman Zippel
Cc: Kyle McMartin -
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
Signed-off-by: Sam Ravnborg
Cc: Roman Zippel -
Sort includes and remove leading whitespace.
Signed-off-by: Ladislav Michl
Signed-off-by: Sam Ravnborg
Cc: Roman Zippel <zippel@linux-m68k.org -
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
Signed-off-by: Sam Ravnborg
Cc: Roman Zippel
24 Dec, 2007
1 commit
-
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/94Signed-off-by: Paul Mundt
Cc: Roman Zippel
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
18 Nov, 2007
1 commit
-
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 | 64bitThe 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
Cc: Roman Zippel
Cc: Andreas Herrmann
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: "H. Peter Anvin"
Signed-off-by: Linus Torvalds
13 Nov, 2007
1 commit
-
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=nTo use this the Kconfig file must use "64BIT" as the
config value to select between 32 and 64 bit.Signed-off-by: Sam Ravnborg
Cc: Roman Zippel