uboot下使用nfs下载失败,一直“Loading: T T T T”

1.Ubuntu安装 NFS 服务

sudo apt-get install nfs-kernel-server

2.打开 nfs 配置文件/etc/exports

sudo vi /etc/exports

3.打开/etc/exports 以后在后面添加如下所示内容(注“:wq!”强制保存退出)

/home/user/linux/nfs *(rw,sync,no_root_squash)

4.nfs下载失败有可能是Ubuntu的nfs版本高于uboot的nfs版本,在Ubuntu中指定nfs的版本兼容uboot的版本

输入下面的命令:

sudo vim /etc/default/nfs-kernel-server

更改里面的内容(注意填写正确)

# Number of servers to start up
#RPCNFSDCOUNT=8
RPCNFSDCOUNT="-V 2 8"
# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0

# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option. For more information,
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
#RPCMOUNTDOPTS="--manage-gids"
RPCMOUNTDOPTS="-V 2 --manage-gids"

# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=""

# Options for rpc.svcgssd.
#RPCSVCGSSDOPTS=""
RPCSVCGSSDOPTS="--nfs-version 2,3,4 --debug --syslog"

5.打开并且修改nfs配置文件!!

sudo vi /etc/nfs.conf

找到[nfsd],修改如下:(注“:wq!”强制保存退出)

[nfsd]
 51 # debug=0
 52 # threads=8
 53 # host=
 54 # port=0
 55 # grace-time=90
 56 # lease-time=90
 57 udp=y
 58 tcp=y
 59 vers2=y
 60 # vers3=y
 61 # vers4=y
 62 # vers4.0=y
 63 # vers4.1=y
 64 # vers4.2=y
 65 # rdma=n
 66 # rdma-port=20049
 67 #

6.关闭防火墙

sudo ufw disable

7.重启nfs server

sudo /etc/init.d/nfs-kernel-server restart

8.开始尝试在uboot下下载内核数据 先ping一下Ubuntu系统的ip地址,确认连接后可进行nfs下载内核数据

=> nfs 80800000 192.168.0.105:/home/imx6ull/nfs/zImage
Using ethernet@20b4000 device
File transfer via NFS from server 192.168.0.105; our IP address is 192.168.0.118
Filename '/home/imx6ull/nfs/zImage'.
Load address: 0x80800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################
done
Bytes transferred = 6785360 (678950 hex)

  • 4
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值