The module is highly dependent on the data structure and function prototype. In other words, it is highly dependent on the kernel version. Function interfaces may change with the kernel version.
The error inserting-1 invalid module format error occurs when a module is loaded, probably because the source code tree version you used during compilation is different from the kernel version you want to load. For example,
2.6.35, but if you want to load on 2.6.38, the above problem may occur.
The best way to solve the above problem is to make the version consistent, orSource codeRe-compile the kernel to be loaded.
Details:
The kernel does not default that your module is correctly built on a specific version. However, it matches the information contained in your module with the information of the currently running kernel version, if the pairing succeeds, your module can be loaded successfully. Otherwise, the above error may occur. When the module is built, your module will be named vermagic. o file. This file contains a series of information about your module, including the kernel version, compiler version, and some important configuration parameters. When the module is loaded, the information will be tested to check whether it is compatible with the currently running kernel.
If the preceding error occurs, the system logs are recorded and placed in/var/log/messages.