您尚未登录。

楼主 #1 2018-10-21 22:11:47

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

nuc970评估版nfs启动失败的问题

最近因工作需要,目前做nuc970 开发板nfs启动的实验,但是现在nfs挂载不上。
开发板启动给出的错误为

usbcore: registered new interface driver usb-storage
TCP: cubic registered
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
[color#ff0000]
nuc970-emac0 nuc970-emac0: eth0 is OPENED
IP-Config: Complete:
     device=eth0, hwaddr=08:00:27:00:01:92, ipaddr=10.0.20.81, mask=255.255.255.0, gw=10.0.20.254
     host=10.0.20.81, domain=, nis-domain=(none)
     bootserver=10.0.20.78, rootserver=10.0.20.78, rootpath=
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.101 #3
[/color]
Backtrace: 
[<c0011f24>] (dump_backtrace+0x0/0x10c) from [<c0012138>] (show_stack+0x18/0x1c)
 r6:c03fd8d0 r5:00008000 r4:c03977a8 r3:00000000
[<c0012120>] (show_stack+0x0/0x1c) from [<c031a1c8>] (dump_stack+0x20/0x28)
[<c031a1a8>] (dump_stack+0x0/0x28) from [<c0317db4>] (panic+0xa4/0x1f8)
[<c0317d10>] (panic+0x0/0x1f8) from [<c03e2054>] (mount_block_root+0x1c4/0x270)
 r3:00000030 r2:00000000 r1:c3843ea0 r0:c03977a8
 r7:c0397810
[<c03e1e90>] (mount_block_root+0x0/0x270) from [<c03e22e8>] (mount_root+0xec/0x114)
[<c03e21fc>] (mount_root+0x0/0x114) from [<c03e2470>] (prepare_namespace+0x160/0x1c0)
 r8:c03fd8a8 r7:c043b5a0 r6:c03fd8d0 r5:c03fd8d0 r4:c043b600
[<c03e2310>] (prepare_namespace+0x0/0x1c0) from [<c03e1c48>] (kernel_init_freeable+0x1d8/0x220)
 r6:c043b5a0 r5:00000007 r4:c0402114
[<c03e1a70>] (kernel_init_freeable+0x0/0x220) from [<c0317710>] (kernel_init+0x10/0x158)
[<c0317700>] (kernel_init+0x0/0x158) from [<c000ecf8>] (ret_from_fork+0x14/0x3c)
 r5:c0317700 r4:00000000

开发板的启动命令如下

mem=64M console=ttyS0,115200n8 root=/dev/nfs rw rdinit=/sbin/init mtdparts=nand0:16M(boot)ro,-(rootfs) nfsroot=10.0.20.78:/home/cookie/nuc970bsp/rootfs ip=10.0.20.81:10.0.20.78:10.0.20.254:255.255.255.0::eth0:off

内核配置了配置了IP支持,nfs客户端支持,root filesystem on nfs.
开发的Linux主机上配置了nfs,同时再另一台电脑上用虚拟机测试能够正确挂载nfs。
但是目前启动不了。求论坛大神给小弟一点指导。google上查询了很多方法但是都不行。

最近编辑记录 thy442156388 (2018-10-21 22:15:29)

离线

#2 2018-10-21 22:16:42

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

看错误提示是nfs根文件系统没有挂载上, 现在要排除问题:

1. 确认你的 nfs server 能不能被其它linux挂载上?
2. NUC97x使用别的根文件让系统能进入shell, 手动 mount nfs 文件系统,看是否出错.





离线

楼主 #3 2018-10-21 22:21:16

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

晕哥 说:

看错误提示是nfs根文件系统没有挂载上, 现在要排除问题:

1. 确认你的 nfs server 能不能被其它linux挂载上?
2. NUC97x使用别的根文件让系统能进入shell, 手动 mount nfs 文件系统,看是否出错.

那这个和busybox 编译的命令有关系么 ?我再看busybox编译配置的时候,印象中mount有一个选项要配置是否支持nfs挂载。是不是自己制作的别的根文件系统再编译busybox 的时候应该加上这个选项。

离线

#4 2018-10-21 22:26:40

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

busybox 我记得和 NFS 无关, 没有NFS配置选项。

linux filesystem 里面需要配置 NFS.





离线

楼主 #5 2018-10-21 22:35:24

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

内核系统配置是采用新唐给的linux3.10的内核,然后使用nuc972_defconfig。在这个基础上
取消了General setup--》中的Initial RAM filesystem and RAM disk support ,
配置了Networking support---》中的networking options 中的IP:kernel level autoconfiguration;
         File system---》下 network file system nfs client 所有选项
          File system---》下 network file system 下的 root file system on nfs

这样的内核配置有问题么 ?

离线

#6 2018-10-21 22:45:19

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

这个难说, 你不能确认网络没有问题吧?你也不能确定NFS服务器一定没有问题吧?

所以还是按照我前面说的方法,
通过其它根文件系统启动到shell,
1. 设置好NUC97x的ip地址, ping NFS服务器, 可以发现NUC97x网络配置,硬件等有没有问题。
2. 手动 mount NFS 服务器到本地目录, 可以判断服务器是否正常。

上面都可以之后再配置 u-boot/kernel的 bootargs,设置一楼那些NFS 根文件系统参数,
这样从NFS启动就问题不大了,
如果有问题,也可以排除很多问题了。





离线

楼主 #7 2018-10-24 15:09:12

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

晕哥 说:

这个难说, 你不能确认网络没有问题吧?你也不能确定NFS服务器一定没有问题吧?

所以还是按照我前面说的方法,
通过其它根文件系统启动到shell,
1. 设置好NUC97x的ip地址, ping NFS服务器, 可以发现NUC97x网络配置,硬件等有没有问题。
2. 手动 mount NFS 服务器到本地目录, 可以判断服务器是否正常。

上面都可以之后再配置 u-boot/kernel的 bootargs,设置一楼那些NFS 根文件系统参数,
这样从NFS启动就问题不大了,
如果有问题,也可以排除很多问题了。

我按你说的做了测试,但是新的问题又来了,我烧写了yaffs2文件系统的方式来启动开发板,但是在yaffs2文件系统下仍然不能够挂在nfs。我在我的另外一台电脑的ubunutu虚拟机中测试是可以挂在nfs的。

离线

#8 2018-10-24 15:28:40

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

首先,能ping通那台nfs服务器吗?





离线

楼主 #9 2018-10-24 15:45:59

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

现在yaffs2文件系统的nfs能够挂在上去了,在制作文件系统的时候在busybox中的mount命令配置里,官方给的默认配置mount没有给配置挂载nfs的功能,重新配置制作的文件系统可以挂载nfs,但是开发板的启动挂载仍然不行。

离线

#10 2018-10-24 16:10:01

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

thy442156388 说:

现在yaffs2文件系统的nfs能够挂在上去了,在制作文件系统的时候在busybox中的mount命令配置里,官方给的默认配置mount没有给配置挂载nfs的功能,重新配置制作的文件系统可以挂载nfs,但是开发板的启动挂载仍然不行。

就是说用 yaffs2 根文件系统进去后可以 mount nfs 文件系统,
用 nfs 作为根文件系统不能进入 shell ?

1. 检查是不是 u-boot 的网络功能是否正常, 在 u-boot 命令行 ping nfs服务器的ip地址
2. bootargs 命令行是不是有问题.





离线

楼主 #11 2018-10-24 16:37:44

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

是的NFS作为根文件系统,不能够进入shell,错误提示和一楼代码一样。uboot网络功能正常,能够正常ping通服务器地址,下面是我的uboot环境变量设置。

baudrate=115200
bootargs11=noinitrd root=/dev/nfs nfsroot=10.0.20.78:/home/cookie/nuc970bsp/rootfs ip=10.0.20.83:10.0.20.78:10.0.20.254:255.255.255.0::eth0:off console=ttyS0,115200n8 rdinit=/sbin/init 
bootargs=noinitrd console=ttyS0,115200n8 root=/dev/nfs rw rdinit=/linuxrc nfsroot=10.0.20.78:/home/cookie/nuc970bsp/rootfs ip=10.0.20.195:10.0.20.78:10.0.20.254:255.255.255.0::eth0:off
bootcmd=nboot 0x7fc0 0 0x200000;bootm 0x7fc0
bootdelay=3
ethact=emac
ethaddr=00:00:00:11:66:88
ipaddr=10.0.20.196
netmask=255.255.255.0
rootpath=/home/cookie/nuc970bsp/rootfs
serverip=10.0.20.78
stderr=serial
stdin=serial
stdout=serial

离线

楼主 #12 2018-10-24 16:50:47

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

启动过程串口输出是这样的

## Booting kernel from Legacy Image at 00007fc0 ...
   Image Name:   
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4451904 Bytes = 4.2 MiB
   Load Address: 00007fc0
   Entry Point:  00008000
   Verifying Checksum ... OK
SF: Detected W25Q128 with page size 4 KiB, total 16 MiB
SF: DeviceBooting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.101 (cookie@cookie-HP) (gcc version 4.8.4 (GCC) ) #13 PREEMPT Wed Oct 24 14:44:15 CST 2018
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: NUC970
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd console=ttyS0,115200n8 root=/dev/nfs rw rdinit=/linuxrc nfsroot=10.0.20.78:/home/cookie/nuc970bsp/rootfs ip=10.0.20.195:10.0.20.78:10.0.20.254:255.255.255.0::eth0:off
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60316k/60316k available, 5220k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
      .text : 0xc0008000 - 0xc03e6f04   (3964 kB)
      .init : 0xc03e7000 - 0xc0409680   ( 138 kB)
      .data : 0xc040a000 - 0xc0446e40   ( 244 kB)
       .bss : 0xc0446e40 - 0xc047da60   ( 220 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:625
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys perf_event
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0359d38 - 0xc0359d74
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource nuc970-timer1
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
msgmni has been set to 117
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
nuc970-uart.0: ttyS0 at I/O 0x0 (irq = 36) is a NUC970
brd: module loaded
nuc970 mtd nand driver version: 20160331
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
SYSTEM: USE     BCH_T4 HWECC algorithm(SMRA     size: 64, Parity number:32 bytes)
EXECUTE: USE BCH_T4     HWECC algorithm(SMRA size: 64, Parity number:32 bytes)
USE     BCH_T4 HWECC algorithm(Parity number:32 bytes)
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
Creating 3 MTD partitions on "nand0":
0x000000000000-0x000000200000 : "u-boot"
0x000000200000-0x000001600000 : "Kernel"
0x000001600000-0x000008000000 : "user"
fmi-sm: registered successfully! mtdid=nand0
libphy: nuc970_rmii0: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
nuc970-ehci nuc970-ehci: Nuvoton NUC970 EHCI Host Controller
nuc970-ehci nuc970-ehci: new USB bus registered, assigned bus number 1
nuc970-ehci nuc970-ehci: irq 23, io mem 0xb0005000
nuc970-ehci nuc970-ehci: USB 2.0 started, EHCI 0.95
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
nuc970-ohci nuc970-ohci: Nuvoton NUC970 OHCI Host Controller
nuc970-ohci nuc970-ohci: new USB bus registered, assigned bus number 2
nuc970-ohci nuc970-ohci: irq 24, io mem 0xb0007000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver usb-storage
ipip: IPv4 over IPv4 tunneling driver
gre: GRE over IPv4 demultiplexor driver
ip_gre: GRE over IPv4 tunneling driver
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
nuc970-emac0 nuc970-emac0: eth0 is OPENED
IP-Config: Complete:
     device=eth0, hwaddr=08:00:27:00:01:92, ipaddr=10.0.20.195, mask=255.255.255.0, gw=10.0.20.254
     host=10.0.20.195, domain=, nis-domain=(none)
     bootserver=10.0.20.78, rootserver=10.0.20.78, rootpath=
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
1f00            2048 mtdblock0  (driver?)
1f01           20480 mtdblock1  (driver?)
1f02          108544 mtdblock2  (driver?)
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.101 #13
Backtrace: 
[<c0011dc4>] (dump_backtrace+0x0/0x10c) from [<c0011f60>] (show_stack+0x18/0x1c)
 r6:c0404eac r5:00008000 r4:c03b7e8c r3:00000000
[<c0011f48>] (show_stack+0x0/0x1c) from [<c0356c98>] (dump_stack+0x20/0x28)
[<c0356c78>] (dump_stack+0x0/0x28) from [<c0354894>] (panic+0xa4/0x1fc)
[<c03547f0>] (panic+0x0/0x1fc) from [<c03e81dc>] (mount_block_root+0x1c4/0x270)
 r3:00000001 r2:00000000 r1:c3843ea0 r0:c03b7e8c
 r7:c03b7ef4
[<c03e8018>] (mount_block_root+0x0/0x270) from [<c03e8470>] (mount_root+0xec/0x114)
[<c03e8384>] (mount_root+0x0/0x114) from [<c03e85f8>] (prepare_namespace+0x160/0x1c0)
 r8:00000069 r7:c0404e8c r6:c0404eac r5:c0404eac r4:c0446ea0
[<c03e8498>] (prepare_namespace+0x0/0x1c0) from [<c03e7dd0>] (kernel_init_freeable+0x1f8/0x240)
 r6:c03e74c8 r5:c0404e84 r4:00000007
[<c03e7bd8>] (kernel_init_freeable+0x0/0x240) from [<c03541f0>] (kernel_init+0x10/0x158)
[<c03541e0>] (kernel_init+0x0/0x158) from [<c000eb98>] (ret_from_fork+0x14/0x3c)
 r5:c03541e0 r4:00000000

离线

#13 2018-10-24 16:52:30

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

你把整个log都传上来,包括u-boot的.





离线

#14 2018-10-24 16:53:56

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

https://www.centos.org/forums/viewtopic.php?t=55622

问题原来是NFS协议版本。目标板显然希望默认使用版本2,但CentOS 7不支持。在bootargs中向nfsroot变量添加“,nfsvers = 3”解决了这个问题。











https://blog.richliu.com/2015/06/22/1823/nfs-debug-%E7%A2%B0%E5%88%B0%E7%9A%84%E6%80%AA%E5%95%8F%E9%A1%8C

這個問題只要加上 nolock 參數就好了, 所以 nfsroot args 會長的像這樣

mem=512M root=/dev/nfs rw nfsroot=${serverip}:/nfs/fusion,nfsvers=3,nolock ip=${ipaddr}:${serverip}:${gatewayip}:255.255.255.0::eth0:off’

看看会不会是这个问题.





离线

楼主 #15 2018-10-24 17:01:04

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

依然挂载不上去,现在感觉可能是我这边的服务器配置有问题,串口启动代码如下

## Booting kernel from Legacy Image at 00007fc0 ...
   Image Name:   
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4451904 Bytes = 4.2 MiB
   Load Address: 00007fc0
   Entry Point:  00008000
   Verifying Checksum ... OK
SF: Detected W25Q128 with page size 4 KiB, total 16 MiB
SF: DeviceBooting Linux on physical CPU 0x0
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.10.101 (cookie@cookie-HP) (gcc version 4.8.4 (GCC) ) #13 PREEMPT Wed Oct 24 14:44:15 CST 2018
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: NUC970
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: noinitrd console=ttyS0,115200n8 root=/dev/nfs rw rdinit=/linuxrc nfsroot=10.0.20.78:/home/cookie/nuc970bsp/rootfs,nfsvers=3 ip=10.0.20.195:10.0.20.78:10.0.20.254:255.255.255.0::eth0:off
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 60316k/60316k available, 5220k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)
    lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)
      .text : 0xc0008000 - 0xc03e6f04   (3964 kB)
      .init : 0xc03e7000 - 0xc0409680   ( 138 kB)
      .data : 0xc040a000 - 0xc0446e40   ( 244 kB)
       .bss : 0xc0446e40 - 0xc047da60   ( 220 kB)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:625
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys perf_event
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0359d38 - 0xc0359d74
devtmpfs: initialized
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switching to clocksource nuc970-timer1
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP: reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
nfs4filelayout_init: NFSv4 File Layout Driver Registering...
msgmni has been set to 117
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
nuc970-uart.0: ttyS0 at I/O 0x0 (irq = 36) is a NUC970
brd: module loaded
nuc970 mtd nand driver version: 20160331
NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size: 64
SYSTEM: USE     BCH_T4 HWECC algorithm(SMRA     size: 64, Parity number:32 bytes)
EXECUTE: USE BCH_T4     HWECC algorithm(SMRA size: 64, Parity number:32 bytes)
USE     BCH_T4 HWECC algorithm(Parity number:32 bytes)
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
Creating 3 MTD partitions on "nand0":
0x000000000000-0x000000200000 : "u-boot"
0x000000200000-0x000001600000 : "Kernel"
0x000001600000-0x000008000000 : "user"
fmi-sm: registered successfully! mtdid=nand0
libphy: nuc970_rmii0: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
nuc970-ehci nuc970-ehci: Nuvoton NUC970 EHCI Host Controller
nuc970-ehci nuc970-ehci: new USB bus registered, assigned bus number 1
nuc970-ehci nuc970-ehci: irq 23, io mem 0xb0005000
nuc970-ehci nuc970-ehci: USB 2.0 started, EHCI 0.95
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
nuc970-ohci nuc970-ohci: Nuvoton NUC970 OHCI Host Controller
nuc970-ohci nuc970-ohci: new USB bus registered, assigned bus number 2
nuc970-ohci nuc970-ohci: irq 24, io mem 0xb0007000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver usb-storage
ipip: IPv4 over IPv4 tunneling driver
gre: GRE over IPv4 demultiplexor driver
ip_gre: GRE over IPv4 tunneling driver
TCP: cubic registered
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
Key type dns_resolver registered
nuc970-emac0 nuc970-emac0: eth0 is OPENED
IP-Config: Complete:
     device=eth0, hwaddr=08:00:27:00:01:92, ipaddr=10.0.20.195, mask=255.255.255.0, gw=10.0.20.254
     host=10.0.20.195, domain=, nis-domain=(none)
     bootserver=10.0.20.78, rootserver=10.0.20.78, rootpath=
