linux-2.6.35内核移植—网卡驱动的移植
2013-01-18 09:27
477 查看
一、移植环境:
1、 Ubuntu 10.10发行版
2、 u-boot.bin
3、 目标机:FS_S5PC100平台
4、 交叉编译器 arm-cortex_a8-linux-gnueabi-gcc
---------------------------------------------------------------------
二、移植步骤
1、平台代码修改
添加需要的头文件
平台设备的添加
按 Ctrl+C 复制代码
/** DM9000 Support **/
#if defined(CONFIG_DM9000)
static struct resource dm9000_resources[] = {
[0] = {
.start = 0x88000000,
.end = 0x88000000 + 0x3,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0x88000000 + 0x4,
.end = 0x88000000 + 0x4 + 0x3,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = IRQ_EINT(10),
.end = IRQ_EINT(10),
.flags = IORESOURCE_IRQ | IRQ_TYPE_LEVEL_HIGH,
},
};
static struct dm9000_plat_data s5pc100_dm9000_platdata = {
.flags = DM9000_PLATF_16BITONLY,
.dev_addr[0] = 0x00,
.dev_addr[1] = 0x00,
.dev_addr[2] = 0x3e,
.dev_addr[3] = 0x26,
.dev_addr[4] = 0x0a,
.dev_addr[5] = 0x00,
};
static struct platform_device s5pc100_device_dm9000 = {
.name = "dm9000",
.id = -1,
.num_resources = ARRAY_SIZE(dm9000_resources),
.resource = dm9000_resources,
.dev = {
.platform_data = & s5pc100_dm9000_platdata,
},
};
#endif
按 Ctrl+C 复制代码
平台设备列表的添加
2、配置内核
网络配置
网上驱动配置
网络文件系统的配置
---------------------------------------------------------------------
三、编译内核,并拷贝到tftpboot目录下
启动开发板,修改内核启动参数,通过NFS方式挂载根文件系统,挂载方式可参考 NFS服务器配置。
原文链接:/article/6004287.html
1、 Ubuntu 10.10发行版
2、 u-boot.bin
3、 目标机:FS_S5PC100平台
4、 交叉编译器 arm-cortex_a8-linux-gnueabi-gcc
---------------------------------------------------------------------
二、移植步骤
1、平台代码修改
$ vim arch/arm/mach-s5pc100/mach-smdkc100.c
添加需要的头文件
#if defined(CONFIG_DM9000) #include <linux/dm9000.h> #include <linux/irq.h> #endif
平台设备的添加
按 Ctrl+C 复制代码
/** DM9000 Support **/
#if defined(CONFIG_DM9000)
static struct resource dm9000_resources[] = {
[0] = {
.start = 0x88000000,
.end = 0x88000000 + 0x3,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = 0x88000000 + 0x4,
.end = 0x88000000 + 0x4 + 0x3,
.flags = IORESOURCE_MEM,
},
[2] = {
.start = IRQ_EINT(10),
.end = IRQ_EINT(10),
.flags = IORESOURCE_IRQ | IRQ_TYPE_LEVEL_HIGH,
},
};
static struct dm9000_plat_data s5pc100_dm9000_platdata = {
.flags = DM9000_PLATF_16BITONLY,
.dev_addr[0] = 0x00,
.dev_addr[1] = 0x00,
.dev_addr[2] = 0x3e,
.dev_addr[3] = 0x26,
.dev_addr[4] = 0x0a,
.dev_addr[5] = 0x00,
};
static struct platform_device s5pc100_device_dm9000 = {
.name = "dm9000",
.id = -1,
.num_resources = ARRAY_SIZE(dm9000_resources),
.resource = dm9000_resources,
.dev = {
.platform_data = & s5pc100_dm9000_platdata,
},
};
#endif
按 Ctrl+C 复制代码
平台设备列表的添加
#if defined(CONFIG_DM9000) &s5pc100_device_dm9000, #endif
2、配置内核
$ make menuconfig
网络配置
[*] Networking support(NEW) ---> Networking option ---> <*> Packet socket <*> Unix domain socket [*] TCP/IP networking [*] IP: multicasting [*] IP: kernel level autoconfiguration [*] IP: BOOTP support
网上驱动配置
[*] Device Drivers ---> [*] Network device support ---> [*] Ethernet(10 or 100Mbit) ---> <*> DM9000 support
网络文件系统的配置
File systems ---> [*] Network File Systems ---> <*> NFS client support [*] NFS client support for NFS version 3 [*] NFS client support for the NFSv3 ACL protocol extension [*] Root file system on NFS
---------------------------------------------------------------------
三、编译内核,并拷贝到tftpboot目录下
$ make zImage $ cp arch/arm/boot/zImage /tftpboot
启动开发板,修改内核启动参数,通过NFS方式挂载根文件系统,挂载方式可参考 NFS服务器配置。
原文链接:/article/6004287.html
相关文章推荐
- linux-2.6.35内核移植—网卡驱动的添加
- linux-2.6.35内核移植—网卡驱动的移植
- 基于2.6.35内核的无线网卡驱动的移植
- Linux 2.6.35内核配置和网卡驱动添加
- linux-2.6.35内核移植——Nand flash 驱动的移植
- linux-2.6.35内核移植—Nand flash驱动的添加(分区)
- 移植Linux3.4.2版本内核到mini2440(二)--添加网卡、UVC摄像头、LCD驱动
- linux-2.6.35内核移植—LCD驱动的添加
- linux-2.6.35内核移植—USB驱动的添加
- linux-2.6.35内核移植—SD卡驱动的添加
- 基于Linux-2.6.35内核的wifi驱动移植
- 移植Linux3.4.2版本内核到mini2440(二)--添加网卡、UVC摄像头、LCD驱动
- FS2410 开发板linux-2.6.35内核 LCD 驱动移植
- 【转】 linux内核移植和网卡驱动(二)
- linux-2.6.35内核配置和网卡驱动添加
- 【移植驱动到Linux3.4.2内核之一】移植DM9000C网卡驱动
- linux-2.6.35内核配置和网卡驱动添加 .
- Linux芯片级移植与底层驱动(基于3.7.4内核) --SMP多核启动以及CPU热插拔驱动 推荐
- Linux-2.6.32.2内核在mini2440上的移植(九)---触摸屏驱动移植
- Linux2.6内核驱动移植参考