Failed to load Module

Source: Internet
Author: User
Failed to load module-general Linux technology-Linux programming and kernel information. The following is a detailed description. A simple module is compiled today. I added the module code to the kernel tree (version 2.6.26) for compilation. The process is still smooth, but errors always occur when loading. The prompt is:

Insmod: error inserting 'hello. ko ':-1 Invalid module format

View the key line of dmesg discovery:

Hello: version magic '2. 6.26 SMP mod_unload 586 'could be '2. 6.26 SMP mod_unload 686 4 kstacks'

Use modinfo to view the module:

Filename: hello. ko
License: GPL
Description: hello example
Author: Linyi
Depends:
Vermagic: BRL. 26 SMP mod_unload 586

It turns out to be a compilation type error.

Re-compile the module

Make menuconfig

Set the processor type:



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // docs.google.com/File? Id = dfgfw34r_10df4qp34k_ B '); ">

Set Kernel stack parameters



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // docs.google.com/File? Id = dfgfw34r_1164rk8f2_ B '); ">

Then re-compile the module.

Make modules

View the module information again:

Filename: hello. ko
License: GPL
Description: hello example
Author: Linyi
Depends:
Vermagic: 2.6.26 SMP mod_unload 686 4 KSTACKS

Then the insmod is finally successful.

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.