LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-28-2011, 08:17 AM   #1
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 211Reputation: 211Reputation: 211
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.

Last edited by jhwilliams; 11-28-2011 at 08:24 AM.
 
Old 11-28-2011, 08:25 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
1 members found this post helpful.
Old 11-28-2011, 08:29 AM   #3
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Original Poster
Rep: Reputation: 211Reputation: 211Reputation: 211
Quote:
Originally Posted by H_TeXMeX_H View Post
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.

Last edited by jhwilliams; 11-28-2011 at 08:31 AM.
 
Old 11-30-2011, 04:50 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
make help output is interesting too
 
1 members found this post helpful.
Old 12-02-2011, 06:42 AM   #5
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Original Poster
Rep: Reputation: 211Reputation: 211Reputation: 211
Quote:
Originally Posted by catkin View Post
make help output is interesting too
Yes!! It is.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
building external module, howto override CONFIG_ option? Meson Linux - Kernel 2 11-12-2011 02:44 PM
How do I remove all lines starting with "-CONFIG_" from a file ? Glenn D. Linux - Kernel 4 10-05-2010 09:36 AM
How To Programmatically Extract Monitor Name Woodsman Slackware 8 09-10-2009 07:04 PM
Programmatically getting distro name sleeping Programming 15 12-08-2006 02:12 PM
Set $PATH programmatically c_coder Programming 6 02-26-2004 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration