|
发表于 2009-5-4 11:58:57
|
显示全部楼层
将 网卡 编进内核:
可以用内核自带的 smc91x 驱动,
在assabet上改,加 platform_device 定义到 assabet.c中:
257static struct resource smc91x_resources[] = {
258 [0] = {
259 .name = "smc91x-regs",
260 .start = SA1100_CS3_PHYS + 0xc00, //网卡地址 0x18000c00
261 .end = SA1100_CS3_PHYS + 0x01ffffff,
262 .flags = IORESOURCE_MEM,
263 },
264 [1] = {
265 .start = 0, // 置 0 ,内核自己去检测 中断号
266 .end = 0,
267 .flags = IORESOURCE_IRQ,
268 },
269 [2] = {
270 .name = "smc91x-attrib",
271 .start = SA1100_CS3_PHYS + 0x02000000,
272 .end = SA1100_CS3_PHYS + 0x03ffffff,
273 .flags = IORESOURCE_MEM,
274 },
275};
276
277static struct platform_device smc91x_device = {
278 .name = "smc91x",
279 .id = 0,
280 .num_resources = ARRAY_SIZE(smc91x_resources),
281 .resource = smc91x_resources,
282};
283
284static struct platform_device *devices[] __initdata = {
285 // &neponset_device,
286 // &sa1111_device,
287 &smc91x_device,
288};
在
static void __init assabet_init(void)
platform_add_devices(devices, ARRAY_SIZE(devices));
-----------------------------------------------------------------
内核认网卡了 ,但 NFS boot 还有问题:
dhcp 都可以得到 正确的ip path 等,
显示 VFS: Mounted root (nfs filesystem).
然后不断显示:
eth0: fubar (rxlen 0 status c600
eth0: fubar (rxlen 0 status c6ff
不知dack有没有遇到这情况,如何解决? |
|