1. 10 Dec, 2015 1 commit
  2. 09 Apr, 2015 1 commit
  3. 10 Jun, 2014 1 commit
  4. 24 Jun, 2013 1 commit
    • Yann E. MORIN's avatar
      kconfig: loop as long as we changed some symbols in randconfig · 3b9a19e0
      Yann E. MORIN authored
      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<--- choice-in-choice.in
          choice
              bool "A/B/C"
          config A
              bool "A"
      
          config B
              bool "B"
          if B
          choice
              bool "E/F"
          config E
              bool "E"
          config F
              bool "F"
          endchoice
          endif # B
      
          config C
              bool "C"
          endchoice
          ---8<---
      
          $ ./scripts/kconfig/conf --randconfig choice-in-choice.in
          [--SNIP--]
          $ ./scripts/kconfig/conf --silentoldconfig choice-in-choice.in </dev/null
          [--SNIP--]
          A/B/C
            1. A (A)
          > 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: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
      3b9a19e0
  5. 18 Jun, 2013 2 commits
  6. 24 Apr, 2013 1 commit
    • Yann E. MORIN's avatar
      kconfig: allow specifying the seed for randconfig · 0d8024c6
      Yann E. MORIN authored
      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: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
      0d8024c6
  7. 19 Feb, 2013 1 commit
  8. 27 Sep, 2012 1 commit
  9. 31 Aug, 2012 1 commit
  10. 07 May, 2012 1 commit
    • Eric W. Biederman's avatar
      kbuild: all{no,yes,mod,def,rand}config only read files when instructed to. · 9f420bf0
      Eric W. Biederman authored
      Prevent subtle surprises to both people working on the kconfig code
      and people using make allnoconfig allyesconfig allmoconfig and
      randconfig by only attempting to read a config file if
      KCONFIG_ALLCONFIG is set.
      
      Common sense suggests attempting to read the extra config files does
      not make sense unless requested.  The documentation says the code
      won't attempt to read the extra config files unless requested.
      Current usage does not appear to include people depending on the code
      reading the config files without the variable being set So do the
      simple thing and stop reading config files when passed
      all{no,yes,mod,def,rand}config unless KCONFIG_ALLCONFIG environment
      variable is set.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      9f420bf0
  11. 04 May, 2012 1 commit
    • Eric W. Biederman's avatar
      kconfig: Add error handling to KCONFIG_ALLCONFIG · 5efe241e
      Eric W. Biederman authored
      - Only try to read the file specified if KCONFIG_ALL_CONFIG is set to
        something other than the empty string or "1".
      
      - Don't use stat to check the name passed to conf_read_simple so that
        zconf_fopen can find the file in the current directory or in SRCTREE
        removing a extremely source of confusing failure, where KCONFIG_ALL_CONFIG
        was not interpreted with respect to the directory make was called in.
      
      - If conf_read_simple fails complain clearly and stop processing.
        Allowing the simple debugging of typos.
      
      - Clearly document the behavior so it is clear to users which
        values are treated as flags and which values are treated as
        filenames.
      Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      5efe241e
  12. 02 Jul, 2011 3 commits
  13. 06 Jun, 2011 2 commits
  14. 24 Apr, 2011 1 commit
    • Ben Hutchings's avatar
      kconfig: Avoid buffer underrun in choice input · 3ba41621
      Ben Hutchings authored
      Commit 40aee729 ('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: default avatarBen Hutchings <ben@decadent.org.uk>
      Cc: stable@kernel.org [2.6.17+]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      3ba41621
  15. 08 Apr, 2011 1 commit
    • Ben Hutchings's avatar
      kconfig: Avoid buffer underrun in choice input · 466de918
      Ben Hutchings authored
      commit 40aee729 ('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: default avatarBen Hutchings <ben@decadent.org.uk>
      Cc: stable@kernel.org [2.6.17+]
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      466de918
  16. 15 Dec, 2010 1 commit
  17. 09 Oct, 2010 1 commit
  18. 19 Sep, 2010 2 commits
  19. 08 Sep, 2010 1 commit
  20. 31 Aug, 2010 1 commit
  21. 12 Aug, 2010 1 commit
  22. 06 Aug, 2010 1 commit
  23. 03 Aug, 2010 5 commits
    • Sam Ravnborg's avatar
      kconfig: add savedefconfig · 7cf3d73b
      Sam Ravnborg authored
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      7cf3d73b
    • Sam Ravnborg's avatar
      kconfig: add alldefconfig · 0748cb3e
      Sam Ravnborg authored
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      0748cb3e
    • Sam Ravnborg's avatar
      kconfig: change nonint_oldconfig to listnewconfig · 861b4ea4
      Sam Ravnborg authored
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Aristeu Rozanski <aris@redhat.com>
      Acked-by: default avatarAristeu Rozanski <aris@redhat.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      861b4ea4
    • Sam Ravnborg's avatar
      kconfig: rename loose_nonint_oldconfig => oldnoconfig · ef61ca88
      Sam Ravnborg authored
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Aristeu Rozanski <aris@redhat.com>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      ef61ca88
    • Sam Ravnborg's avatar
      kconfig: use long options in conf · 4062f1a4
      Sam Ravnborg authored
      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: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
      4062f1a4
  24. 11 Jun, 2010 1 commit
  25. 02 Jun, 2010 1 commit
  26. 20 Sep, 2009 2 commits
  27. 09 Jun, 2009 1 commit
  28. 15 Mar, 2009 1 commit
    • Ingo Molnar's avatar
      kconfig: improve seed in randconfig · b0fe5510
      Ingo Molnar authored
      '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: default avatarIngo 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: default avatarSam Ravnborg <sam@ravnborg.org>
      b0fe5510
  29. 29 Sep, 2008 1 commit
  30. 04 Aug, 2008 1 commit