Akagi201
8/13/2014 - 1:50 PM

modprobe.md

modprobe是一个用户层程序用来添加或者删除一个LKM(Loadable Kernel Module)到linux内核. 他通常是非直接使用的: udev依赖modprobe来加载驱动对于自动检测到的硬件.

modprobe作为module-init-tools的一部分来发布.

Features

  • 能够做出更直观的决定关于哪个modules来load.
  • 明确的module dependencies, 所以当请求load一个module时候, 他先添加其他需要的modules.
  • 解决递归module depencies问题.

modprobe vs insmod

  • Modprobe will cause a kernel module to be loaded from the installed kernel from the /lib/modules directory, modprobe will add modules, remove modules, and find module dependencies.

  • Insmod will load any particular .ko file you point it at, whether in /lib/modules or not. insmod, combined with rmmod, is useful when working on a module; allowing you to recompile just the module and test it, without having to do a whole kernel compile.