VFS: Mounted root (nfs filesystem) on device 0:11.
devtmpfs: mounted
Freeing unused kernel memory: 136K (c03e7000 - c0409000)
nfs: server 10.0.20.78 not responding, still trying
nfs: server 10.0.20.78 not responding, still trying
nfs: server 10.0.20.78 OK
nfs: server 10.0.20.78 not responding, still trying
nfs: server 10.0.20.78 not responding, still trying

离线

楼主 #16 2018-10-24 17:09:42

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

我的nfs配置文件/etc/exports 中配置如下,这里会不会和linux版本有关,我开发机是Ubuntu18.04的64位机。安装的是nfs-kernel-service软件包。

/home/cookie/nuc970bsp/rootfs *(rw,sync,no_subtree_check)

离线

#17 2018-10-24 17:11:55

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

你确认用同一个Image, yaffs2根文件系统能mount nfs?
如果可以,应该就和nfs服务器没多大关系。





离线

楼主 #18 2018-10-24 17:29:31

thy442156388
会员
所在地: 新疆乌鲁木齐
注册时间: 2018-10-21
已发帖子: 72
积分: 72

Re: nuc970评估版nfs启动失败的问题

问题解决了,nfs协议默认使用UDP协议连接,掉包严重,需要指定NFS使用TCP协议来连接。这里需要更改的是在nfsroot加上tcp选项,添加之后的bootargs参数类似这样

