Reputation: 21
I have modified the default "nvme" device driver to suit my project and I am trying to automatically load the modified nvme driver (mnvme) at boot time but I am not successful.
I have edited /lib/modules/{kernel-version}/modules.alias file to include "mnvme" instead of "nvme" but the default "nvme" keeps getting loaded.
I also see mnvme: module verification failed: signature and/or required key missing - tainting kernel on kernel messages.
Note: I am able to manually remove "nvme" and load "mnvme" using rmmod and insmod commands respectively. I would prefer to do it automatically at boot time
Thanks, Bala.
Upvotes: 2
Views: 5282
Reputation: 4412
To automatically load your module:
Copy all .ko files related to your module into respective location under /lib/modules/{kernel-version}/kernel/
, e.g. under /lib/modules/4.1.19-v7+/kernel/drivers/nvme/
for nvme driver.
Run depmod -a
. That should update information required by modprobe
which is used to automatically load the modified module. A useful resource for how kernel modules get loaded is section 1.2 'How Do Modules Get Into The Kernel?' of this guide http://www.tldp.org/LDP/lkmpg/2.6/lkmpg.pdf.
If you've modified any headers that you need in user space then make sure to update relevant header file under /usr/include
.
To avoid taint message, the commit the changes you've made, e.g. git commit -sam "...."
.
Upvotes: 2