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

- 67,283
- 35
- 116
- 255

- 225
-
1Your question is not clear. Can you precise it? – Mathieu Jan 04 '16 at 20:18
2 Answers
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.

- 73,126
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
.

- 2,038