bootargs=noinitrd console=ttyS0,115200n8 root=/dev/nfs rw rdinit=/linuxrc nfsroot=10.0.20.78:/home/cookie/nuc970bsp/rootfs,nfsvers=3,nolock,tcp

评估板的网卡型号为ICplus PHYs,这个掉包严重的问题和这个网卡有关么 ?
最后非常感谢晕哥的耐心指导。不甚感激

离线

#19 2018-10-24 17:37:07

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

thy442156388 说:

问题解决了,nfs协议默认使用UDP协议连接,掉包严重,需要指定NFS使用TCP协议来连接。这里需要更改的是在nfsroot加上tcp选项,添加之后的bootargs参数类似这样

bootargs=noinitrd console=ttyS0,115200n8 root=/dev/nfs rw rdinit=/linuxrc nfsroot=10.0.20.78:/home/cookie/nuc970bsp/rootfs,nfsvers=3,nolock,tcp

评估板的网卡型号为ICplus PHYs,这个掉包严重的问题和这个网卡有关么 ?
最后非常感谢晕哥的耐心指导。不甚感激

应该和phy芯片关系不大,倒是和硬件,布线,网络,软件驱动关系比较大,
这个phy芯片用量挺大,如果有这种问题早就暴露了。

最后感谢分享, 为后来到这里的朋友填坑.





