linux - 插入具有循环依赖性的模块 (*.ko)

标签 linux module device-driver

我有三个 Linux 内核模块(*.ko 文件)。他们有这样的循环依赖:

  • mod1.ko 使用 mod3.ko
  • 导出的函数
  • mod2.ko 使用 mod1.ko
  • 导出的函数
  • mod3.ko 使用 mod1.komod2.ko
  • 导出的函数

由于“未知符号”错误,我无法加载第一个 mod1.ko 文件。我也尝试了其他两种方法,但我得到了同样的错误:

  • 一次加载所有模块

    insmod mod1.ko mod2.ko mod3.ko
    
  • 将这些文件放入/lib/modules/kernel_version/my_modules,然后运行

    depmod kernel_version
    modprobe mod3
    

谁能帮帮我!任何建议表示赞赏。提前致谢:)

最佳答案

那么,将这三个模块合并为一个怎么样?

关于linux - 插入具有循环依赖性的模块 (*.ko),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5481903/

相关文章:

linux - Timthumb 和 tmp 文件夹

javascript - 在 Node.js 中,为什么使用 require 函数在模块之间变量相等?

python - PIL 错误 : The _imaging C module is not installed

linux - 为端口 0x60 安装中断处理程序的最佳方法

linux - 将驱动程序添加到 Yocto 树莓派镜像

php - 通过 PHP 和 SSH 的 Git : ssh authentification of user apache denied

linux - 如何在 shell 脚本中检查这种情况?

module - Yii2 自定义/较短的命名空间

windows - 用自定义驱动程序替换 Windows USB 类驱动程序?

linux - select() 对/dev/input/mice 上的写入没有响应