|
楼主 |
发表于 2010-4-16 11:47:31
|
显示全部楼层
2.6内核网卡驱动制作成功,skyeye已识别。祝贺一下。
主要修改步骤:
1.将附件中的cs8900.c和cs8900.h复制到 [linux kernel]/drivers/net/arm目录下,文件无须修改,适合友善之臂 linux-2.6.32.2内核;
2.创建[linux kernel]/include/asm-arm/arch-s3c2410(没有就新建)/smdk2410.h文件,内容如下:
#ifndef _INCLUDE_SMDK2410_H_
#define _INCLUDE_SMDK2410_H_
#define pSMDK2410_ETH_IO __phys_to_pfn(0x19000000)
#define vSMDK2410_ETH_IO 0xE0000000
#define SMDK2410_EHT_IRQ IRQ_EINT9
#endif //_INCLUDE_SMDK2410_H_
3.修改[linux kernel]/drivers/net/arm/Kconfig文件,末尾增加如下内容:
config ARM_CS8900
tristate "CS8900 support"
depends on NET_ETHERNET && ARM && ARCH_SMDK2410
help
Support for CS8900A chipset based Ethernet cards. If you have
a network (Ethernet) card of this type, say Y and read the
Ethernet-HOWTO, available from as well as . To compile this driver
as a module, choose M here and read. The module will be called cs8900.o.
4.修改[linux kernel]/drivers/net/arm/Makefile文件,末尾增加如下内容:
obj-$(CONFIG_ARM_CS8900) += cs8900.o
5.修改[linux kernel]/arch/arm/mach-s3c2410/mach-smdk2410.c文件,修改如下:
新增: #include "asm/arch-s3c2410/smdk2410.h"
修改:
static struct map_desc smdk2410_iodesc[] __initdata = {
/* nothing here yet */
{ vSMDK2410_ETH_IO , pSMDK2410_ETH_IO, SZ_1M, MT_DEVICE },
};
6. 修改[linux kernel]/include/linux/netdevice.h文件,修改如下:
找到struct net_device结构体,在结构体中增加void *priv;
所有修改完毕后就可以make了 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|