离线

#20 2018-11-04 21:20:28

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

晕哥 说:

首先,能ping通那台nfs服务器吗?

[   13.852036]   #0: V3s Audio Codec
[  109.926782] VFS: Unable to mount root fs via NFS, trying floppy.
[  109.933356] VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[  109.940677] Please append a correct "root=" boot option; here are the available partitions:
[  109.949050] b300         1932288 mmcblk0 
[  109.949056]  driver: mmcblk
[  109.955851]   b301           20480 mmcblk0p1 adb9da71-01
[  109.955854] 
[  109.962669]   b302         1909760 mmcblk0p2 adb9da71-02
[  109.962672] 
[  109.969478] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[  109.977734] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.13.16-licheepi-zero+ #6
[  109.985030] Hardware name: Allwinner sun8i Family

上面的启动信息显示挂载nfs没成功,ping通nfs服务器是在u-boot命令行下进行ping?下面是nfs服务器的挂载情况
_20181104211340_20181104-0818.png

离线

#21 2018-11-04 21:28:51

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

晕哥 说:

看错误提示是nfs根文件系统没有挂载上, 现在要排除问题:

1. 确认你的 nfs server 能不能被其它linux挂载上?
2. NUC97x使用别的根文件让系统能进入shell, 手动 mount nfs 文件系统,看是否出错.

