aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/streamline_config.pl (follow)
AgeCommit message (Collapse)AuthorFilesLines
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>
2009-08-18kconfig: test for /boot/config-uname after /proc/config.gz in localconfigSteven Rostedt1-0/+4
Many distros put their config in /boot/config-`uname -r`, add a check for that right after /proc/config.gz Reported-by: Alan Jenkins <sourcejedi.lkml@googlemail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18kconfig: unset IKCONFIG_PROC and clean up nestingSteven Rostedt1-6/+3
Due to cut and paste error IKCONFIG was both set and cleared. It was suppose to be IKCONFIG_PROC to be cleared. Also cleaned up if nesting. Reported-by: Alan Jenkins <sourcejedi.lkml@googlemail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18kconfig: search for a config to base the local(mod|yes)config onSteven Rostedt1-1/+62
Instead of using the .config in the local directory. This patch changes streamline_config.pl to search various locations for a config. Here's the list and order of search: /proc/config.gz /boot/vmlinuz-`uname -r` vmlinux # local to the directory /lib/modules/`uname -r`/kernel/kernel/configs.ko kernel/configs.ko kernel/configs.o .config Once it finds a file that contains a config (it checks if the binary objects have configs first) it then uses it to create the .config with minimum modules needed. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18kconfig: enable CONFIG_IKCONFIG from streamline_config.plSteven Rostedt1-10/+23
Ingo Molnar suggested that the streamline_config.pl should enable CONFIG_IKCONFIG to keep the current config in the kernel. Then we can use scripts/extract-ikconfig to find the current modules. This patch changes streamline_config.pl to check if CONFIG_IKCONFIG is not set, and if it is not, it enables it to be a module. [ Impact: make current config options easier to find ] Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18kconfig: do not warn about modules built inSteven Rostedt1-3/+5
The streamline_config.pl finds all the configs that are needed to compile the currently loaded modules. After it creates the .config file, it tests to make sure all the configs that are needed were set. It only looks at the configs that are modules, it does not look at the builtin configs. This causes unnecessary warnings about modules not being covered. Reported-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18kconfig: streamline_config.pl do not stop with no dependsSteven Rostedt1-5/+3
If a config does not have a prompt, it must be selected. streamline_config.pl keeps track of all configs that select other configs. If a config that does not have a prompt needs to be set to enable a current module, it will include all configs that select it. Note, streamline_config.pl does not enable modules that are not already enabled. It only keeps enabled those that were enabled and might be needed to compile the current modules. The code to find the selects of a config is after the code that adds the depends. But if a config needed selects but had no dependencies, it would not be set. Because the code would stop before getting to the select. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-08-18kconfig: add streamline_config.pl to scriptsSteven Rostedt1-0/+291
streamline_config.pl is a very powerful tool. For those that install a kernel to a new box using the config file from the distribution know that it can take forever to compile the kernel. Making a custom config file that will still boot your box, but bring down the compile time of the kernel can be quit painful, and to ask someone that reported a bug to do this can be a large burdon since that person may not even know how to build a kernel. This script will perform "lsmod" to find all the modules loaded on the current running system. It will read all the Makefiles to map which CONFIG enables a module. It will read the Kconfig files to find the dependencies and selects that may be needed to support a CONFIG. Finally, it reads the .config file and removes any module "=m" that is not needed to enable the currently loaded modules. The output goes to standard out. Here's a way to run the script. From the Linux directory that holds a distribution .config. $ scripts/kconfig/streamline_config.pl arch/x86/Kconfig > config-sl $ mv .config config-save $ mv config-sl .config $ make oldconfig Now you have a .config that will still build all your modules, but also take much less time to build the kernel. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>