编译Linux驱动程序 遇到的问题
2013-05-30 15:40
357 查看
基于Ubuntu 12.10,编译Linux驱动程序
1. 准备linux内核源码
此时,我要编译的驱动是基于Ubuntu 12.10内核的,所以我下载的是其对应的内核源码包:
linux_3.5.0-17.28.diff.gz
linux_3.5.0-17.28.dsc
linux_3.5.0.orig.tar.gz
使用命令dpkg-source -x linux_3.5.0-17.28.dsc解压内核源码包,并将diff包中的patch打上。
2. 设置内核源码正确的路径
# cd /root/linux-3.5.0
# ln -s /root/linux-3.5.0 /lib/modules/3.5.0-17-generic/build
3. 编译驱动程序
# cd /root/wifidriver
# make build
此时,可能遇到如下问题:
其中一个ERROR,需执行make oldconfig && make prepare
其中一个WARNING,需将/usr/src/linux-headers-3.5.0-17-generic/Module.symvers复
制到/root/linux-3.5.0中,然后执行make oldconfig && make prepare
&& make scripts
1. 准备linux内核源码
此时,我要编译的驱动是基于Ubuntu 12.10内核的,所以我下载的是其对应的内核源码包:
linux_3.5.0-17.28.diff.gz
linux_3.5.0-17.28.dsc
linux_3.5.0.orig.tar.gz
使用命令dpkg-source -x linux_3.5.0-17.28.dsc解压内核源码包,并将diff包中的patch打上。
2. 设置内核源码正确的路径
# cd /root/linux-3.5.0
# ln -s /root/linux-3.5.0 /lib/modules/3.5.0-17-generic/build
3. 编译驱动程序
# cd /root/wifidriver
# make build
此时,可能遇到如下问题:
make[1]: Entering directory `/root/linux-3.5.0' ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. WARNING: Symbol version dump /root/linux-3.5.0/Module.symvers is missing; modules will have no dependencies and modversions. Building modules, stage 2. /root/linux-3.5.0/scripts/Makefile.modpost:42: include/config/auto.conf: No such file or directory make[2]: *** No rule to make target `include/config/auto.conf'. Stop. make[1]: *** [modules] Error 2 make[1]: Leaving directory `/root/linux-3.5.0' make: *** [default] Error 2 |
其中一个WARNING,需将/usr/src/linux-headers-3.5.0-17-generic/Module.symvers复
制到/root/linux-3.5.0中,然后执行make oldconfig && make prepare
&& make scripts
相关文章推荐
- 基于ubuntu14.04下编译linux-2.6.34版本内核的步骤和遇到的一些问题及解决
- linux 编译遇到的问题
- Linux下编译MySQLdb遇到的问题
- linux编译安装遇到问题记录
- 使用嵌入式linux完全手册光盘的arm-linux-gcc 遇到问题 自己编译
- linux信号程序编译遇到的问题
- linux下使用sublime-text写coffee遇到的编译问题
- 在linux64位机器上编译时遇到的两个问题
- Linux内核编译过程中遇到的问题
- linux驱动程序多模块编译链接时的问题
- 解决了Linux 下编译 speech-tools 遇到的问题
- Linux手动安装TMUX 编译 以及遇到的问题
- MIPS 架构 Linux driver编译时遇到的问题
- 编译第一个Linux程序遇到的问题- ‘cout’ was not declared in this scope
- Linux 下编译安装ACE时遇到的问题及解决
- linux下编译sqlite3的API遇到问题解决
- MIPS 架构 Linux driver编译时遇到的问题
- Linux下使用Eclipse编译C/C++代码时遇到问题的说明
- 总结一下编译linux内核 linux-2.6.34所遇到的问题。
- 编译内核(linux-2.4.19)时遇到的问题-make dep