測試一下 2

而且要在 linux 的 shell 能ping通服务器才行,u-boot的不算.





离线

#22 2018-11-04 21:50:09

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

晕哥 说:
晕哥 说:

看错误提示是nfs根文件系统没有挂载上, 现在要排除问题:

1. 确认你的 nfs server 能不能被其它linux挂载上?
2. NUC97x使用别的根文件让系统能进入shell, 手动 mount nfs 文件系统,看是否出错.

測試一下 2

而且要在 linux 的 shell 能ping通服务器才行,u-boot的不算.

_20181104214805.png
我将bootargs改回到读取tf卡第二分区启动,上面的10.23.13.250是ubuntu ip地址,也是nfs的ip地址,这样ping通能正面服务器没问题?

离线

#23 2018-11-05 08:03:51

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

605364021 说:
晕哥 说:
晕哥 说:

看错误提示是nfs根文件系统没有挂载上, 现在要排除问题:

1. 确认你的 nfs server 能不能被其它linux挂载上?
2. NUC97x使用别的根文件让系统能进入shell, 手动 mount nfs 文件系统,看是否出错.

測試一下 2

而且要在 linux 的 shell 能ping通服务器才行,u-boot的不算.

https://whycan.cn/files/members/1205/_20181104214805.png
我将bootargs改回到读取tf卡第二分区启动,上面的10.23.13.250是ubuntu ip地址,也是nfs的ip地址,这样ping通能正面服务器没问题?

