启动时自动加载模块和目标文件

发布于 2024-10-16 10:03:18 字数 168 浏览 5 评论 0原文

我创建了一个 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 then modprobe -a.
  • I think it damaged my system.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

酒几许 2024-10-23 10:03:18

您的发行版可能有一个配置文件来列出系统启动时必须加载的所有内核模块。尝试使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文