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:


Under Processor type and features:


Under Performance monitoring:


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?

  • 1
    What exactly is it that you're trying to achieve? – ilkkachu Jul 30 '19 at 8:05
  • 2
    Possible duplicate of What does 'make localmodconfig' do? – Hans-Martin Mosner Jul 30 '19 at 8:59
  • 2
    unix.stackexchange.com/questions/253245/… might be a good start. From there you could use make menuconfig to fine-tune your kernel. – Hans-Martin Mosner Jul 30 '19 at 9:01
  • @ilkkachu, just wondering if there's any automation tool that configures kernel specifically for a device. – Emon Haque Jul 30 '19 at 11:38
  • 1
    localmodconfig 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 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.