然后再 mount nfs 试一试.





离线

#24 2018-11-05 17:33:11

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

nfs启动rootfs,是必须要u-boot命令行中能ping通nfs服务器?

离线

#25 2018-11-05 17:41:54

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

_20181105173731.jpg
在tf卡启动情况下,挂载nfs服务器是成功的,可以在/mmt目录下看到服务器的文件,可以ping通nfs服务器,但是u-boot命令行ping不通nfs服务器

离线

#26 2018-11-05 18:19:46

v3s
会员
注册时间: 2017-09-08
已发帖子: 105
积分: 105

Re: nuc970评估版nfs启动失败的问题

605364021 说:

nfs启动rootfs,是必须要u-boot命令行中能ping通nfs服务器?

应该不用的。






此人很懒,没有签名!

离线

#27 2018-11-05 18:24:48

v3s
会员
注册时间: 2017-09-08
已发帖子: 105
积分: 105

Re: nuc970评估版nfs启动失败的问题

605364021 说:

https://whycan.cn/files/members/1205/_20181105173731.jpg
在tf卡启动情况下,挂载nfs服务器是成功的,可以在/mmt目录下看到服务器的文件,可以ping通nfs服务器,但是u-boot命令行ping不通nfs服务器

你的 bootargs 是什么?






此人很懒,没有签名!

