02 Jul, 2011

3 commits


07 Jun, 2011

2 commits


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

    Ben Hutchings
     

15 Dec, 2010

1 commit


12 Oct, 2010

1 commit


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

    Kyle McMartin
     

20 Sep, 2010

2 commits


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

    Kyle McMartin
     

31 Aug, 2010

1 commit


14 Aug, 2010

1 commit


13 Aug, 2010

1 commit


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

    Sam Ravnborg
     

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 4

    config BAR
    int "bar"
    range 0 FOO

    If 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

    Sam Ravnborg
     
  • 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

    Sam Ravnborg
     
  • 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 .config

    Signed-off-by: Sam Ravnborg
    Cc: Aristeu Rozanski
    Acked-by: Aristeu Rozanski
    Signed-off-by: Michal Marek

    Sam Ravnborg
     
  • 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

    Sam 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
    Signed-off-by: Michal Marek

    Sam Ravnborg
     

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/mconf

    I 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

    Justin P. Mattock
     

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

    Aristeu Rozanski
     

20 Sep, 2009

2 commits


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

    Markus Heidelberg
     

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

    Ingo Molnar
     

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

    zippel@linux-m68k.org
     

05 Aug, 2008

1 commit


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

    Sam 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
    Cc: Roman Zippel

    Sam 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
    Cc: Roman Zippel

    Sam Ravnborg
     

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

    Jan Beulich
     
  • 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

    EGRY Gabor
     
  • 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

    Ladislav Michl
     
  • Sort includes and remove leading whitespace.

    Signed-off-by: Ladislav Michl
    Signed-off-by: Sam Ravnborg
    Cc: Roman Zippel <zippel@linux-m68k.org

    Ladislav Michl
     
  • 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

    Andres Salomon
     

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/94

    Signed-off-by: Paul Mundt
    Cc: Roman Zippel
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mundt
     

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 | 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
    Cc: Roman Zippel
    Cc: Andreas Herrmann
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     

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=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
    Cc: Roman Zippel

    Sam Ravnborg