Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2241902
  • 博文数量: 395
  • 博客积分: 10994
  • 博客等级: 上将
  • 技术积分: 5586
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-17 19:49
文章存档

2014年(1)

2013年(10)

2012年(74)

2011年(303)

2010年(7)

分类: 嵌入式

2011-06-22 10:08:35

下面有几个网址,可以看看nfs启动的内容:


http://blog.csdn.net/do2jiang/archive/2009/05/17/4195182.aspx)。

另外,这篇也不错,

 

http://blog.csdn.net/ghostbod/article/details/6533958

//4-3-3,使用nfs启动linux根文件系统,这里用到了uboot中的tftp命令

(注:实现nor flash中有uboot,而宿主机上有根文件系统,开发板开启后,在uboot中使用命令把linux内核通过tftp传输到开发板的内存中,然后使用nfs挂更文件系统,并且成功,也就是说tftp要事先配好)

[root@bogon linux-2.6.29]# vim config-mini2440

 307 CONFIG_ZBOOT_ROM_TEXT=0

 308 CONFIG_ZBOOT_ROM_BSS=0

 309 CONFIG_CMDLINE="root=/dev/nfs  nfsroot=59.70.157.174:/home/guoqian/nfsroot/     rootfs ip=59.70.157.173 rw console=ttySAC0 mem=64M"

 310 # CONFIG_XIP_KERNEL is not set

 311 # CONFIG_KEXEC is not set

[root@bogon linux-2.6.29]# cp config-mini2440 .config

[root@bogon linux-2.6.29]# ls -a

.                            config_qq2440_vga1024x768  .mailmap

..                           COPYING                    MAINTAINERS

arch                         CREDITS                    Makefile

block                        crypto                     mm

.config                      Documentation              net

config-mini2440              drivers                    README

config_mini2440_a70          firmware                   REPORTING-BUGS

config-mini2440-initramfs    fs                         samples

config_mini2440_l8           .gitignore                 scripts

config_mini2440_n35          include                    security

config-mini2440-ramdisk      init                       sound

config_mini2440_t35          ipc                        usr

config_mini2440_vga1024x768  Kbuild                     virt

config_qq2440_a70            kernel

config_qq2440_n35            lib

[root@bogon linux-2.6.29]# make menuconfig ARCH=arm CROSS_COMPILE=arm-linux-

其中的配置界面中选择

1File systems-->Network File Systems-->

<*>NFS client support

[*]NFS client support for NFS version 3

[*]Root file system on NFS

 

保存即可

 

[root@bogon linux-2.6.29]# make uImage ARCH=arm CROSS_COMPILE=arm-linux-

[root@bogon linux-2.6.29]# cp arch/arm/boot/uImage /tftpboot/

 

超级终端

U-Boot 2008.10 (Jun 18 2011 - 18:29:43)

 

DRAM:  64 MB

Flash:  2 MB

In:    serial

Out:   serial

Err:   serial

Mini2440 # printenv

bootdelay=3

baudrate=115200

netmask=255.255.255.0

ipaddr=59.70.157.173

serverip=59.70.157.174

ethaddr=00:01:02:03:04:05

stdin=serial

stdout=serial

stderr=serial

 

Environment size: 161/65532 bytes

Mini2440 # ping 59.70.157.174

dm9000 i/o: 0x20000300, id: 0x90000a46

DM9000: running in 16 bit mode

MAC: 00:01:02:03:04:05

host 59.70.157.174 is alive

 

Mini2440 # tftp 31000000 uImage uImage.rar   

dm9000 i/o: 0x20000300, id: 0x90000a46

DM9000: running in 16 bit mode

MAC: 00:01:02:03:04:05

TFTP from server 59.70.157.174; our IP address is 59.70.157.173

Filename 'uImage'.

Load address: 0x31000000

Loading: T #################################################################

         #################################################################

         ########

done

Bytes transferred = 2022456 (1edc38 hex)

 

Mini2440 # bootm 31000000

……..

eth0: link down

IP-Config: Guessing netmask 255.0.0.0

IP-Config: Complete:

     device=eth0, addr=59.70.157.173, mask=255.0.0.0, gw=255.255.255.255,

     host=59.70.157.173, domain=, nis-domain=(none),

     bootserver=255.255.255.255, rootserver=59.70.157.174, rootpath=

Looking up port of RPC 100003/2 on 59.70.157.174

eth0: link up, 100Mbps, full-duplex, lpa 0x41E1

Looking up port of RPC 100005/1 on 59.70.157.174

VFS: Mounted root (nfs filesystem) on device 0:11.

Freeing init memory: 128K

 

Processing /etc/profile... Done

 

# ls

bin      etc      linuxrc  proc     sys      usr

dev      lib      mnt      sbin     tmp      var

#

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