19 Aug, 2015

1 commit


25 Feb, 2015

1 commit


27 Jan, 2015

1 commit


08 Apr, 2014

1 commit

  • "make allnoconfig" exists to ease testing of minimal configurations.
    Documentation/SubmitChecklist includes a note to test with allnoconfig.
    This helps catch missing dependencies on common-but-not-required
    functionality, which might otherwise go unnoticed.

    However, allnoconfig still leaves many symbols enabled, because they're
    hidden behind CONFIG_EMBEDDED or CONFIG_EXPERT. For instance, allnoconfig
    still has CONFIG_PRINTK and CONFIG_BLOCK enabled, so drivers don't
    typically get build-tested with those disabled.

    To address this, introduce a new Kconfig option "allnoconfig_y", used on
    symbols which only exist to hide other symbols. Set it on CONFIG_EMBEDDED
    (which then selects CONFIG_EXPERT). allnoconfig will then disable all the
    symbols hidden behind those.

    Signed-off-by: Josh Triplett
    Tested-by: Paul E. McKenney
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     

16 Aug, 2013

1 commit

  • When a symbol changes type from tristate to bool, and was previously set to
    'm', a subsequent silentoldconfig would warn about inconsistency, such as:

    include/config/auto.conf:3014:warning: symbol value 'm' invalid for
    HOTPLUG_PCI_PCIE

    Seen by Linus with the merge in aa8032b (sequence to reproduce by Michal):
    git checkout 1fe0135
    make mrproper
    make allmodconfig
    make silentoldconfig
    git checkout aa8032b
    make allmodconfig
    make silentoldconfig

    Since HOTPLUG_PCI_PCIE changed from tristate to bool in aa8032b, it was
    previously set to 'm' in auto.conf by the first allmodconfig+silentoldconfig,
    but then was set to 'y' by the second allmodconfig. Then the second
    silentoldconfig prints the warning.

    The warning in this case is a spurious warning, which happens at the time
    kconfig tries to detect symbols that have changed, to touch the empty
    header files in include/config used for dependency-tracking by make.

    Silence the warning when we read the old auto.conf file, since it is
    perfectly legit that a symbol changed type since the previous call.

    Thread in:
    http://marc.info/?l=linux-pci&m=137569198904000&w=2

    Reported-by: Linus Torvalds
    Signed-off-by: "Yann E. MORIN"
    Cc: Linus Torvalds
    Cc: Michal Marek
    Cc: Thomas Petazzoni
    Cc: Bjorn Helgaas
    Cc: Yinghai Lu
    Cc: Benjamin Herrenschmidt

    Yann E. MORIN
     

26 Jun, 2013

1 commit


25 Jun, 2013

