On Sun, Mar 12, 2017 at 12:00 PM, SIMRAN SINGHAL
<singhalsimr...@gmail.com> wrote:
> Reloading Modules
>
> make -j2 && sudo make modules_install
> sudo modprobe -r <module_name>
> sudo modprobe <module_name>
>
> In Reloading Modules I tried the first command it works fine for me.
>
> git/kernels/staging$ ls drivers/iio/dummy/*.ko
> drivers/iio/dummy/iio_dummy_evgen.ko  drivers/iio/dummy/iio_dummy.ko
>
> Then I tried to run second-command
>
> git/kernels/staging$ sudo modprobe -r iio_dummy_evgen
>
> I got the following error:-
> modprobe: FATAL: Module iio_dummy_evgen not found.
>
> I am not getting what is wrong with this.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

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.

To load a module from a directory other than /lib/modules/`uname -r`,
you want to use insmod and to remove it, rmmod.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to