Setup question
ErikLambrechts opened this issue · 2 comments
Forgive me my lacking understanding of Linux modules. I'm stuck setting up this project. I don't understand the next instruction properly.
This will create ch341-buses.ko, which can the be insmod'ed.
Compile the code works flawlessly and results in the aforementioned ch341-buses.ko
file. Using insmod
is not clear to me.
As far as I understand, I'm supposed to run
sudo insmod ch341-buses.ko
But this results in the following error,
insmod: ERROR: could not insert module ch341-buses.ko: Invalid module format
Thanks in advance.
Your insmod command is correct. The most likely cause of the error is that you built the module against the wrong version of Kernel headers.
You can check this with:
modinfo ch341-buses.ko
And the output is something like:
vermagic: 5.15.2-2-MANJARO SMP preempt mod_unload
Maybe you don't have the matching headers installed to the Kernel your system is currently running? Or you have installed Kernel updates but did not reboot your machine yet?
Look at the output of dmesg
. There might be some error there too.