Problem in First-Patch-Tutorial

valdis.kletnieks at vt.edu valdis.kletnieks at vt.edu
Sun Mar 12 11:34:17 EDT 2017


On Sun, 12 Mar 2017 15:49:31 +0200, Alexander Kapshuk said:

> Are these drivers, drivers/iio/dummy/{iio_dummy_evgen,iio_dummy}.ko,
> something of your own making, as I'm not seeing them in the kernel
> source tree?
>
> The 'modules_install' make target installs drivers that have been
> compiled as modules as opposed to those compiled into the kernel, into
> /lib/modules/`uname -r`. For your own modules added to the kernel
> source tree, or built out-of-tree, that would involve putting
> appropriate entries into  Kconfig and/or Makefiles.
>
> Modeprobe expects your module to be found in /lib/modules/`uname -r`.
> Otherwise, your module won't get loaded.

One other thing to remember is that although 'make modules_install' will
take all the .ko files from in-tree modules and put them in their proper
place in /lib/modules/`uname-r`  and then run 'depmod', many out-of-tree
Makefiles manage to forget to do that last step.

modprobe is a wrapper around insmod - and the file produced by 'depmod'
are what the wrapper uses to find the module.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
Url : http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20170312/7b8a1560/attachment.bin 


More information about the Kernelnewbies mailing list