LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Programmatically set CONFIG_* to 'm', where possible (https://www.linuxquestions.org/questions/linux-kernel-70/programmatically-set-config_%2A-to-m-where-possible-915987/)

jhwilliams 11-28-2011 08:17 AM

Programmatically set CONFIG_* to 'm', where possible
 
Hi all,

I'd like to have a script that generates a .config file with everything possible set to build as a module. I will then pass that through meunconfig.

Here's what I've thought to do so far.

1. find all Kconfig files in the tree
2. for each Kconfig file, find config WHATEVER lines followed by lines containing tristate.
3. Now having the list of module-ready config options, sed replace the lines in the .config.

But:

(a) Such a script or tool might already exist. Do you know of one?
(b) (1) and (2), and heck possibly (3), can probably be done quickly by an awkspert.
(c) There may be a more obvious approach than putzing about with Kconfig files directly.

Pointers?

Thanks.

H_TeXMeX_H 11-28-2011 08:25 AM

That's simple:

Code:

        "make allmodconfig"
                          Create a ./.config file by setting symbol
                          values to 'm' as much as possible.

BTW, it's not a good idea to directly/manually edit the kernel config.

jhwilliams 11-28-2011 08:29 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 4536333)
That's simple:

Code:

        "make allmodconfig"
                          Create a ./.config file by setting symbol
                          values to 'm' as much as possible.


Sweet ... Thanks.

It was right in the top-level README. Classic.

Quote:

BTW, it's not a good idea to directly/manually edit the kernel config.
Duly noted, but sometimes you've got to do what you've got to do. In this case, it gladly does not look like I've got to do.

catkin 11-30-2011 04:50 AM

make help output is interesting too :)

jhwilliams 12-02-2011 06:42 AM

Quote:

Originally Posted by catkin (Post 4538060)
make help output is interesting too :)

Yes!! It is.


All times are GMT -5. The time now is 10:08 PM.