1

I've modified a kernel module (qcaspi) and recompiled it, however my modifications aren't being called (checked dmesg) when the OS boots up.

Instead, the old kernel module is being run.

If I reload the module with rmmod and modprobe then my changes DO get called.

What's going on there? Where is the OS finding the old module if I modified it and now have a new .ko file?

4
  • 2
    As you don't mention the module itself, it's a very broad field. Do you use initrd/initramfs? If your module is required during an early stage of computer run, the module would need to be or compiled-in into kernel or present in initramfs version of /lib/kernel/...
    – d.c.
    Mar 27, 2021 at 19:26
  • 1
    depending on your distro, you probably need to run update-initramfs (debian, etc) or whatever the equivalent is in non-debian distros. you'll need to do this every time you re-compile your module, to make sure YOUR current version of it is available early in the bootup process.
    – cas
    Mar 29, 2021 at 3:55
  • @cas, this worked and I think it's exactly what I was looking for. Thanks so much. Would you add as an answer?
    – Eon
    Mar 30, 2021 at 7:51
  • @Eon I could do that....or you could write it up as an answer yourself, providing details of what you did and then accept it. my comment was pretty vague, just a pointer to the right direction - not really detailed enough for an answer. and was just building on what d.c. already said, anyway.
    – cas
    Mar 31, 2021 at 2:35

1 Answer 1

1

Thanks to the comments I was able to find a solution.

update-initramfs -v -u

This updates the archived kernel modules, the -v is for the verbose option.

Takes a few seconds but once done, I can restart my OS and my new driver gets called right away, instead of the older archived version :).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .