标题: 关于2.6内核驱动问题?
sherry_wang
新生入学
Rank: 1



UID 205065
精华 0
积分 10(积分有什么用?)
帖子 2
阅读权限 10
注册 2007-7-24
状态 离线
发表于 2007-8-21 10:39  资料  个人空间  短消息  加为好友 
关于2.6内核驱动问题?

各位大虾:
      我现在安装的的是linux的内核版本是2.4.20-8,我想在这个基础上编译一个运行在arm开发板上(内核版本2.6.14)hello的驱动。
我不知道该怎么写这个makefile?谢谢!

顶部
不容错过的IBM 集群技术资源汇总
sherry_wang
新生入学
Rank: 1



UID 205065
精华 0
积分 10(积分有什么用?)
帖子 2
阅读权限 10
注册 2007-7-24
状态 离线
发表于 2007-8-21 13:01  资料  个人空间  短消息  加为好友 
//下面是测试代码
#ifndef __KERNEL__
# define __KERNEL__
#endif
#ifndef MODULE
# define MODULE
#endif

#include <linux/config.h>
#include <linux/module.h>

MODULE_LICENSE("GPL");
#ifdef CONFIG_SMP
#define __SMP__
#endif

#include <linux/kernel.h>
int
init_module
(){
printk("Hello,World!\n");
return 0; /}

void
cleanup_module
(){
printk("---------hello!\n");
}

顶部
 



当前时区 GMT+8, 现在时间是 2008-5-17 22:17

    Powered by Discuz! 5.5.0  © 2001-2007 Comsenz Inc.
Processed in 0.069629 second(s), 5 queries

清除 Cookies - 联系我们 - Linux伊甸园 - Archiver - WAP