2 commits

  • Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG
    is specified.

    For example, given those two files (Thomas' test-case):

    ---8
    Signed-off-by: "Yann E. MORIN"
    Cc: Thomas Petazzoni
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Cc: Sedat Dilek
    Cc: Arnd Bergmann
    Cc: Stephen Rothwell

    ---
    Changes v3 -> v4
    - fix previous issue where some choices would not be set, which would
    cause silentoldconfig to ask for them and was then breaking this
    workflow (as reported by Arnd and Sedat):
    KCONFIG_ALLCONFIG=foo.defconfig make randconfig
    make silentoldconfig /dev/null 2>&1
    make silentoldconfig /dev/null 2>&1 || break
    done
    which did not break at all.
    - change done in v3 (below) is already fixed by a previous patch

    Changes v2 -> v3
    - ensure only one symbol is set in a choice

    Changes v1 -> v2:
    - further postpone setting that a choice has a value until
    one is indeed set
    - do not print symbols that are part of an invisible choice

    Yann E. MORIN
     
  • Because of choice-in-a-choice constructs, it can happen that not all
    symbols are assigned a value during randconfig, leading in rare cases
    to this situation:

    ---8 2. B (B)
    3. C (C)
    choice[1-3]: 2
    E/F
    > 1. E (E) (NEW)
    2. F (F) (NEW)
    choice[1-2]: aborted!

    Console input/output is redirected. Run 'make oldconfig' to update
    configuration.

    Fix this by looping in randconfig for as long as some symbol gets assigned
    a value.

    Note: this was spotted with the USB EHCI Debug Device Gadget (USB_G_DBGP),
    which uses this choice-in-a-choice construct, and exhibits this problem.
    The example above is just a stripped-down minimalist test-case.

    Signed-off-by: "Yann E. MORIN"

    Yann E. MORIN
     

19 Jun, 2013

1 commit

  • Currently, randconfig may set more than one symbol in a given choice.
    Given this config file:
    config A
    bool "A"
    if A
    choice
    bool "B/C/D"
    config B
    bool "B"
    config C
    bool "C"
    config D
    bool "D"
    endchoice
    endif # A

    Then randconfig generates such .config files (case where A is not set is not
    shown below for brevity), and where only the right-most .config is valid:
    CONFIG_A=y CONFIG_A=y CONFIG_A=y
    CONFIG_B=y CONFIG_B=y CONFIG_B=y
    CONFIG_C=y # CONFIG_C is not set # CONFIG_C is not set
    # CONFIG_D is not set CONFIG_D=y # CONFIG_D is not set

    That is, in a randomised choice, the first symbol is always selected,
    and at most one other symbol may be selected.

    This is due to symbol randomised in a choice not being properly flagged
    as having a value.

    Fix that by flagging those symbols adequately: have a user-defined value,
    and be not valid (to force recalculation of the symbol).

    Note: if the choice is not conditional, then the randomisation is properly
    done.

    Reported-by: Matthieu CASTET
    Signed-off-by: Matthieu CASTET
    [yann.morin.1998@free.fr: independently re-done the same patch as Matthieu,
    as pointed out by Sedat]
    Cc: Arnaud Lacombe
    Cc: Sedat Dilek
    Signed-off-by: "Yann E. MORIN"

    Yann E. MORIN
     

16 Jun, 2013

1 commit


27 Apr, 2013

1 commit


25 Apr, 2013

4 commits

  • Currently the odds to set each symbol is (rounded):
    booleans: y: 50% n: 50%
    tristates: y: 33% m: 33% n: 33%

    Introduce a KCONFIG_PROBABILITY environment variable to tweak the
    probabilities (in percentage), as such:
    KCONFIG_PROBABILITY y:n split y:m:n split
    -----------------------------------------------------------------
    [1] unset or empty 50 : 50 33 : 33 : 34
    [2] N N : 100-N N/2 : N/2 : 100-N
    N:M N+M : 100-(N+M) N : M : 100-(N+M)
    N:M:L N : 100-N M : L : 100-(M+L)

    [1] The current behaviour is kept as default, for backward compatibility
    [2] The solution initially implemented by Peter for Buildroot, see:
    http://git.buildroot.org/buildroot/commit/?id=3435c1afb5

    Signed-off-by: Peter Korsgaard
    [yann.morin.1998@free.fr: add to Documentation/]
    Signed-off-by: "Yann E. MORIN"

    Yann E. MORIN
     
  • Currently, randconfig does randomise choice entries, unless KCONFIG_ALLCONFIG
    is specified.

    For example, given those two files (Thomas' test-case):

    ---8
    Signed-off-by: "Yann E. MORIN"
    Cc: Thomas Petazzoni
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Cc: Arnaud Lacombe

    ---
    Changes v2 -> v3
    - ensure only one symbol is set in a choice

    Changes v1 -> v2:
    - further postpone setting that a choice has a value until
    one is indeed set
    - do not print symbols that are part of an invisible choice

    Yann E. MORIN
     
  • For randconfig, if a list of required symbols is specified with
    KCONFIG_ALLCONFIG, such symbols do not "have a value" as per
    sym_has_value(), but have the "valid" flag set.

    Signed-off-by: "Yann E. MORIN"

    Yann E. MORIN
     
  • Because the modules' symbole (CONFIG_MODULES) may not yet be set when
    we check a symbol's tristate capabilty, we'll always find that tristate
    symbols are booleans, even if we randomly decided that to enable modules:
    sym_get_type(sym) always return boolean for tristates when modules_sym
    has not been previously set to 'y' *and* its value calculated *and* its
    visibility calculated, both of which only occur after we randomly assign
    values to symbols.

    Fix that by looking at the raw type of symbols. Tristate set to 'm' will
    be promoted to 'y' when their values will be later calculated.

    Signed-off-by: "Yann E. MORIN"

    Yann E. MORIN
     

14 Jul, 2012

1 commit

  • For some config options (CONFIG_EXTRA_FIRMWARE, for example), the length
    of a config file line can exceed the 1024 byte buffer.

    Switch from fgets to compat_getline to fix. compat_getline is an
    internally implimented getline work-alike for portability purposes.

    Signed-off-by: Cody Schafer
    Signed-off-by: Michal Marek

    Cody Schafer
     

13 Apr, 2012

2 commits


26 Jan, 2012

1 commit

  • Running `oldconfig' after any of the following configuration change:

    either trivial addition, such as:

    config A
    bool "A"

    choice
    prompt "Choice ?"
    depends on A

    config CHOICE_B
    bool "Choice B"

    config CHOICE_C
    bool "Choice C"
    endchoice

    or more tricky change:

    OLD KCONFIG | NEW KCONFIG
    |
    | config A
    | bool "A"
    |
    choice | choice
    prompt "Choice ?" | prompt "Choice ?"
    |
    config CHOICE_C | config CHOICE_C
    bool "Choice C" | bool "Choice C"
    |
    config CHOICE_D | config CHOICE_D
    bool "Choice D" | bool "Choice D"
    endchoice |
    | config CHOICE_E
    | bool "Choice E"
    | depends on A
    | endchoice

    will not cause the choice to be considered as NEW, and thus not be
    asked. The cause of this behavior is that choice's novelty are computed
    statically right after the saved configuration has been read. At this
    point, the new dependency's value is still unknown and asserted to be
    `no'. Moreover, no update to this decision is made afterward.

    Correct this by dynamically evaluating a choice's novelty, and removing the
    static evaluation.

    Reported-and-tested-by: Uwe Kleine-König
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     

19 Dec, 2011

1 commit

  • Use the xfwrite wrapper function defined in lkc.h to check the return value of
    fwrite and silence these warnings.

    HOSTCC scripts/kconfig/zconf.tab.o
    scripts/kconfig/zconf.tab.c: In function 'header_print_comment':
    /usr/src/lto/scripts/kconfig/confdata.c:551:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result
    scripts/kconfig/zconf.tab.c: In function 'kconfig_print_comment':
    /usr/src/lto/scripts/kconfig/confdata.c:467:10: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result

    Signed-off-by: Peter Foley
    Signed-off-by: Michal Marek

    Peter Foley
     

30 Aug, 2011

1 commit


30 Jul, 2011

1 commit

  • Replace the config_is_*() macros with a variant that allows for grepping
    for usage of CONFIG_* options in the code. Usage:

    if (IS_ENABLED(CONFIG_NUMA))

    or

    #if IS_ENABLED(CONFIG_NUMA)

    The IS_ENABLED() macro evaluates to 1 if the argument is set (to either 'y'
    or 'm'), IS_BUILTIN() tests if the option is 'y' and IS_MODULE() test if
    the option is 'm'. Only boolean and tristate options are supported.

    Reviewed-by: Arnaud Lacombe
    Acked-by: Randy Dunlap
    Signed-off-by: Michal Marek

    Michal Marek
     

18 Jul, 2011

1 commit

  • The specialized printer for headers (espectially autoconf.h) is missing
    fixup code for S_HEX symbol's "0x" prefix. As long as kconfig does not
    warn for such missing prefix, this code is needed. Fix this.

    In the same time, fix some nits in `header_print_symbol()'.

    Cc: Randy Dunlap
    Cc: Mauro Carvalho Chehab

    Broken-by: Arnaud Lacombe
    Reported-by: Randy Dunlap
    Reported-by: Mauro Carvalho Chehab
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Randy Dunlap
    Signed-off-by: Arnaud Lacombe
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     

01 Jul, 2011

1 commit

  • Make conf_write_symbol() grammar agnostic to be able to use it from different
    code path. These path pass a printer callback which will print a symbol's name
    and its value in different format.

    conf_write_symbol()'s job become mostly only to prepare a string for the
    printer. This avoid to have to pass specialized flag to generic
    functions

    Signed-off-by: Arnaud Lacombe
    [mmarek: rebased on top of de12518 (kconfig: autogenerated config_is_xxx
    macro)]
    Signed-off-by: Michal Marek

    Arnaud Lacombe
     

09 Jun, 2011

1 commit


07 Jun, 2011

4 commits


25 May, 2011

1 commit


24 May, 2011

2 commits


17 May, 2011

1 commit

  • this will allow to use to use

    if(config_is_xxx())
    if(config_is_xxx_module())

    in the code instead of

    #ifdef CONFIG_xxx
    #ifdef CONFIG_xxx_MODULE

    and now let the compiler remove the non usefull code and not the
    pre-processor

    as done in the mach-types for arm as exmaple

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
    Acked-by: Andi Kleen
    Signed-off-by: Michal Marek

    Jean-Christophe PLAGNIOL-VILLARD
     

18 Apr, 2011

1 commit


15 Dec, 2010

3 commits


28 Oct, 2010

1 commit


04 Oct, 2010

1 commit


01 Oct, 2010

1 commit

  • commit 8baefd30b5b0101aa07aa75da44a9eee881eed28 of linux-next replaced
    a `switch()' statement with some `if()' statements, but left `break's
    in the `switch()' statement untouched. This cause read config loop to
    exit and so "make oldconfig" is not much usable (see below).

    > $ make oldconfig
    >
    > scripts/kconfig/conf --oldconfig Kconfig
    > #
    > # using defaults found in /boot/config-2.6.34-ccs-r1
    > #
    > *
    > * Restart config...
    > *
    > *
    > * General setup
    > *
    > Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] (NEW)

    (I've already have "CONFIG_EXPERIMENTAL=y" in the old config file. But
    that's not read here.)

    This patch should fix this problem.

    Signed-off-by: Naohiro Aota
    Signed-off-by: Michal Marek

    Naohiro Aota