I watched a clip on customizing kernel, rebuilding, installing, etc. where the gentleman suggested to use an existing .config
file with make menuconfig
or make xconfig
. I wanted to use one that comes with Arch BUT it's huge, it's almost 10,000 lines in it!
After summarizing those lines, it looks like there're 314 main sections (eg, Memory Debugging
, Android
, Heart Rate Monitors
, Humidity sensors
, Magnetometer sensors
, etc.) with one or more parameters and arguments (eg. =y
, =m
, #... not set
and =number/string
). Altogether there're 2,344 entries with =y
(statically built?), 5,159 have =m
(loadable modules?), 163 have =number/string
and the rest 627 are # ... not set
.
make localmodconfig
does a good job in reducing number of modules (=m
) substantially BUT selects a lot of things, by default, that a machine doesn't actually have on it. For example:
Under Input Device Drivers
section:
CONFIG_INPUT_TOUCHSCREEN=y
CONFIG_TOUCHSCREEN_PROPERTIES=y
CONFIG_INPUT_TABLET=y
CONFIG_INPUT_JOYSTICK=y
Under Processor type and features
:
CONFIG_X86_AMD_PLATFORM_DEVICE=y
CONFIG_CPU_SUP_AMD=y
CONFIG_X86_MCE_AMD=y
Under Performance monitoring
:
CONFIG_MICROCODE_AMD=y
CONFIG_AMD_MEM_ENCRYPT=y
CONFIG_AMD_NUMA=y
Under Distributed Switch Architecture drivers
, there're 64 =y
, it includes all vendors available? I don't have any of those and probably there're many more under other sections.
With make localmodconfig
, I get 183 sections instead of 314 and altogether there're 1,562 =y
, 172 =m
, 95 =number/string
and 2,783 # ... not set
!
I don't need all those for sure BUT it'd be really painful to check or uncheck things manually! Is there any tool that'd scan my hardwares and generate a config file for rebuilding kernel and modules?
make menuconfig
to fine-tune your kernel. – Hans-Martin Mosner Jul 30 '19 at 09:01localmodconfig
is the answer: you need to have a kernel with all bells and whistles running to be able to take out the bells and whistles you don't need. ¯\(ツ)/¯ – Fabby Jul 31 '19 at 08:15longterm 4.19.62
and the one running on the machine was downloaded during the Arch instalation process.uname -r
returns4.19.61-1-lts
. – Jul 31 '19 at 19:00