离线

#28 2018-11-05 18:39:11

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

v3s 说:
605364021 说:

https://whycan.cn/files/members/1205/_20181105173731.jpg
在tf卡启动情况下,挂载nfs服务器是成功的,可以在/mmt目录下看到服务器的文件,可以ping通nfs服务器,但是u-boot命令行ping不通nfs服务器

你的 bootargs 是什么?

setenv bootargs root=/dev/nfs nfsroot=10.23.13.250:/home/nfs ip=10.23.13.100:10.23.13.250:10.23.13.1:255.255.252.0::ens33:off init=/linuxrc console=ttyS0,115200 

其中10.23.13.250是ubuntu ip地址(nfs服务器地址),10.23.13.100是我在u-boot命令行中的ip地址,10.23.13.1是gatewayip地址,255.255.252.0是netmask,ens33是网卡名字,
可以看下有没有设置错误,

离线

#29 2018-11-05 19:08:51

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

605364021 说:
v3s 说:
605364021 说:

https://whycan.cn/files/members/1205/_20181105173731.jpg
在tf卡启动情况下,挂载nfs服务器是成功的,可以在/mmt目录下看到服务器的文件,可以ping通nfs服务器,但是u-boot命令行ping不通nfs服务器

你的 bootargs 是什么?

setenv bootargs root=/dev/nfs nfsroot=10.23.13.250:/home/nfs ip=10.23.13.100:10.23.13.250:10.23.13.1:255.255.252.0::ens33:off init=/linuxrc console=ttyS0,115200 

其中10.23.13.250是ubuntu ip地址(nfs服务器地址),10.23.13.100是我在u-boot命令行中的ip地址,10.23.13.1是gatewayip地址,255.255.252.0是netmask,ens33是网卡名字,
可以看下有没有设置错误,

