Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
use a list of modules to configure
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Demo
n00b
n00b


Joined: 25 Nov 2022
Posts: 74

PostPosted: Thu Dec 08, 2022 2:30 pm    Post subject: use a list of modules to configure Reply with quote

Hello again fellows...

I have a quick question, I was wondering if someone can remind me what option/switch to give make while configuring the kernel to specify a text file with a list of modules to configure instead of going through the whole thing over and over.

I'm asking this because while still working my way through my first installation, I came across a tool that actually I think was just a script to run lsmod then store the output in text file for the make Xconfig to find, and it seems to have disappeared, I googled and googled to no results for the past few days. The GitHub page for that script had that switch but I can't find neither the option nor the tool.

I appreciate the help!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4148
Location: Bavaria

PostPosted: Thu Dec 08, 2022 3:25 pm    Post subject: Reply with quote

Maybe you want read this: https://wiki.gentoo.org/wiki/User:Egberts/Drafts/Gentoo_Kernel_Configuration_Guide
Back to top
View user's profile Send private message
Demo
n00b
n00b


Joined: 25 Nov 2022
Posts: 74

PostPosted: Thu Dec 08, 2022 5:50 pm    Post subject: Reply with quote

Thank you for the reply pietinger!

It's useful information, though not exactly what I'm seeking.
I just wonder how something I got to read about, downloaded, and compiled just disappeared into thin air!

Many thanks!
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4148
Location: Bavaria

PostPosted: Thu Dec 08, 2022 7:00 pm    Post subject: Reply with quote

Demo,

you are welcome ! Maybe you dont need a tool if you work with "make localyesconfig"

(see more here: https://www.kernel.org/doc/html/latest/admin-guide/README.html#configuring-the-kernel )

Observe caution when using "make localmodconfig" instead ... you have to build-in all needed modules for kernel to reach its root partion static into the kernel if not working with an initramfs !
Back to top
View user's profile Send private message
psycho
Guru
Guru


Joined: 22 Jun 2007
Posts: 534
Location: New Zealand

PostPosted: Thu Dec 08, 2022 10:44 pm    Post subject: Reply with quote

Hi Demo.

You probably understand this, but just in case (by "a text file with a list of modules to configure") you're asking about the .config file itself, if you make a copy of /usr/src/linux/.config (traditionally in /boot/config-whatever, but you can put it wherever you want and call it whatever you want), this simple text file stores all your configuration choices. By copying that over .config, you select/unselect all the options you selected/unselected during the manual make menuconfig process.

If things have changed (e.g. it's a new kernel source), you need to
Code:
make oldconfig
immediately after copying across the .config file, and this will update it by potentially asking you a few (or a lot, if it's a big upgrade) additional questions (typically about new hardware drivers and sometimes new features)... but you certainly don't have to go through making decisions about everything more than once, for any particular system: as soon as you've done it once and backed up that .config, any future configuration is quick and easy. In fact even for different systems, I usually start with another system's good .config and just tweak it for the different hardware and/or use cases... it's much quicker and easier than starting from scratch.

If you don't have a fully configured .config file backed up somewhere and do need to start from scratch, then something like make localyesconfig gives you a good near-enough configuration that's likely to be bootable, at least. I don't think I've ever seen an automated configuration like that turn out 100% as I wanted it (it will potentially load a bunch of stuff that it detects your system has, but that you are never actually going to use... and of course there's a lot more to configuring a kernel than just selecting what hardware you're using, so there are a bunch of options that will be set to defaults and you may want to tweak these), but it's always much easier to tune up a near-enough .config than to work through every single option manually.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum