Today just to compile the kernel, and then compile and install the kernel module, and then compile the driver, drive the makefile in Kerneldir=/lib/modules/2.6.38/build, you can compile success, just the KO file down to the board, Insmod When Xx.ko, an error
XX version Magic ' 2.6.38 mod_unload modversion armv5 ' should be ' 2.6.38-friendlyarm mod_unload '
Insmod:cannot insert ' Xx.ko ': Invalid module format '
Before I knew, the version of the kernel source code for the compiler driver must be consistent with the version of the system in the Development Board, and I did, too, 2.6.38, but it went wrong.
After a friend's help, is the kernel configuration problem, with his already configured config file, copy to linux-2.6.38 root directory as. config, and then make Menuconfig arch=arm cross_compile=arm-linux- , the result I tried, will drive makefile Kerneldir directory as/home/student/tiny6410/linux-2.6.38, the result is correct. Before I configured the time, compile the kernel, so that the compiler driver is wrong, so I compiled and installed the kernel module, that only installed the kernel module, and then modify the driver makefile in the dependent kernel directory, it seems to be the kernel configuration problem.
Then I recompile driver, download KO file to the board, Insmod, still appear the same error.
I thought: This should not be the kernel configuration of the problem. I just thought I accidentally, when I copied the config file from samba to Linux, Found that can not be copied to the linux-2.6.38 directory, and other directories can be copied in, so think is not the issue of permissions, check the linux-2.6.38 permissions, is drwxr-xr-x, so I held the idea of trying to modify its permissions: chmod 777 linux-2.6.38, but the result was successful ...
Now finally can normal insmod and rmmod, this time can be assured to proceed to the next step.
To sum up the wrong reason:
1, there is a problem with the kernel configuration. The makefile can be driven, as before, just a linux-2.6.38 directory.
2, the folder linux-2.6.38 permissions issues.