Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

could not insert module ch341-core.ko: Invalid module format #19

Open
botoxparty opened this issue Oct 17, 2023 · 1 comment
Open

could not insert module ch341-core.ko: Invalid module format #19

botoxparty opened this issue Oct 17, 2023 · 1 comment

Comments

@botoxparty
Copy link

Hi,

I get the following error when I try to insert the modules.

(base) ➜  ch341-i2c-spi-gpio git:(master) ✗ sudo insmod ch341-core.ko   
insmod: ERROR: could not insert module ch341-core.ko: Invalid module format

I saw on a previous issue that it could have been built against the wrong kernel headers, how would I build against the right ones?

This is what modprobe returns:

(base) ➜  ch341-i2c-spi-gpio git:(master) ✗ modinfo ch341-core.ko
filename:       /home/adam/apps/ch341-i2c-spi-gpio/ch341-core.ko
license:        GPL
description:    CH341 USB to I2C/SPI/GPIO adapter
author:         Frank Zago <frank@zago.net>
srcversion:     76BBA2A35D7BD3BEBADD4D8
alias:          usb:v1A86p5512d*dc*dsc*dp*ic*isc*ip*in*
depends:        
retpoline:      Y
name:           ch341_core
vermagic:       6.2.0-26-generic SMP preempt mod_unload modversions 

Thanks

@frank-zago
Copy link
Owner

It's likely the module has not been built for the running kernel. 'dmesg' may show the real error.
Try a "make clean" then "make" again to rebuild.
If that doesn't work, check the installed packages. The kernel and its dev or devel package must match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants