主题 : 请问如何单独编译驱动程序 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 3687
精华: 0
发帖: 18
金钱: 180 两
威望: 155 点
综合积分: 36 分
注册时间: 2009-02-02
最后登录: 2009-11-25
楼主  发表于: 2009-07-03 01:17

 请问如何单独编译驱动程序

我重新编译内核之后没有把led,button那些驱动编进去,想自己单独编译了之后通过insmod加载。但是不知道怎么单独编译驱动,主要是不知道怎么连接那些外部库,高手指教。

arm-linux-gcc -c mini2440_leds.c -o led.o -I/root/linux-2.6.29/include/

我这样编译,不行。一大堆错误。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-07-03 07:16
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 3687
精华: 0
发帖: 18
金钱: 180 两
威望: 155 点
综合积分: 36 分
注册时间: 2009-02-02
最后登录: 2009-11-25
2楼  发表于: 2009-07-03 10:48
需要交叉编译阿。。。能详细点吗??