Driver Module Load Error: Insmod:can ' t insert ' Xx.ko ': Invalid module format

Source: Internet
Author: User
Objective

This error actually I met a few times, when the students play FL2440 Development Board when writing driver encountered this error, was consulted my embedded tutor Guo work to solve, but then did not timely to reflect on why. Now work has encountered the same problem, try to solve their own to understand. problem background and solutions

The problem stems from the time I used to compile the driven kernel and the different kernel mirroring configurations running on the developer board. After referring to the online blog, the cause of the problem is actually quite a lot, here summarized as follows:

1. The cross compiler used to compile the kernel does not match the kernel, resulting in some incompatible parameters;

For reason 1, you can refer to this blog blogger:

http://blog.csdn.net/stephen_yu/article/details/24481489 (article quotes from others blog, hereby declare)

2. The compiler-driven kernel does not match the kernel version running on the Development Board;

For reason 2, the solution is to ensure that the build-driven kernel version is consistent with the kernel version running on the Development Board;

3. The kernel version is consistent, but the kernel configuration file. config is not the same cause error;

Reason 3 is also one of the situations that I have encountered, in this case, Simply overwrite the. config file in the kernel source code that runs on the Development Board to the kernel source code for the compiler drive, then recompile the driver can, in fact, the reason 3 can be avoided, the reason I encountered this situation because in the company is responsible for each of the modules, the requirements of the configuration kernel is different, and I later in my own environment to compile the driver model Block onto someone else's development board to run, causing the problem.

4. Kernel version detection configuration option causes the driver to not load:

For reason 4, the solution is to configure the kernel and remove the version detection configuration option, as follows:

4.1 Configuring the Kernel:

Linux-3.14.38$make Menuconfig

Make menuconfig->enable loadable module support--->[*] module versioning support, "module versioning support" before the The asterisk is removed, and the Disable version detection option is available.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.