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 the module through the init.sh #2

Open
lianzisong opened this issue Feb 13, 2023 · 3 comments
Open

could not insert the module through the init.sh #2

lianzisong opened this issue Feb 13, 2023 · 3 comments

Comments

@lianzisong
Copy link

make -C /lib/modules/5.15.0-58-generic/build M=/media/sf_D_DRIVE/Kernel-Module-master/udev modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-58-generic'
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-58-generic'
Loading Kernel Module...
insmod: ERROR: could not insert module ldx_udev.ko: Invalid module format
Done!
find: ‘/dev/LDX_UDEV’: No such file or directory
Finished!

@Milo-D
Copy link
Owner

Milo-D commented Feb 15, 2023

Need more information (current kernel version, ...) Probably built against incompatible kernel sources i.e. version mismatch. Also, check dmesg.

Edit: Oh yeah, also don't forget to run init.sh as root (see comments in init.sh).

@lianzisong
Copy link
Author

lianzisong commented Feb 16, 2023

here is the info:
1.I use the 'uname -r' command show the result:[5.15.0-60-generic]
2. and I assume the Makefile can locate the source code of the kernel automaticly , case the Makefile use the [(shell uname -r)] to locate the kernel source code? Am I right ?
and of course ,I use the sudo to execute the init.sh.
but the dmesg still shows the errors :ldx_udev: disagrees about version of symbol module_layout.
it seems that the source code of kernel mismatch my system kernel . But why ?
and I'm trying to download the source code by typing apt install linux-source, and the code in /usr/src/ is 'linux-source-5.4.0', I'm so confused the version. Any clue?

@lianzisong
Copy link
Author

here is the info: 1.I use the 'uname -r' command show the result:[5.15.0-60-generic] 2. and I assume the Makefile can locate the source code of the kernel automaticly , case the Makefile use the [(shell uname -r)] to locate the kernel source code? Am I right ? and of course ,I use the sudo to execute the init.sh. but the dmesg still shows the errors :ldx_udev: disagrees about version of symbol module_layout. it seems that the source code of kernel mismatch my system kernel . But why ? and I'm trying to download the source code by typing apt install linux-source, and the code in /usr/src/ is 'linux-source-5.4.0', I'm so confused the version. Any clue?

it seems that I should do the "apt install linux-source" fisrt, then I can get the correct head files in the /lib/modules/ .
but I got wrong version of head files yesterday.
but I still wander why the command in the make file '(shell uname -r)' can't locate the right head files?
and clue about that?
thanks.

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