Chinaunix首页 | 论坛 | 博客
  • 博客访问: 117873
  • 博文数量: 31
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 296
  • 用 户 组: 普通用户
  • 注册时间: 2015-01-10 21:57
文章分类

全部博文(31)

文章存档

2016年(4)

2015年(27)

我的朋友

分类: LINUX

2015-02-07 00:12:32

客户端挂接nfs一直没有成功,提示错误如下:

nfs: server 192.168.1.101 not responding, still trying
nfs: server 192.168.1.101 OK
一直在找nfs服务器配置的问题,今天猛的看到一篇文章说可能是内核驱动dm9000的问题,烧写友善之臂提供的uboot和内核,果然轻松挂接nfs成功,纠结了两天的问题终于有点头绪了。

linux服务器版本:红帽6.4版本

1、修改内核代码中关于dm9000部分代码  打开内核 drivers/net/dm9000.c,红色部分为添加的代码
添加头文件:
#if defined(CONFIG_ARCH_S3C2410)
#include
#endif

static int __init
dm9000_init(void)
{
#if defined(CONFIG_ARCH_S3C2410)
    unsigned int oldval_bwscon = *(volatile unsigned int *)S3C2410_BWSCON;
    unsigned int oldval_bankcon4 = *(volatile unsigned int *)S3C2410_BANKCON4;
    *((volatile unsigned int *)S3C2410_BWSCON) =
    (oldval_bwscon & ~(3<<16)) | S3C2410_BWSCON_DW4_16 | S3C2410_BWSCON_WS4 | S3C2410_BWSCON_ST4;
    *((volatile unsigned int *)S3C2410_BANKCON4) = 0x1f7c;
#endif
    printk(KERN_INFO "%s Ethernet Driver, V%s\n", CARDNAME, DRV_VERSION);

    return platform_driver_register(&dm9000_driver);
}


2、配置linux服务器
#vi /etc/exports/
#/home/..../rootfs  *(rw,sync,no_root_squash)

#/etc/init.d/nfs restart


3、配置rootfs根文件系统

#cd rootfs
3.1修改 etc/eth0-setting
#vi etc/eth0-setting
#IP=192.168.1.102                        注:        (开发板地址)
#Mask=255.255.255.0
#Gateway=192.168.1.1
#DNS=192.168.1.1
#MAC=08:90:90:90:90:90
3.2 修改 etc/hosts
添加一行代码
#localhost   192.168.1.1

4、启动开发,启动yaffs2根文件系统,挂载nfs文件
#mount -t nfs -o nolock 192.168.1.101:/home/.../rootfs /mnt

阅读(2091) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~