0

I'm trying to insert the [.]Ko (Kernel Object) file for the on-board GPIO into my Linux kernel which succeeds using the command insmod < file-name.ko >

When the OS/Device Reboots, the kernel no longer has the mod inserted (checking using lsmod). I have also tried placing it in /lib/modules/4.19.0-14-amd64/kernel/drivers/gpio and running the "sudo update-initramfs -u" to update boot init but didn't work.

Is there any way to insert a kernel module permanently (sustains reboot)?

P.S. I don't want to use "@reboot insmod" in crontab. Using a Debian GNU/Linux 10 (buster)

FireCruZ
  • 1
  • 2
  • Wrong forum, post your question at https://unix.stackexchange.com/ – Jetchisel May 04 '21 at 13:59
  • 2
    You can edit `/etc/modules` or add a file to `/etc/modules-load.d/*.conf`. The listed modules will be loaded by **modprobe**, so the `modules.dep.bin` file generated by **depmod** needs to be up-to-date. – Ian Abbott May 04 '21 at 16:35
  • Using "depmod -a" solved the problem. Kudos @IanAbbott – FireCruZ May 04 '21 at 22:52

0 Answers0