Answers:
从内核自述文件:
“ make localmodconfig”基于当前配置和加载的模块(lsmod)创建一个配置。禁用已加载模块不需要的任何模块选项。
要为另一台计算机创建localmodconfig,请将该计算机的lsmod存储到文件中,并将其作为LSMOD参数传递。
target$ lsmod > /tmp/mylsmod target$ scp /tmp/mylsmod host:/tmp host$ make LSMOD=/tmp/mylsmod localmodconfig
当交叉编译时,上述内容也适用。
"make localyesconfig" Similar to localmodconfig, except it will convert all module options to built in (=y) options.
您需要确保在运行时加载所有需要的模块make localmodconfig
。https://github.com/graysky2/modprobed-db是一种可以帮助实现这一目标的工具。
首先,启动默认的分发内核并/usr/bin/modprobed-db store
定期运行,或者在每次连接新硬件时运行。
然后,运行sudo /usr/bin/modprobed-db recall
将加载modprobe-db store
运行时曾经加载的所有模块,现在您可以执行make localmodconfig
。