把 /home/nfs 目录下的文件也列一下





离线

#30 2018-11-05 21:26:15

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

1_20181105-0823.png
这是/home/nfs目录下文件,是解压rootfs.tar得出的文件,下面图是挂载情况
_20181105212524.jpg

离线

#31 2018-11-05 21:39:45

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

这样看,也没什么问题,貌似一切正常,但是为什么不能挂载nfs 文件系统呢?


https://whycan.cn/t_1766.html#p10544
https://whycan.cn/t_1766.html#p11350

对比了1楼和20楼, 一楼多一些调试信息:

IP-Config: Complete:
     device=eth0, hwaddr=08:00:27:00:01:92, ipaddr=10.0.20.81, mask=255.255.255.0, gw=10.0.20.254
     host=10.0.20.81, domain=, nis-domain=(none)
     bootserver=10.0.20.78, rootserver=10.0.20.78, rootpath=
VFS: Unable to mount root fs via NFS, trying floppy.





离线

#32 2018-11-05 22:34:39

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

晕哥 说:

这是我编译好的带以太网的u-boot:   u-boot-sunxi-with-splethernet.7z

能不能用都可以到本帖反馈。

我的u-boot用的晕哥提供的u-boot

u-boot中的ip设置ipaddr=10.23.14.100,netmask=255.255.252.0 gatewayip=10.23.13.1  nfsserver=10.23.13.250 serverip=10.23.13.250
ethact=ethernet@1c30000   ethaddr=02:00:91:f6:8d:99

setenv bootargs root=/dev/nfs nfsroot=10.23.13.250:/home/nfs ip=10.23.13.100:10.23.13.250:10.23.13.1:255.255.252.0::ens33:off init=/linuxrc console=ttyS0,115200

离线

#33 2018-11-05 22:41:19

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

605364021 说:
晕哥 说:

这是我编译好的带以太网的u-boot:   u-boot-sunxi-with-splethernet.7z

能不能用都可以到本帖反馈。

我的u-boot用的晕哥提供的u-boot

u-boot中的ip设置ipaddr=10.23.14.100,netmask=255.255.252.0 gatewayip=10.23.13.1  nfsserver=10.23.13.250 serverip=10.23.13.250
ethact=ethernet@1c30000   ethaddr=02:00:91:f6:8d:99

setenv bootargs root=/dev/nfs nfsroot=10.23.13.250:/home/nfs ip=10.23.13.100:10.23.13.250:10.23.13.1:255.255.252.0::ens33:off init=/linuxrc console=ttyS0,115200

个人觉得,nfs根文件系统与uboot是否驱动网卡没有关系,linux里面驱动网卡就可以了。





离线

#34 2018-11-06 10:38:32

605364021
会员
注册时间: 2018-10-23
已发帖子: 251
积分: 251

Re: nuc970评估版nfs启动失败的问题

晕哥 说:

个人觉得,nfs根文件系统与uboot是否驱动网卡没有关系,linux里面驱动网卡就可以了。

怎么知道linux驱动网卡有没有成功?根文件系统下可以ping通nfs服务器?

离线

#35 2018-11-06 11:42:40

晕哥
管理员
所在地: 微信 whycan_cn
注册时间: 2017-09-06
已发帖子: 9,223
积分: 9197

Re: nuc970评估版nfs启动失败的问题

605364021 说:
晕哥 说:

个人觉得,nfs根文件系统与uboot是否驱动网卡没有关系,linux里面驱动网卡就可以了。

怎么知道linux驱动网卡有没有成功?根文件系统下可以ping通nfs服务器?

而且还可以挂载 nfs 文件系统吧?
建议先弄一个脚本启动挂载 nfs 分区好了,反正只是开发的时候用,量产的产品不会用nfs的.
说不定过段时间突然恰好就解决了这个问题.





离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn