启动时自动加载模块和目标文件
我创建了一个 module.ko 和一个使用该模块的目标文件 a.out 。 有人知道我如何在启动时加载它们吗?
- 我对我的模块执行了
depmod
,然后执行了modprobe -a
。 - 我认为它损坏了我的系统。
I have created a module.ko and a object file a.out that uses the module.
Does someone know how I load them both on booting?
- I did
depmod
to my module and thenmodprobe -a
. - I think it damaged my system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的发行版可能有一个配置文件来列出系统启动时必须加载的所有内核模块。尝试使用
man 5 module
来检查它是如何工作的。否则请检查名为 /etc/modules 的文件或操作系统的文档。It is likely that your distro has a configuration file to list all kernel modules that must be loaded when the system boots. Try
man 5 modules
to check how it works. Otherwise check a file named /etc/modules, or the documentation of your OS.