Registry Mirror
Skip to content

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

Open

Description

@lianzisong

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!

Activity

  1. Milo-D commented on Feb 15, 2023

    @Milo-D
    Owner

    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).

  2. lianzisong commented on Feb 16, 2023

    @lianzisong
    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?

  3. lianzisong commented on Feb 16, 2023

    @lianzisong
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions