Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
When executed insmod, there are mistakes
#insmod code.ko
code: version magic '3.18.0-linux4sam_4.7-YD-5D34-V6-g622a003 mod_unload ARMv7 p2v8 ’ should be '3.18.0-linux4sam_4.7-YD-5D34-V6-gfb5b482-dirty mod_unload ARMv7 p2v8 ’ insmod: can’t insert ‘code.ko’: invalidmodule format
Solution:
1. Enter the linux kernel source, found ./include/linux/vermagic.h
2. In vermagic.h will include a header file, enter the header
3 can be modified to set a version
4. recompiled driver generator. ko, then you can execute insmod.