24

I have a third party module to go with a frame grabber. I've downloaded the kernel source, followed the vendor's instructions to compile it, and have the resulting module, arvdrv.ko, sitting in a folder.

The vendor has supplied a script that loads the module into the kernel and it works when I run it; the module is loaded but only until the next boot. The script does not use modprobe. I can access the frame grabber when the module is installed.

It appears to me that modprobe maintains a list of many modules. One can edit /etc/modules to add a module name and it will load at boot but the module arvdrv is not in modprobe's list.

My question is how to let modprobe know of the module? Does it need to be copied to a new location and if so where?

32

Using sudo:

  1. Edit the /etc/modules file and add the name of the module (without the .ko extension) on its own line. On boot, the kernel will try to load all the modules named in this file.

  2. Copy the module to a suitable folder in /lib/modules/`uname -r`/kernel/drivers. In my case this was /lib/modules/`uname -r`/kernel/drivers/pci. This will place the module in modprobe's database. I don't know if this can be a link.

  3. Run depmod. This will find all the dependencies of your module.

  4. At this point, I rebooted and then run lsmod | grep module-name to confirm that the module was loaded at boot.

See the man pages for modprobe, lsmod, and depmod for more information.

  • 3
    I did follow your instructions but nothing worked until the vendor supplied some debugged code!!! Your answer is complete, simple, and I believe it would have worked had there not been vendor errors. Yes, I will accept it. – Nate Lockwood Jul 13 '14 at 15:21

protected by A.B. Jul 12 '15 at 10:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.