ok6410,dm9000,2.6.32.27内核移植,亲测可用
硬件平台:ok6410A 128M的DDR 1G的nand flash
编译器 : arm-linux-gcc 4.2.2
linux运行环境:ubuntu 12.04.3
1 修改arch/arm/mach-s3c6410/mach-smdk6410.c
添加头文件 #include <linux/dm9000.h>
添加dm9000 结构体。
1 //add by acanoe dm9000 2 /* Ethernet */ 3 #define S3C64XX_PA_DM9000 (0x18000000) 4 #define S3C64XX_SZ_DM9000 SZ_1M 5 #define S3C64XX_VA_DM9000 S3C_ADDR(0x03b00300) 6 7 8 static struct resource dm9000_resources[] = { 9 [0] = { 10 .start = S3C64XX_PA_DM9000, 11 .end = S3C64XX_PA_DM9000 + 3, 12 .flags = IORESOURCE_MEM, 13 }, 14 [1] = { 15 .start = S3C64XX_PA_DM9000 + 4, 16 .end = S3C64XX_PA_DM9000 + S3C64XX_SZ_DM9000 - 1, 17 .flags = IORESOURCE_MEM, 18 }, 19 [2] = { 20 .start = IRQ_EINT(7), 21 .end = IRQ_EINT(7), 22 .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, 23 }, 24 }; 25 26 27 static struct dm9000_plat_data dm9000_setup = { 28 .flags = DM9000_PLATF_16BITONLY, 29 .dev_addr = { 0x08, 0x90, 0x00, 0xa0, 0x90, 0x90 }, 30 }; 31 32 33 static struct platform_device s3c_device_dm9000 = { 34 .name = "dm9000", 35 .id = 0, 36 .num_resources = ARRAY_SIZE(dm9000_resources), 37 .resource = dm9000_resources, 38 .dev = { 39 .platform_data = &dm9000_setup, 40 } 41 }; 42 //#ifdef CONFIG_DM9000 43 //add by acanoe dm9000
在static struct platform_device *smdk6410_devices[] __initdata结构体中插入
&s3c_device_dm9000, // dm9000 driver add by acanoe
即
#ifdef CONFIG_DM9000 &s3c_device_dm9000, // dm9000 driver add by acanoe #endif // add by acanoe 2 // &smdk6410_smsc911x,// Canceled by acanoe 对于OK6410 的网卡实验来说,这一项一定要注释掉。
注:&smdk6410_smsc911x驱动一定要注释掉,因为他的地址和dm9000的物理地址重叠会出错
然后保存 make menuconfig 修改配置
File systems --->
Network File Systems --->
<*> NFS file system support ## 必选
[*] Provide NFSv3 client support ## 可选
[*] Root file system on NFS ## 必选
Networking --->
[*] Networking support
Networking options --->
[*] IP: kernel level autoconfiguration ## 必选
Device Drivers --->
[*] Network device support --->
[*] Ethernet (10 or 100Mbit) --->
<*> DM9000 support
(4) DM9000 maximum debug level
需要打开IP:Kernel level autoconfiguration 以及下面所有的选项 BOOTP, RARP,而且NFS Client Support不能是模块,必须编译进内核