QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1436|回复: 13

求助关于《LINUX驱动程序》这本书的问题!

[复制链接]
发表于 2004-2-20 13:22:36 | 显示全部楼层 |阅读模式
我现在刚开始学LINUX的驱动。我照着《LINUX驱动程序》这本书学的。但是我用他的第一个程序就不行,不知怎么回事啊!是不是程序不对啊!请教各位大大!
发表于 2004-2-20 22:04:15 | 显示全部楼层
内核版本的问题
回复

使用道具 举报

发表于 2004-2-21 00:01:34 | 显示全部楼层
what kernel u use? redhat one?

can u try to compile a vanilla kernel first?
回复

使用道具 举报

 楼主| 发表于 2004-2-27 09:43:26 | 显示全部楼层
我用的是RED HAT 9。0,应该不会有什么问题吧!
回复

使用道具 举报

发表于 2004-3-1 23:37:25 | 显示全部楼层
can u try to compile a vanilla kernel first?
回复

使用道具 举报

发表于 2004-3-4 15:34:33 | 显示全部楼层
LINUX驱动程序 例子,我记得采用的内核是2.0版本的;
LINUX驱动程序第二版 例子,我记得采用的内核是2.2版本的
回复

使用道具 举报

 楼主| 发表于 2004-3-4 19:16:37 | 显示全部楼层
没用阿,那本书的第一个程序,第一和第二版都一样的所以好像没有版本的问题阿!
回复

使用道具 举报

发表于 2004-3-5 08:33:58 | 显示全部楼层
[quote:66f48df096="Dragonfly"]can u try to compile a vanilla kernel first?[/quote]

询问:vanilla kernel有什么特别的地方吗?
回复

使用道具 举报

发表于 2004-3-6 00:52:02 | 显示全部楼层
less bugs. easy to understand, easy to gain help from others
回复

使用道具 举报

发表于 2004-3-7 16:24:14 | 显示全部楼层
Draqonfly,can you speak chinese ?
i'm not good at english,so i cann't understand you?

Just my opinion.


thank you.
回复

使用道具 举报

发表于 2004-3-10 05:06:27 | 显示全部楼层
sorry. i can not.  :-(
回复

使用道具 举报

发表于 2004-3-23 21:02:43 | 显示全部楼层
可以的
回复

使用道具 举报

发表于 2004-3-24 11:45:20 | 显示全部楼层
[quote:392c59c918="hzgzhang"]LINUX驱动程序 例子,我记得采用的内核是2.0版本的;
LINUX驱动程序第二版 例子,我记得采用的内核是2.2版本的[/quote]


1st edition is for 2.2 and 2.0
2nd edition is for 2.4 and 2.2 and 2.0


there is a sysdep.h under its source code directory that solves all version dependent issue.
回复

使用道具 举报

发表于 2004-3-24 23:28:48 | 显示全部楼层

Re: 求助关于《LINUX驱动程序》这本书的问题!

[quote:e31d2a0348="001ye"]我现在刚开始学LINUX的驱动。我照着《LINUX驱动程序》这本书学的。但是我用他的第一个程序就不行,不知怎么回事啊!是不是程序不对啊!请教各位大大![/quote]

if u do not use the vanilla kernel, for example, i use linux-2.4.22-1.2174.nptl.

then it is still easy to compile the ldd2-samples-1.0.1


in misc-progs/setlevel.c, add #include <errno.h>

then grep -r malloc.h * and change all malloc.h to slab.h

in misc-progs/inp.c and misc-progs/outp.c change asm/io.h to sys/io.h


then run make
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-29 11:39 , Processed in 0.043650 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表