Problems with Linux porting driver Insmod

Source: Internet
Author: User

Errors that may occur when Insmod: (question 5 is the actual problem you are experiencing, others are learning from his experience)
1.warning:function declaration isnt a prototype
This kind of error is also very common, mainly for some of the functions of the fixed format of the wrong use. For example, int function () is renamed int function (void)
static int xxxx_init (void) Remember not to lack static, while static void Xxxx_exit (void)

2. The cause of warning:assignment makes pointer from integer without a cast appears
The first may be the problem of type conversion. The return value type of the function, etc.
Second, there is no declaration of the function found in the source file, probably forgot to add the header file. (non-declared function prototypes all default to return int values


3, Makefile:4: * * * missing separator. Stop.
Recently used SourceInsight3.5 editing program, which directly edit the saved Word format. To open in binary mode with Winhex or UltraEdit.
The tab character corresponds to 0x09 and should not be a few 0x20. This is the main use VI to open the file, cut into the end of the line mode, using ": Set FF =unix"

4.hello:version Magic 2.6.30.4 mod_unload ARMv4 should Be2.6.30.4-embedsky mod_unload ARMv4
Insmod:cannot Insert Hello.ko:invalid Module format
Cause of Error: The module version does not match the kernel version!
Workaround: Import the preset configuration information, enter Menuconfig continue to configure General Config, () Local version
Add the following in parentheses: "-embedsky" exits save As. config, recompile the kernel, drive module, and then load the module


AA Insmod Buttons.ko
Buttons:unknown symbol __aeabi_unwind_cpp_pr0 (err 0)
Insmod:can ' t insert ' Buttons.ko ': unknown symbol in module or invalid parameter
Cause: The driver module does not match the kernel image
Workaround: Find the same as the kernel mirror downloaded to the board: modify Makefile
Kern_dir =/work/system/linux-3.4.2 (the kernel image of the original default path)
Change to (kernel image of the path downloaded to the board) Kern_dir =/work/system/linux_suspend/linux-3.4.2

Problems with Linux porting driver Insmod

Related Article

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.