1) solve the inconsistency between version magic
Original article: http://blog.sina.com.cn/s/blog_7d638eda010118rh.html
Http://tldp.org/LDP/lkmpg/2.6/html/x380.html
After compiling a kernel module, if the machine that installs the module runs a different kernel, it will report
Insmod: Error inserting 'poet _ atkm. Ko ':-1 invalid module format. Take a closer look at the/var/log/message file and you can find that the version magic is inconsistent.
Jun 4 22:07:54 localhost kernel: poet_atkm: Version magic '2. 6.5-1.358 custom 686 regparm 4 kstacks gcc-3.3 'could be '2. 6.5-1.358 686 regparm 4 kstacks gcc-3.3'
In fact, you can change the value in makefile to the existing one with the same kernel.
Version = 2 patchlevel = 6 sublevel = 5 extraversion =-1.358 custom
(Remove the above M and re-compile and burn the kernel)
2) Unknown symbol _ aeabi_unwind_cpp_pr0
Original article: http://johnmcu.blog.163.com/blog/static/17244625620109140555239/
"I am very depressed. Through customer service, I thought it was a cross-compiler problem at the beginning. However, after the test, the cross-compiler is normal and will crash soon, I burned the image provided by the CD in my Development Board, and the driver I transplanted myself was generated in my own kernel. ko file, resulting in a fatal error,The module and kernel image do not matchLater, I burned my own kernel and file system. Despite the many twists and turns, I finally kept the cloud open to see the moon, and finally I could load and uninstall the module !"
3) Automatic Generation of character Device Files
When I drive a character deviceArticleThe driver that automatically creates the character device file is written. As a result, each time the driver is loaded, the generated device file is a block device file instead of a character setting file.
So I decided on the Cross-compilation tool in the friendly version 4.3.2,Then re-compile your own kernel to build the root file system.And then mount the driver at the next time. Everything is OK !!!!
4) Request_ IRQ
Return Value-16
Original article: http://blog.sina.com.cn/s/blog_636a55070101j9t8.html
When the touch screen driver was written according to the video of phase II of Wei Dongshan, The request_irq returned-16, which indicates that the interrupt was occupied.
Solution: Add ir1_shared to flags of the request_irq function. Do not leave the last parameter blank and use free_irq on one side.
Therefore, writeProgramYou must check the return value to find the error as soon as possible.