13

What does make localmodconfig do and what should you set so that external hardware is supported?

  • 1
    Your question is not clear. Can you precise it? – Mathieu Jan 4 '16 at 20:18
14

From the kernel README:

"make localmodconfig" Create a config based on current config and loaded modules (lsmod). Disables any module option that is not needed for the loadedmodules.

To create a localmodconfig for another machine, store the lsmod of that machine into a file and pass it in as a LSMOD parameter.

               target$ lsmod > /tmp/mylsmod
               target$ scp /tmp/mylsmod host:/tmp

               host$ make LSMOD=/tmp/mylsmod localmodconfig

The above also works when cross compiling.

 "make localyesconfig" Similar to localmodconfig, except it will convert
                       all module options to built in (=y) options.
| improve this answer | |
1

You need to make sure that all modules you will ever need are loaded at the point you run make localmodconfig. One tool that can help to achieve this is https://github.com/graysky2/modprobed-db.

First, boot up a default distribution kernel and run /usr/bin/modprobed-db store periodically, or every time you connect some new piece of hardware.

Then, run sudo /usr/bin/modprobed-db recall which will load all the modules that were ever loaded when modprobe-db store was run, and now you do make localmodconfig.

| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.