.ko 文件是如何构建的 [英] How .ko file is built
问题描述
我正在尝试将我自己的驱动程序移植到 Beagle 板 xm arm-cortex-A8.在移植时,我试图弄清楚 .ko
文件实际上是如何构建的.在我们的 Makefile 中,我们只有一个命令来构建 .o
文件.
I am trying to port my own driver to a Beagle board xm arm-cortex-A8. While porting I am trying to figuring out how the .ko
file actually builds. In our Makefile we only have a command to build an.o
file.
.ko
文件是如何构建的?
使用 linux-2.6.38.8 内核并尝试为我的内核配置驱动程序.
Using linux-2.6.38.8 kernel and trying to configure my driver for my kernel.
推荐答案
内核 kbuild 模块文档 有很多关于如何构建外部模块的信息.如果您有 Raspberian 或其他一些嵌入式 ARM Linux,则需要获取内核的源包.根据您是在运行模块的同一台机器上编译,还是尝试在 PC(希望是 Linux PC)上构建它,该过程会有所不同.
The kernel kbuild module document has lots of information on how to build an external module. If you have Raspberian or some other embedded ARM Linux, you will need to get the source package for your kernel. The process differs based on whether you are compiling on the same machine the module will run on, or if you are trying to build it on a PC (hopefully a Linux PC).
如果kbuild 模块文档没有很好地解释事情,请指定您需要构建的方式.
Please specify which way you need to build, if the kbuild module document doesn't explain things well enough.
这篇关于.ko 文件是如何构建的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!