网上下载了ldd3的源代码,按照一些说明安装了linux-headers-2.6.20-16-generic。
但在编译驱动程序是还是报linuxe/config.h无法找到。
在/usr/src/linux下find了一把,发现config.h在config/x86/find/smp/config.h目录下。
修改驱动程序的原代码linux/config.h ------> config/x86/find/smp/config.h
编辑OK。如下:
make -C /lib/modules/2.6.20-16-generic/build M=/home/xxxx/lddsrc/examples/simple LDDINCDIR=/home/xxxx/lddsrc/examples/simple/../include modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-16-generic'
CC [M] /home/xxxx/lddsrc/examples/simple/simple.o
Building modules, stage 2.
MODPOST 1 modules
CC /home/xxxx/lddsrc/examples/simple/simple.mod.o
LD [M] /home/xxxx/lddsrc/examples/simple/simple.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-generic'
[分享]Ubuntu下驱动程序编译
软件和网站开发以及相关技术探讨
前往
- 公告/注意事项
- ↳ 新闻和通知
- ↳ 软件推荐
- 系统安装
- ↳ 教学和常见问答
- ↳ 系统安装和升级
- ↳ 启动和引导
- ↳ 网卡无线拨号
- ↳ 硬件与内核
- ↳ 笔记本及便携设备
- ↳ Ubuntu衍生版
- ↳ 其他类Unix OS发行版
- ↳ Debian发行版
- 配置美化
- ↳ 中文显示和输入法
- ↳ 个人配置文件存放点
- ↳ 软件文档翻译
- ↳ 窗口管理器及美化
- ↳ 桌面展示
- 软件使用
- ↳ 办公、图像、机械电子设计等
- ↳ Vim和Emacs
- ↳ 开源模板库
- ↳ 互联网相关软件
- ↳ 影音多媒体
- ↳ 游戏和模拟器
- ↳ 虚拟机和虚拟化
- ↳ Wine及其分支
- ↳ 其它类软件
- 服务器管理
- ↳ 服务器运维
- ↳ 云计算和容器(K8S/KVM/Docker/WSL等)
- ↳ Ubuntu VPS
- 程序设计与开发
- ↳ Shell脚本
- ↳ 软件/网站开发
- ↳ 内核及嵌入式开发
- ↳ Ubuntu编译和打包
- ↳ 开源小工具
- ↳ 挑战任务
- 感想与交流
- ↳ 深度PK版
- ↳ Ubuntu故事和感慨
- ↳ 同城交流
- ↳ 校园社团
- ↳ 港澳台校区
- ↳ 国外校区
- 站务区
- ↳ 论坛管理
- ↳ Ubuntu中文网上商店