On 10/9/24 6:08 PM, Michael wrote: >> I have a recollection of reading somewhere online mention of a > script >> that will take the .config file from the "-bin" kernel and then >> modprobe, I think, each listed module in turn to see if it is actually >> being used and subsequently writing a new .config file that now only >> contains the modules/options that the specific machine needs. >> >> Is this a mythical script that I have dreamt up after a long day and >> too much chocolate or does it actually exist and does anyone have a link. >> >> Thanks for any thoughts, >> >> Andrew > > Have a look at this page: > > https://wiki.gentoo.org/wiki/Kernel/Configuration > > In particular, take notice of 'make localmodconfig'. > > Once you have a customised kernel as you like it and it boots successfully, > you can copy your good /usr/src/linux/.config to any subsequently emerged new > gentoo-source kernel trees and run 'make oldconfig' thereafter, to only have > to deal with new kernel options.
See also https://wiki.gentoo.org/wiki/Modprobed-db "make localmodconfig" will only handle what your current system state is using right at that second -- modprobed-db maintains a database over time of the modules that "make localmodconfig" would see, which means you can run the -bin kernel for a bit under your usual workloads and then activate "make localmodconfig" via that database without worrying about "an important module I often use was not loaded today specifically because I didn't run the program which needs it today. Now the newly built kernel doesn't have that module at all, oops". -- Eli Schwartz
OpenPGP_signature.asc
Description: OpenPGP digital signature