1. 17 8月, 2010 1 次提交
  2. 15 8月, 2010 1 次提交
    • S
      kconfig: fix savedefconfig with choice marked optional · 84062dd3
      Sam Ravnborg 提交于
      savedefconfig failed to save the correct minimal config
      when it encountered a choice marked optional.
      
      Consider following minimal configuration:
      $cat Kconfig
      choice
      	prompt "choice"
      	optional
      
      config A
      	bool "a"
      
      config B
      	bool "b"
      
      endchoice
      
      $cat .config | grep -v ^#
      CONFIG_A=y
      
      $conf --savedefconfig=defconfig Kconfig
      
      would before this fix result in an empty file, because
      kconfig would assume that CONFIG_A=y is a default value.
      But because the choice is optional the default is that
      both A and B are =n.
      
      Fix so we handle optional choices correct.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      84062dd3
  3. 13 8月, 2010 1 次提交
  4. 12 8月, 2010 2 次提交
    • S
      kconfig: fix tristate choice with minimal config · a64b44ea
      Sam Ravnborg 提交于
      If a minimal config did not specify the value
      of all choice values, the resulting configuration
      could have wrong values.
      
      Consider following example:
      config M
              def_bool y
              option modules
      choice
              prompt "choice list"
      config A
              tristate "a"
      config B
      	tristate "b"
      endchoice
      
      With a defconfig like this:
      CONFIG_M=y
      CONFIG_A=y
      
      The resulting configuration would have
      
          CONFIG_A=m
      
      which was unexpected.
      
      The problem was not not all choice values were set and thus
      kconfig calculated a wrong value.
      
      The fix is to set all choice values when we
      read a defconfig files.
      
      conf_set_all_new_symbols() is refactored such that
      random choice values are now handled by a dedicated function.
      And new choice values are set by set_all_choice_values().
      
      This was not the minimal fix, but the fix that resulted
      in the most readable code.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Reported-by: NArve Hjønnevåg <arve@android.com>
      Tested-by: NArve Hjønnevåg <arve@android.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      a64b44ea
    • S
      kconfig: fix savedefconfig for tristate choices · 801690ca
      Sam Ravnborg 提交于
      savedefconfig failed to save choice symbols equal to 'y'
      for tristate choices.
      This resulted in this value being lost.
      
      In particular is fixes an issue where
      
      	make ARCH=avr32 atngw100_defconfig
      	make ARCH=avr32 savedefconfig
      	cp defconfig arch/avr32/configs/atngw100_defconfig
      	make ARCH=avr32 atngw100_defconfig
      	diff -u .config .config.old
      
      failed to produce an identical .config.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      801690ca
  5. 03 8月, 2010 2 次提交
    • S
      kconfig: add savedefconfig · 7cf3d73b
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      7cf3d73b
    • S
      kconfig: code refactoring in confdata.c · 49192f26
      Sam Ravnborg 提交于
      Add a a few local functions to avoid some code duplication
      No functional changes.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      49192f26
  6. 29 7月, 2010 1 次提交
    • U
      kconfig: fix MODULES-related bug in case of no .config · ac1ffde1
      Ulf Magnusson 提交于
      There seems to be a kconfig bug due to MODULES not always being
      evaluated if no .config is found. Take the following Kconfig as an
      example:
      
      config MODULES
      	def_bool y
      
      config FOO
      	def_tristate m
      
      With no .config, the following configuration is generated:
      
      CONFIG_MODULES=y
      CONFIG_FOO=y
      
      With an empty .config, the following:
      
      CONFIG_MODULES=y
      CONFIG_FOO=m
      
      Tristate choice statements can also exhibit the problem, due to having an
      implicit rev_dep (select) containing "m".
      
      The problem is that MODULES is never evaluted in conf_read_simple() unless
      there's a .config. The following patch fixes this.
      Signed-off-by: NUlf Magnusson <ulfalizer.lkml@gmail.com>
      Reviewed-by: NWANG Cong <xiyou.wangcong@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      ac1ffde1
  7. 26 7月, 2010 1 次提交
  8. 12 12月, 2009 2 次提交
  9. 20 9月, 2009 1 次提交
  10. 10 6月, 2009 1 次提交
  11. 16 3月, 2009 1 次提交
    • S
      kconfig: fix randconfig for choice blocks · 184832c9
      Sam Ravnborg 提交于
      Ingo Molnar reported that 'make randconfig' was not covering
      choice blocks properly, resulting in certain config options
      being left out of randconfig testing altogether.
      
      With the following patch we:
      - properly randomize choice value for normal choice blocks
      - properly randomize for multi choice blocks
      - added several comments to explain what is going on
      
      The root cause of the bug was that SYMBOL_VALID was set on the
      symbol representing the choice block so clearing this did
      the trick initially.
      But testign revealed a few more issues that is now fixed.
      Reported-by: NIngo Molnar <mingo@elte.hu>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      184832c9
  12. 27 10月, 2008 1 次提交
    • A
      fix allmodconfig breakage · ce97e13e
      Al Viro 提交于
      If you use KCONFIG_ALLCONFIG (even with empty file) you get broken
      allmodconfig/allyesconfig; CONFIG_MODULES gets turned off, with obvious
      massive fallout.
      
      Breakage had been introduced when conf_set_all_new_symbols() got used
      for allmodconfig et.al.
      
      What happens is that sym_calc_value(modules_sym) done in
      conf_read_simple() sets SYMBOL_VALID on both modules_sym and MODULES.
      When we get to conf_set_all_new_symbols(), we set sym->def[S_DEF_USER]
      on everything, but it has no effect on sym->curr for the symbols that
      already have SYMBOL_VALID - these are stuck.
      
      Solution: use sym_clear_all_valid() in there.  Note that it makes
      reevaluation of modules_sym redundant - sym_clear_all_valid() will do
      that itself.
      
      [ Fixes http://bugzilla.kernel.org/show_bug.cgi?id=11512, says Alexey ]
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ce97e13e
  13. 29 9月, 2008 1 次提交
  14. 05 8月, 2008 1 次提交
  15. 26 7月, 2008 1 次提交
  16. 29 1月, 2008 3 次提交
  17. 18 11月, 2007 2 次提交
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 6840999b
      Sam Ravnborg 提交于
      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:
       - 0f855aa6 ("kconfig: add helper to set
         config symbol from environment variable")
       - 2a113281 ("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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6840999b
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 80ef88d6
      Sam Ravnborg 提交于
      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:
      0f855aa6
      -> kconfig: add helper to set config symbol from environment variable
      
      2a113281
      -> 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: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      80ef88d6
  18. 13 11月, 2007 2 次提交
  19. 17 7月, 2007 1 次提交
    • R
      kconfig: reset generated values only if Kconfig and .config agree. · d8982ba1
      Roman Zippel 提交于
      Normally generated values (Kconfig entries without a prompt) are cleared as
      they are regenerated anyway and so they appear as new should they become
      visible and defaults work as expected (once a value is set defaults aren't
      used anymore).
      
      The detection whether a value is generated or not is only based on its
      visibility status, which can quickly change for a lot of symbols by just
      removing a single line from .config or adding a dependency to Kconfig as you
      noticed.
      
      The patch now suppresses this logic when .config and Kconfig aren't in sync
      and .config needs to be updated, so that you can remove now a random value
      from .config and oldconfig won't reask for many other values.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      d8982ba1
  20. 14 12月, 2006 3 次提交
  21. 01 10月, 2006 1 次提交
  22. 25 9月, 2006 1 次提交
  23. 01 8月, 2006 1 次提交
  24. 09 6月, 2006 7 次提交
  25. 11 4月, 2006 1 次提交