30 May, 2013

2 commits

  • menu_add_prop() applies upper menus' visibilities to actual prompts
    by AND-ing the prompts visibilities with the upper menus ones.

    This creates a further reference to the menu's visibilities and when
    the expression reduction functions do their work, they may remove or
    modify expressions that have multiple references, thus causing
    unpredictable side-effects.

    The following example Kconfig constructs a case where this causes
    problems: a menu and a prompt which's visibilities depend on the same
    symbol. When invoking mconf with this Kconfig and pressing "Z" we
    see a problem caused by a free'd expression still referenced by the
    menu's visibility:

    ------------------------------------------------------------------------
    mainmenu "Kconfig Testing Configuration"

    config VISIBLE
    def_bool n

    config Placeholder
    bool "Place holder"

    menu "Invisible"
    visible if VISIBLE

    config TEST_VAR
    bool "Test option" if VISIBLE

    endmenu
    ------------------------------------------------------------------------

    This patch fixes this problem by creating copies of the menu's
    visibility expressions before AND-ing them with the prompt's one.

    Signed-off-by: Dirk Gouders
    [yann.morin.1998@free.fr: move variable into its block-scope,
    keep lines
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Dirk Gouders
     
  • When entering an empty dialog, using the movement keys resulted in
    unexpected characters beeing displayed, other keys like "z" and "h"
    did not work as expected.

    This patch handles the movement keys as well as other keys, especially
    "z", "h" and "/".

    Signed-off-by: Dirk Gouders
    [yann.morin.1998@free.fr: keep lines
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Dirk Gouders
     

07 May, 2013

2 commits

  • Pull kconfig updates from Michal Marek:
    - use pkg-config to detect curses libraries
    - clean up the way curses headers are searched
    - Some randconfig fixes, of which one had to be reverted
    - KCONFIG_SEED for randconfig debugging
    - memuconfig memory leak plugged
    - menuconfig > breadcrumbs > navigation
    - xconfig compilation fix
    - Other minor fixes

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kconfig: fix lists definition for C++
    Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"
    kconfig: implement KCONFIG_PROBABILITY for randconfig
    kconfig: allow specifying the seed for randconfig
    kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG
    kconfig: do not override symbols already set
    kconfig: fix randconfig tristate detection
    kconfig/lxdialog: rationalise the include paths where to find {.n}curses{,w}.h
    menuconfig: Add "breadcrumbs" navigation aid
    menuconfig: Fix memory leak introduced by jump keys feature
    merge_config.sh: Avoid creating unnessary source softlinks
    kconfig: optionally use pkg-config to detect ncurses libs
    menuconfig: optionally use pkg-config to detect ncurses libs

    Linus Torvalds
     
  • Searching for PPC_EFIKA results in a segmentation fault, and it's
    because get_symbol_prop() returns NULL.

    In this case CONFIG_PPC_EFIKA is defined in arch/powerpc/platforms/
    52xx/Kconfig, so it won't be parsed if ARCH!=PPC, but menuconfig knows
    this symbol when it parses sound/soc/fsl/Kconfig:

    config SND_MPC52xx_SOC_EFIKA
    tristate "SoC AC97 Audio support for bbplan Efika and STAC9766"
    depends on PPC_EFIKA

    This bug was introduced by commit bcdedcc1afd6 ("menuconfig: print more
    info for symbol without prompts").

    Reported-and-tested-by: Borislav Petkov
    Signed-off-by: Li Zefan
    Tested-by: Libo Chen
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: Michal Marek
    Signed-off-by: Linus Torvalds

    Li Zefan
     

01 May, 2013

1 commit

  • When we search a config symbol, if it has no prompt the position of this
    symbol in the Kconfig file and it's dependencies are not printed. This
    can be inconvenient, especially when it's set to n and we want to find out
    why.

    the following is an example:

    before:

    Symbol: GENERIC_SMP_IDLE_THREAD [=y]
    Type : boolean
    Selected by: X86 [=y]

    after:

    Symbol: GENERIC_SMP_IDLE_THREAD [=y]
    Type : boolean
    Defined at arch/Kconfig:213
    Selected by: X86 [=y]

    Signed-off-by: Weng Meiling
    Signed-off-by: Libo Chen
    Cc: Michal Marek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wengmeiling
     

30 Apr, 2013

3 commits

  • A bug was reported that caused localmodconfig to not keep all the
    dependencies of ATH9K. This was caused by the kconfig file:

    In drivers/net/wireless/ath/Kconfig:

    ---
    if ATH_CARDS

    config ATH_DEBUG
    bool "Atheros wireless debugging"
    ---help---
    Say Y, if you want to debug atheros wireless drivers.
    Right now only ath9k makes use of this.

    source "drivers/net/wireless/ath/ath5k/Kconfig"
    source "drivers/net/wireless/ath/ath9k/Kconfig"
    source "drivers/net/wireless/ath/carl9170/Kconfig"
    source "drivers/net/wireless/ath/ath6kl/Kconfig"
    source "drivers/net/wireless/ath/ar5523/Kconfig"
    source "drivers/net/wireless/ath/wil6210/Kconfig"

    endif
    ---

    The current way kconfig works, it processes new source files after the
    first file is completed. It creates an array of new source config files
    and when the one file is finished, it continues with the next file.

    Unfortunately, this means that it loses the fact that the source file is
    within an "if" statement, and this means that each of these source file's
    configs will not have the proper dependencies set.

    As ATH9K requires ATH_CARDS set, the localmodconfig did not see that
    dependency, and did not enable ATH_CARDS. When the oldconfig was run, it
    forced ATH9K to be disabled.

    Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1304291022320.9234@oneiric

    Cc: stable@vger.kernel.org # 3.8+
    Reported-by: Robert P. J. Day
    Tested-by: Robert P. J. Day
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • When a config for a module is added to the list to save in the final
    config file, add a print to show what dependencies are used. This is
    useful to debug when a config is disabled by the make oldconfig after
    localmodconfig is finished.

    This print only appears if the environment variable LOCALMODCONFIG_DEBUG
    is defined.

    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • The C++ compiler is more strict in that it refuses to assign
    a void* to a struct list_head*.

    Fix that by explicitly casting the poisonning constants.

    (Tested with all 5 frontends, now.)

    Reported-by: Randy Dunlap
    Signed-off-by: "Yann E. MORIN"
    Cc: Randy Dunlap
    Cc: Benjamin Poirier

    Yann E. MORIN
     

27 Apr, 2013

1 commit


25 Apr, 2013

5 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
     
  • For reproducibility, it can be useful to be able to specify the
    seed to use to seed the RNG.

    Add a new KCONFIG_SEED environment variable which can be set to
    the seed to use:
    $ make KCONFIG_SEED=42 randconfig
    $ sha1sum .config
    70a128c8dcc61303069e1be352cce64114dfcbca .config
    $ make KCONFIG_SEED=42 randconfig
    $ sha1sum .config
    70a128c8dcc61303069e1be352cce64114dfcbca .config

    It's very usefull for eg. debugging the kconfig parser.

    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
     

17 Apr, 2013

3 commits

  • The current code does this:

    if [ -f /usr/include/ncursesw/curses.h ]; then
    echo '-I/usr/include/ncursesw -DCURSES_LOC=""'
    elif [ -f /usr/include/ncurses/ncurses.h ]; then
    echo '-I/usr/include/ncurses -DCURSES_LOC=""'
    elif [ -f /usr/include/ncurses/curses.h ]; then
    echo '-I/usr/include/ncurses -DCURSES_LOC=""'
    [...]

    This is merely inconsistent:
    - adding the full path to the directory in the -I directive,
    - especially since that path is already a sub-path of the system
    include path,
    - and then repeating the sub-path in the #include directive.

    Rationalise each include directive:
    - only use the filename in the #include directive,
    - keep the -I directives: they are always searched for before the
    system include path; this ensures the correct header is used.

    Using the -I directives and the filename-only in #include is more in
    line with how pkg-config behaves, eg.:
    $ pkg-config --cflags ncursesw
    -I/usr/include/ncursesw

    This paves the way for using pkg-config for CFLAGS, too, now we use it
    to find the libraries.

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

    Yann E. MORIN
     
  • Displays a trail of the menu entries used to get to the current menu.

    Signed-off-by: Benjamin Poirier
    Tested-by: "Yann E. MORIN"
    [yann.morin.1998@free.fr: small, trivial code re-ordering]
    Signed-off-by: "Yann E. MORIN"

    Benjamin Poirier
     
  • Fixes the memory leak of struct jump_key allocated in get_prompt_str()

    Signed-off-by: Benjamin Poirier
    Tested-by: "Yann E. MORIN"
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"
    Cc: stable@vger.kernel.org

    Benjamin Poirier
     

10 Apr, 2013

1 commit

  • Viresh noticed when using merge_config.sh that a source softlink
    was being created even when he didn't specify the -O option.

    The problem arises due to the previous commit 409f117e2d6b
    which added the -O option. Basically if -O is not specified,
    we still pass '-O=.' to the make command, which then generates
    a source softlink to ./

    This patch adds an extra check so if there is no -O specified
    to merge_config.sh, we don't pass one on to make.

    Cc: Zhangfei Gao
    Cc: Bruce Ashfield
    Acked-by: Darren Hart
    Reported-and-tested-by: Viresh Kumar
    Signed-off-by: John Stultz
    Signed-off-by: Michal Marek

    John Stultz
     

07 Mar, 2013

2 commits

  • When building ncurses with --with-termlib several symbols get moved from
    libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one
    additionally needs to link with libtinfo.so.

    The ncurses pkg-config module will be used to detect the necessary libs for
    linking. If not available the old way of directly specifying libs will be
    used.

    Signed-off-by: Justin Lecher
    [yann.morin.1998@free.fr: fix typo: '-ncurses' --> '-lncurses']
    Tested-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Justin Lecher
     
  • When building ncurses with --with-termlib several symbols get moved from
    libncurses.so to libtinfo.so. Thus when linking with libncurses.so, one
    additionally needs to link with libtinfo.so.

    The ncurses pkg-config module will be used to detect the necessary libs for
    linking. If not available the old heuristic for detection of the ncurses libs
    will be used.

    Signed-off-by: Justin Lecher
    Tested-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Justin Lecher
     

26 Feb, 2013

1 commit


19 Feb, 2013

1 commit

  • According to Documentation/kbuild/kconfig.txt, the commands:

    yes "" | make oldconfig >conf.new
    grep "(NEW)" conf.new

    should list the new config symbols with their default values.
    However, currently there is no line break after each new symbol. When
    kconfig is interactive the user will type a new-line at this point,
    but when non-interactive kconfig must print it.

    Signed-off-by: Ben Hutchings
    Reference: http://bugs.debian.org/636029
    [regid23@nt1.in: Adjusted Ben's work to apply cleanly to this tree]
    Reported-and-tested-by: Regid Ichira
    Reviewed-by: Jonathan Nieder
    Signed-off-by: Michal Marek

    Ben Hutchings
     

09 Feb, 2013

2 commits

  • >From: Roland Eggner

    More reasonable labels of function keys line. Rename labels and keep menu
    width, as required for fitting on COLUMNS=80 terminals:
    • s/Insts/Help 2/
    • s/Config/ShowAll/

    Signed-off-by: Roland Eggner
    Reviewed-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Roland Eggner
     
  • >From: Roland Eggner

    Rewrite all help texts. During several years lazy (incomplete) updates have
    left behind a rather thick layer of dust. Intentions:
    (1) Global help called by should document all _currently_ implemented
    keybindings.
    (2) Different help texts called by resp. should be consistent
    with (1) and with implementation:
    • on plain menu entry
    • in radiolist window
    • in input windows for text, decimal or hexadecimal values
    • in filename selection windows
    • SymSearch specific help called by followed by
    (3) More reasonable window titles:
    Rename window title s/README/Global help/
    Rename variable s/nconf_readme/nconf_global_help/
    Rename window title s/Instructions/Short help/
    (4) Consider which hints are most useful for first-time-users.

    Signed-off-by: Roland Eggner
    Reviewed-by: "Yann E. MORIN"
    [yann.morin.1998@free.fr: a few additional fixes]
    Signed-off-by: "Yann E. MORIN"

    Roland Eggner
     

30 Jan, 2013

1 commit


24 Jan, 2013

1 commit


16 Jan, 2013

2 commits

  • Now we have Load/Save buttons to do the Load/Save
    in the convenient place, so we can drop the
    top-level entries.

    Signed-off-by: Wang YanQing
    Reviewed-by: "Yann E. MORIN"
    Tested-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Wang YanQing
     
  • If menuconfig have Save/Load button like alternative
    .config editors, xconfig, nconfig, etc.We will have
    a obvious benefit when use menuconfig just like
    when we use others, we can Save/Load our .config quickly
    and conveniently.

    This patch add the Save/Load button for menuconfig.

    [remove trailing space while at it for below line:
    "*) Formerly when I used Page Down and Page Up, the cursor would be set"
    ]

    Changes:
    V1-V2:
    1:use PATH_MAX instead of hard code suggested by Yann E. MORIN
    2:drop the spurious empty-line removal suggested by Yann E. MORIN
    V2-V3:
    1:ajust buttons position well centered reported by Yann E. MORIN

    Signed-off-by: Wang YanQing
    Reviewed-by: "Yann E. MORIN"
    Tested-by: "Yann E. MORIN"
    Signed-off-by: "Yann E. MORIN"

    Wang YanQing
     

28 Dec, 2012

1 commit


26 Dec, 2012

1 commit


21 Dec, 2012

1 commit


10 Dec, 2012

1 commit


20 Nov, 2012

6 commits

  • Apply changes from commit 177acf78 (kconfig: Fix malloc handling in conf
    tools) to the _shipped file.

    Signed-off-by: Michal Marek

    Michal Marek
     
  • (and get them out of the noise in the audit work)

    Signed-off-by: Alan Cox
    Signed-off-by: Michal Marek

    Alan Cox
     
  • Currently, the CONFIG_ prefix is hard-coded in the kconfig frontends
    executables. This means that two projects that use kconfig with
    different prefixes can not share the same kconfig frontends.

    Instead of hard-coding the prefix in the frontends, get it from the
    environment, and revert back to hard-coded value if not found.

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

    Yann E. MORIN
     
  • Currently, we get the CONFIG_ prefix via the CONFIG_ macro, which means
    the CONFIG_ prefix is hard-coded at compile time. This goes against
    having a run-time defined CONFIG_ prefix.

    Add a function that returns the CONFIG_ prefix to use (but keep the
    current hard-coded behavior, to be changed in a later patch).

    To avoid touching all the code that uses the CONFIG_ macro, we just
    undef it, and define it to be a call to the function.

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

    Yann E. MORIN
     
  • Having the CONFIG_ prefix in string constants gets in the way of
    using a run-time-defined CONFIG_ prefix.

    Fix that by using temp growable strings (gstr) in which we printf
    the text.

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

    Yann E. MORIN
     
  • The ncurses library allows for extended colors. The support for extended
    colors support depends on wide-character support. ncurses headers
    enable extended colors (NCURSES_EXT_COLORS) only when wide-character
    support is enabled (NCURSES_WIDECHAR).

    The "make menuconfig" uses wide-character ncursesw library, which can be
    compiled with wide-character support, but does not define NCURSES_WIDECHAR
    and it's using headers without wide-character (and extended colors) support.

    This fixes problems with colors on systems with enabled extended colors
    (like PLD Linux). Without this patch "make menuconfig" is hard to use.

    Signed-off-by: Krzysztof Mazur
    Signed-off-by: Michal Marek

    Krzysztof Mazur
     

25 Oct, 2012

1 commit


12 Oct, 2012

1 commit

  • Pull kconfig changes from Michal Marek:
    "kconfig in v3.7 is going to
    - initialize ncurses only once in menuconfig
    - be able to jump to a search result in menuconfig
    - change the misnomer oldnoconfig to a more meaningful name
    olddefconfig, keeping the old name as alias"

    * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
    menuconfig: Assign jump keys per-page instead of globally
    menuconfig: Do not open code textbox scroll up/down
    menuconfig: Add jump keys to search results
    menuconfig: Extend dialog_textbox so that it can return to a scrolled position
    menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses
    menuconfig: Remove superfluous conditionnal
    kconfig: document oldnoconfig to what it really does in conf.c
    kconfig/mconf.c: revision of curses initialization.

    Linus Torvalds