aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/streamline_config.pl (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-12-02streamline_config.pl: show the full Kconfig nameŁukasz Stelmach1-1/+1
Show the very same file name that was passed to open() in case the operation failed. Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
2021-06-29streamline_config.pl: add softtabstop=4 for vim usersSteven Rostedt (VMware)1-0/+2
The tab stop for Perl files is by default (at least in emacs) to be 4 spaces, where a tab is used for all 8 spaces. Add a local variable comment to make vim do the same by default, and this will help keep the file consistent in the future when others edit it via vim and not emacs. Link: https://lkml.kernel.org/r/20210322214032.293992979@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Cc: "John (Warthog9) Hawley" <warthog9@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-06-29streamline_config.pl: make spacing consistentSteven Rostedt (VMware)1-39/+39
Patch series "streamline_config.pl: Fix Perl spacing". Talking with John Hawley about how vim and emacs deal with Perl files with respect to tabs and spaces, I found that some of my Perl code in the kernel had inconsistent spacing. The way emacs handles Perl by default is to use 4 spaces per indent, but make all 8 spaces into a single tab. Vim does not do this by default. But if you add the vim variable control: # vim: softtabstop=4 to a perl file, it makes vim behave the same way as emacs. The first patch is to change all 8 spaces into a single tab (mostly from people editing the file with vim). The next patch adds the softtabstop variable to make vim act like emacs by default. This patch (of 2): As Perl code tends to have 4 space indentation, but uses tabs for every 8 spaces, make that consistent in the streamline_config.pl code. Replace all 8 spaces with a single tab. Link: https://lkml.kernel.org/r/20210322214032.133596267@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Cc: "John (Warthog9) Hawley" <warthog9@kernel.org> Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-04-14kconfig: streamline_config.pl: Couple of typo fixesBhaskar Chowdhury1-2/+2
s/configuraton/configuration/ s/orignal/original/ Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-09-03kconfig: streamline_config.pl: check defined(ENV variable) before using itRandy Dunlap1-1/+4
A user reported: 'Use of uninitialized value $ENV{"LMC_KEEP"} in split at ./scripts/kconfig/streamline_config.pl line 596.' so first check that $ENV{LMC_KEEP} is defined before trying to use it. Fixes: c027b02d89fd ("streamline_config.pl: add LMC_KEEP to preserve some kconfigs") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-05-13streamline_config.pl: add LMC_KEEP to preserve some kconfigsChangbin Du1-0/+21
Sometimes it is useful to preserve batches of configs when making localmodconfig. For example, I usually don't want any usb and fs modules to be disabled. Now we can do it by: $ make LMC_KEEP="drivers/usb:fs" localmodconfig Signed-off-by: Changbin Du <changbin.du@gmail.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-01-07kconfig: localmodconfig: fix indentation for closing braceMasahiro Yamada1-1/+1
This is the closing brace for the foreach loop. Fix the misleading indentation. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-01-07kconfig: localmodconfig: remove unused $configMasahiro Yamada1-2/+0
This is unused since commit cdfc47950a53 ("kconfig: search for a config to base the local(mod|yes)config on"). Having unused $config is confusing because $config is used as a local variable in various sub-routines. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2018-12-28kconfig: convert to SPDX License IdentifierMasahiro Yamada1-1/+1
All files in lxdialog/ are licensed under GPL-2.0+, and the rest are under GPL-2.0. I added GPL-2.0 tags to test scripts in tests/. Documentation/process/license-rules.rst does not suggest anything about the flex/bison files. Because flex does not accept the C++ comment style at the very top of a file, I used the C style for zconf.l, and so for zconf.y for consistency. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-06-11kconfig: fix localmodconfigSam Ravnborg1-2/+2
When kconfig syntax moved to use $(FOO) for environment variables localmodconfig was not updated. Fix so it now works with the new syntax $(FOO) Fixes: 104daea149c4 ("kconfig: reference environment variables directly and remove 'option env='") Reported-by: Kevin Locke <kevin@kevinlocke.name> Reported-by: Andrei Vagin <avagin@virtuozzo.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Tested-by: Kevin Locke <kevin@kevinlocke.name> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-05-14scripts: Switch to more portable Perl shebangKamil Rytarowski1-1/+2
The default NetBSD package manager is pkgsrc and it installs Perl along other third party programs under custom and configurable prefix. The default prefix for binary prebuilt packages is /usr/pkg, and the Perl executable lands in /usr/pkg/bin/perl. This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's the most portable solution that should work for almost everybody. Perl's executable is detected automatically. This change switches -w option passed to the executable with more modern "use warnings;" approach. There is no functional change to the default behavior. While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?). Signed-off-by: Kamil Rytarowski <n54@gmx.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-04-26localmodconfig: Fix whitespace repeat count after "tristate"Benjamin Poirier1-1/+1
Also recognize standalone "prompt". Before this patch we incorrectly identified some symbols as not having a prompt and potentially needing to be selected by something else. Note that this patch could theoretically change the resulting .config, causing it to have fewer symbols turned on. However, given the current set of Kconfig files, this situation does not occur because the symbols newly added to %prompts are absent from %selects. Link: http://lkml.kernel.org/r/1461696998-3953-1-git-send-email-bpoirier@suse.com Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-04-26localmodconfig: Reset certificate pathsBenjamin Poirier1-0/+34
When using `make localmodconfig` and friends, if the input config comes from a kernel that was built in a different environment (for example, the canonical case of using localmodconfig to trim a distribution kernel config) the key files for module signature checking will not be available and should be regenerated or omitted. Otherwise, the user will be faced with annoying errors when trying to build with the generated .config: make[1]: *** No rule to make target 'keyring.crt', needed by 'certs/x509_certificate_list'. Stop. Makefile:1576: recipe for target 'certs/' failed Link: http://lkml.kernel.org/r/1461696721-3001-1-git-send-email-bpoirier@suse.com Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-04-26localmodconfig: Add missing $ to reference a variableBenjamin Poirier1-1/+1
That is clearly what the original intention was. This does not change the output .config but it prevents some useless processing. ! eq "m" is changed to the simpler eq "y"; symbols with values other than m|y are not included in %orig_configs. Link: http://lkml.kernel.org/r/1460333193-16361-3-git-send-email-bpoirier@suse.com Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-04-26localmodconfig: Fix parsing of "help" textBenjamin Poirier1-1/+1
Help text may start with "help" or "---help---". This patch fixes read_kconfig() to recognize the second variant. This removes useless junk from %depends and %selects. That junk is due to help text that contains the words "selects" and "depends". Link: http://lkml.kernel.org/r/1460333193-16361-2-git-send-email-bpoirier@suse.com Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-04-26localmodconfig: Recognize more keywords that end a menu entryBenjamin Poirier1-2/+2
Based on the list in Documentation/kbuild/kconfig-language.txt This removes junk from %depends because parsing of a menu entry spilled over to another menu entry. Link: http://lkml.kernel.org/r/1460333193-16361-1-git-send-email-bpoirier@suse.com Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2016-04-26localmodconfig: Fix parsing of Kconfig "source" statementsBenjamin Poirier1-1/+1
The parameter of Kconfig "source" statements does not need to be quoted. The current regex causes many kconfig files to be skipped and hence, dependencies to be missed. Also fix the whitespace repeat count. Link: http://lkml.kernel.org/r/1459619722-13695-1-git-send-email-bpoirier@suse.com Tested-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Benjamin Poirier <bpoirier@suse.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2015-08-11localmodconfig: Use Kbuild files tooRichard Weinberger1-1/+1
In kbuild it is allowed to define objects in files named "Makefile" and "Kbuild". Currently localmodconfig reads objects only from "Makefile"s and misses modules like nouveau. Link: http://lkml.kernel.org/r/1437948415-16290-1-git-send-email-richard@nod.at Cc: stable@vger.kernel.org Reported-and-tested-by: Leonidas Spyropoulos <artafinde@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2014-08-20kbuild: Make scripts executableMichal Marek1-0/+0
The Makefiles call the respective interpreter explicitly, but this makes it easier to use the scripts manually. Signed-off-by: Michal Marek <mmarek@suse.cz>
2014-04-30kbuild: trivial - remove trailing spacesMasahiro Yamada1-1/+1
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-12-20localmodconfig: Add config depends by default settingsSteven Rostedt (Red Hat)1-0/+7
Currently localmodconfig will miss dependencies from the default option. For example: config FOO default y if BAR || ZOO If FOO is needed for a module and is set to '=m', and so are BAR or ZOO, localmodconfig will not see that BOO or ZOO are also needed for the foo module, and will incorrectly disable them. Link: http://lkml.kernel.org/r/20131218175137.162937350@goodmis.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-04-29localmodconfig: Process source kconfig files as they are foundSteven Rostedt1-10/+7
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 <rpjday@crashcourse.ca> Tested-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2013-04-29localmodconfig: Add debug prints for dependencies of module configsSteven Rostedt1-0/+9
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 <rostedt@goodmis.org>
2012-10-01localmodconfig: Fix localyesconfig to set to 'y' not 'm'Yuta Ando1-0/+2
The kbuild target 'localyesconfig' has been same as 'localmodconfig' since the commit 50bce3e "kconfig/streamline_config.pl: merge local{mod,yes}config". The commit expects this script generates different configure depending on target, but it was not yet implemented. So I added code that sets to 'yes' when target is 'localyesconfig'. Link: http://lkml.kernel.org/r/1349101470-12243-1-git-send-email-yuta.and@gmail.com Cc: stable@vger.kernel.org # v3.2 Cc: linux-kbuild@vger.kernel.org Signed-off-by: Yuta Ando <yuta.and@gmail.com> Signed-off-by: Steven Rostedt <rostedt@rostedt.homelinux.com>
2012-08-16localmodconfig: Use my variable for loop in streamline_config.plBill Pemberton1-1/+1
perlcritic complains about $kconfig being reused in the foreach loop at the end of read_kconfig. Change it to a my variable. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-16localmodconfig: Use 3 parameter open in streamline_config.plBill Pemberton1-16/+14
Convert remaining open calls to use the perl's preferred 3 parameter open. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-16localmodconfig: Rework find_config in streamline_config.plBill Pemberton1-8/+6
Change find_config function to read_config. It now finds the config, reads the config into an array, and returns the array. This makes it a little cleaner and changes the open to use perl's 3 option open. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-08-16localmodconfig: Set default value for ksource in streamline_config.plBill Pemberton1-1/+1
Running streamline_config.pl as it's shown it in the comment header, you will get a warning about $ksource being uninitialized. This is because $ksource is set to ARGV[0], but the examples don't require any arguments. Fix by setting ksource to . if no ARGV[0] is given. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19localmodconfig: Add debug environment variable LOCALMODCONFIG_DEBUGSteven Rostedt1-0/+21
If the environment variable LOCALMODCONFIG_DEBUG is set, then debug output will appear in the make localmodconfig. This will simplify debugging what people get with their output, as I can just tell people to do: LOCALMODCONFIG_DEBUG=1 make localmodconfig 2>out.txt and have them send me the out.txt. I'll be able to see why things are not working as they think it should be. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19localmodconfig: Check if configs are already set for selectsSteven Rostedt1-11/+104
There are some cases that a required module does not have a prompt and needs to have another module enabled that selects it to be set. As localmodconfig is conservative and tries to make the minimum config without breaking the user's kernel, or keeping the user from using devices that were loaded when the lsmod was done, all modules that select this module will also be enabled. If you needed module A, but module A did not have a prompt but needed module B to be selected, localmodconfig would make sure B was still enabled. If not only B selected A, but C, D, E, F, and G also selected A, then all of those would also be included, as well as the modules they depend on. This ballooned the number of configs that localmodconfig would keep. The fix here is to process the depends first, and then record those configs that did not have a prompt and needed to be selected. After the depends are done, check what configs are needed to select the configs in the list, and if a config that selects it is already set, then we don't need to do anything else. If no config that selects the config is set, then just pick one and try again. This change brought down the number of selected modules from 290 to 67! Both before and after were run against a config that had 3095 modules enabled. Tested-by: John David Yost <johnyost@ptd.net> # AlleyTrotter Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19localmodconfig: Read in orig config file to avoid extra processingSteven Rostedt1-2/+24
Read in the entire config file. If there's a config that we depend on that happens to be in the core set (not a module) then we do not need to process it as a module. Currently, we follow the entire depend and selects even if they are enabled as core and not modules. By checking to make sure that we only look at modules we can drop the count a little. From one of my tests, localmodconfig went from taking 3095 set modules down to 356 before this patch, and down to 290 modules after the change. Tested-by: John David Yost <johnyost@ptd.net> # AlleyTrotter Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-06-19localmodconfig: Comments and cleanup for streamline_config.plSteven Rostedt1-4/+9
Added some more comments and cleaned up part of the the code to use a named variable instead of one of the special $1 perl variables. No functional changes. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-01-13kconfig/streamline-config.pl: Fix parsing Makefile with variablesSteven Rostedt1-0/+29
Thomas Lange reported that when he did a 'make localmodconfig', his config was missing the brcmsmac driver, even though he had the module loaded. Looking into this, I found the file: drivers/net/wireless/brcm80211/brcmsmac/Makefile had the following in the Makefile: MODULEPFX := brcmsmac obj-$(CONFIG_BRCMSMAC) += $(MODULEPFX).o The way streamline-config.pl works, is parsing all the obj-$(CONFIG_FOO) += foo.o lines to find that CONFIG_FOO belongs to the module foo.ko. But in this case, the brcmsmac.o was not used, but a variable in its place. By changing streamline-config.pl to remember defined variables in Makefiles and substituting them when they are used in the obj-X lines, allows Thomas (and others) to have their brcmsmac module stay configured when it is loaded and running "make localmodconfig". Reported-by: Thomas Lange <thomas-lange2@gmx.de> Tested-by: Thomas Lange <thomas-lange2@gmx.de> Cc: Arend van Spriel <arend@broadcom.com> Cc: stable@vger.kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2012-01-13kconfig/streamline-config.pl: Simplify backslash line concatinationSteven Rostedt1-13/+12
Simplify the way lines ending with backslashes (continuation) in Makefiles is parsed. This is needed to implement a necessary fix. Tested-by: Thomas Lange <thomas-lange2@gmx.de> Cc: stable@vger.kernel.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-08-08kconfig/streamline_config.pl: use options to determine operating modeArnaud Lacombe1-1/+13
The options introduced are --localmodconfig (default) and --localyesconfig. They match the Makefile target behavior. Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-08-08kconfig/streamline_config.pl: directly access LSMOD from the environmentArnaud Lacombe1-2/+6
Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
2011-02-08trivial: Fix Steven's Copyright typosUwe Kleine-König1-1/+1
OK, the copyright allows you to write a copy, still I think the lawyers prefer the correct spelling. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> LKML-Reference: <1295899921-11333-1-git-send-email-u.kleine-koenig@pengutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29kconfig: Have streamline_config process menuconfigs tooSteven Rostedt1-2/+2
Some menuconfigs in the Kconfig files have prompts and dependencies. Currently, streamline_config misses these, and this can cause streamline_config to keep modules enabled that should not be, and even worse, not enable those that should. This patch makes streamline_config process menuconfigs just like it would process a config. Reported-by: member graysky <graysky@archlinux.us> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29kconfig: Fix streamline_config to read multi line deps in Kconfig filesSteven Rostedt1-1/+18
I noticed that some Kconfig files have multi line dependencies that continue with a backslash. Those dependencies on the next line will be missed by streamline_config. For example: config CS89x0 tristate "CS89x0 support" depends on NET_ETHERNET && (ISA || EISA || MACH_IXDP2351 \ || ARCH_IXDP2X01 || MACH_MX31ADS) The "|| ARCH_IXDP2X01 || MACH_MX31ADS)" will not be processed. This patch adds code to handle this case. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29kconfig: Fix missing declaration of variable $dir in streamline_config.plhiromu1-1/+3
On Fri, Aug 17, 2010 at 01:43PM +0800, Américo Wang wrote: > Acked-by: WANG Cong <xiyou.wangcong@gmail.com> > > BTW, I think we should add "use strict;" too. Then I added "use strict;" to streamline_config.pl, I saw another warning. > Global symbol "$dir" requires explicit package name at scripts/kconfig/streamline_config.pl line 286. > Global symbol "$dir" requires explicit package name at scripts/kconfig/streamline_config.pl line 287. > Global symbol "$dir" requires explicit package name at scripts/kconfig/streamline_config.pl line 288. Then I added "my $dir;" to line 285. Cc: Américo Wang <xiyou.wangcong@gmail.com> Cc: Toralf Foerster <toralf.foerster@gmx.de> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Hiromu Yakura <hiromu1996@gmail.com> LKML-Reference: <1282042158.7160.9.camel@hiromu-Macbook> [ changed to just add my in front of $dir instead of new line ] Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29kconfig: Fix variable name typo %prompts in streamline_config.plhiromu yagura1-2/+2
When I added "use strict;" to streamline_config.pl, I saw the following warnings: > Global symbol "%prompt" requires explicit package name at scripts/kconfig/streamline_config.pl line 183. > Global symbol "%prompt" requires explicit package name at scripts/kconfig/streamline_config.pl line 368. The declaration of %prompt was incorrect, and should have been %prompts. Cc: Toralf Foerster <toralf.foerster@gmx.de> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: Hiromu Yakura <hiromu1996@gmail.com> LKML-Reference: <1281845597.11566.5.camel@camp10-laptop> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-10-29kconfig: Make localmodconfig handle environment variablesSteven Rostedt1-1/+11
The commit 838a2e55e6a4e9e8a10451ed2ef0f7a08dabdb04 kbuild: migrate all arch to the kconfig mainmenu upgrade Broke make localmodconfig. The reason was that it added a environment variable to the kconfig source, which the streamline_config.pl could not handle. This patch changes streamline_config.pl to handle kconfig sources using environment variables in their names. Cc: Arnaud Lacombe <lacombar@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-05-28kconfig: Hide error output in find command in streamline_config.plToralf Förster1-2/+3
Finding the list of Makefiles in streamline-config should not report errors. Also move the "chomp" to the @makefiles array instead of doing it in the for loop. This is more efficient, and does not make it any less readable by C programmers. Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de> LKML-Reference: <201005262022.02928.toralf.foerster@gmx.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-05-28kconfig: Fix typo in comment in streamline_config.plToralf Foerster1-1/+1
Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de> LKML-Reference: <201005281025.52753.toralf.foerster@gmx.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-05-28kconfig: Make a variable local in streamline_config.plToralf Foerster1-1/+1
Proper perl requires that local variables should be declared with 'my', otherwise this may produce errors. Signed-off-by: Toralf Foerster <toralf.foerster@gmx.de> LKML-Reference: <201005281025.00358.toralf.foerster@gmx.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-02-02kconfig: Add LSMOD=file to override the lsmod for localmodconfigSteven Rostedt1-11/+27
Doing the following: make LSMOD=file localmodconfig Will make the streamline-config code use the given file instead of lsmod. If the file is an executable, it will execute it, otherwise it will read it as text. make LSMOD=/my/local/path/lsmod localmodconfig The above will execute the lsmod in /my/local/path instead of the lsmods that may be located elsewhere. make LSMOD=embedded_board_lsmod localmodconfig The above will read the "embedded_board_lsmod" as a text file. This is useful if you are doing a cross compile and need to run the config against modules that exist on an embedded device. Note, if the LSMOD= file does is not a path, it will add the path to the object directory. That is, the above example will look for "embedded_board_lsmod" in the directory that the binary will be built in (the O=dir directory). Signed-off-by: Steven Rostedt <rostedt@goodmis.org> On branch config/linus
2010-02-02kconfig: Look in both /bin and /sbin for lsmod in streamline_config.plSteven Rostedt1-1/+14
Distributions now have lsmod in /bin instead of /sbin. But to handle both cases, we look for it in /sbin /bin /usr/bin and /usr/sbin. If lsmod is not found in any of those paths, it defaults to use just lsmod and hopes that it lies in the path of the user. Tested-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2010-01-06kconfig: Check for if conditions in Kconfig for localmodconfigSteven Rostedt1-0/+26
The streamline_config.pl misses the if conditions for checking dependencies. For Kconfigs with the following construct: if MEDIA_SUPPORT config VIDEO_DEV [...] If VIDEO_DEV was enabled, the script will miss the fact that MEDIA_SUPPORT is also needed. This patch changes streamline_config.pl to include if conditions into the dependencies of configs. Reported-by: Anton Blanchard <anton@sambo.org> Tested-by: Anton Blanchard <anton@sambo.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-20kconfig: Fix make O=<dir> local{mod,yes}configSteven Rostedt1-6/+6
When the output directory is something other than the kernel source, the streamline_config script gets confused. This patch passes in the source directory to the script so that it can find the proper files. Reported-by: Peter Zijlstra <peterz@infradead.org> Tested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18kconfig: make local .config default for streamline_configSteven Rostedt1-4/+4
As Andi Kleen pointed out, most people would expect that the local .config file to be based for a streamline config. This patch changes the order of searching for a config file to consider the .config in the local directory first. Reported-by: Andi Kleen <andi@firstfloor.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>