How do I configure modprobe to find my module?

后端 未结 3 1983
没有蜡笔的小新
没有蜡笔的小新 2020-12-12 13:40

I\'m trying to get a kernel module to load at boot.

If I run insmod /path/to/module.ko, it works fine. But this has to be repeated every time I reboot.<

3条回答
  •  情书的邮戳
    2020-12-12 14:13

    Follow following steps:

    1. Copy hello.ko to /lib/modules/'uname-r'/misc/
    2. Add misc/hello.ko entry in /lib/modules/'uname-r'/modules.dep
    3. sudo depmod
    4. sudo modprobe hello

    modprobe will check modules.dep file for any dependency.

提交回复
热议问题