如何交叉编译单个模块? [英] How do I cross compile a single module?

查看:22
本文介绍了如何交叉编译单个模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要交叉编译的是 USB gadget 串行驱动程序 (g_serial.ko).我已经安装了我的工具链并从 kernel.org 中查看了源代码.现在怎么做才能编译那个单一的模块?提前致谢!!

What I need to cross compile is the USB gadget serial driver (g_serial.ko). I have my toolchain installed and checked out the sources from kernel.org. Now what to do to just compile that single module? Thanks in advance!!

推荐答案

来自内核源码目录

make ARCH=arm CROSS_COMPILE=/your/cross/compile/prefix M=path/to/module/directory

make ARCH=arm CROSS_COMPILE=/your/cross/compile/prefix path/to/module/directory

这篇关于如何交叉编译单个模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