This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IPNC4.0 linux kernel 2.6.37 can't use nfs to boot the filesystem

hello,everyone ,I am using linux kernel 2.6.37,but I can't use nfs to boot the filesystem.The boot information is as follows:

Loading from NAND 128MiB 3,3V 8-bit, offset 0x400000
Image Name: Linux-2.6.37_IPNC_DM365_4.0.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4061504 Bytes = 3.9 MB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 80700000 ...
Image Name: Linux-2.6.37_IPNC_DM365_4.0.0
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4061504 Bytes = 3.9 MB
Load Address: 80008000
Entry Point: 80008000
Loading Kernel Image ... OK
OK

Starting kernel ...

[ 0.000000] Linux version 2.6.37_IPNC_DM365_4.0.0 (root@ubuntu) (gcc version 4.3.3 (GCC) ) #1 PREEMPT Tue Dec 11 10:10:15 HKT 2012
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: DaVinci DM36x IPNC
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] DaVinci dm36x_rev1.2 variant 0x8
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 12192
[ 0.000000] Kernel command line: console=ttyS0,115200n8 noinitrd rw ip=192.168.1.99:192.168.1.99:192.168.1.1:255.255.255.0:::off eth=EE:0C:0C:BE:19:02 root=/dev/nfs nfsroot=192.168.1.93:/home/davinci/IPNC_4.0/Source/ipnc_rdk/target/filesys,nolock mem=48M cmemk.phys_start="0x83000000" cmemk.phys_end="0x88000000" cmemk.phys_start_1="0x00001000" cmemk.phys_end_1="0x00008000" cmemk.pools_1="1x28672" cmemk.allowOverlap=1 eth=$(ethaddr) lpj=1077248 nohz=off highres=off
[ 0.000000] TI DaVinci EMAC: kernel boot params Ethernet address: EE:0C:0C:BE:19:02
[ 0.000000] TI DaVinci EMAC: kernel boot params Ethernet address: $(ethaddr)
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Memory: 48MB = 48MB total
[ 0.000000] Memory: 44560k/44560k available, 4592k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xff000000 - 0xffe00000 ( 14 MB)
[ 0.000000] vmalloc : 0xc3800000 - 0xfea00000 ( 946 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc3000000 ( 48 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .init : 0xc0008000 - 0xc002a000 ( 136 kB)
[ 0.000000] .text : 0xc002a000 - 0xc03bf000 (3668 kB)
[ 0.000000] .data : 0xc03c0000 - 0xc03e7940 ( 159 kB)
[ 0.000000] SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptable hierarchical RCU implementation.
[ 0.000000] RCU-based detection of stalled CPUs is disabled.
[ 0.000000] Verbose stalled-CPUs detection is disabled.
[ 0.000000] NR_IRQS:245
[ 0.000000] Console: colour dummy device 80x30
[ 0.000292] Calibrating delay loop (skipped) preset value.. 215.44 BogoMIPS (lpj=1077248)
[ 0.000350] pid_max: default: 32768 minimum: 301
[ 0.000656] Mount-cache hash table entries: 512
[ 0.001445] CPU: Testing write buffer coherency: ok
[ 0.005931] DaVinci: 8 gpio irqs
[ 0.006543] NET: Registered protocol family 16
[ 0.021666] EVM: (null) video input
[ 0.104172] bio: create slab <bio-0> at 0
[ 0.108930] SCSI subsystem initialized
[ 0.113131] usbcore: registered new interface driver usbfs
[ 0.114474] usbcore: registered new interface driver hub
[ 0.115384] usbcore: registered new device driver usb
[ 0.118635] vpss vpss: dm365_vpss vpss probed
[ 0.118702] vpss vpss: dm365_vpss vpss probe success
[ 0.120985] Advanced Linux Sound Architecture Driver Version 1.0.23.
[ 0.122927] Switching to clocksource timer0_1
[ 0.186307] NET: Registered protocol family 2
[ 0.186609] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.187393] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.187533] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.187623] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.187656] TCP reno registered
[ 0.187697] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.187762] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.188270] NET: Registered protocol family 1
[ 0.189323] RPC: Registered udp transport module.
[ 0.189366] RPC: Registered tcp transport module.
[ 0.189396] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.263589] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.263637] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.264359] JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
[ 0.268108] msgmni has been set to 87
[ 0.272414] io scheduler noop registered (default)
[ 0.273898] CSL: Module install successful, device major num = 254
[ 0.273943] CSL: Module version 0.10.00, built on Dec 10 2012 16:09:23
[ 0.273996] I2C: Module install successful, device major num = 253
[ 0.274037] DMA: Module install successful, device major num = 252
[ 0.274065] DRV: Module install successful
[ 0.274090] DRV: Module built on Dec 10 2012 16:09:25
[ 0.274117] DRV: EDMACC.QUEPRI = 00002777
[ 0.274140] DRV: SYSTEM.MSTPRI0 = 00440011
[ 0.274163] DRV: SYSTEM.MSTPRI1 = 00000444
[ 0.274186] DRV: ISP.BCR = 00000002
[ 0.274208] DRV: SYSTEM.MISC = 00000399
[ 0.274232] EDMAK module: built on Dec 10 2012 at 16:09:01
[ 0.274262] Reference Linux version 2.6.37

[ 0.275771] IRQK module: built on Dec 10 2012 at 16:09:00
[ 0.275819] Reference Linux version 2.6.37

[ 0.277351] irqk initialized
[ 0.277424] CMEMK module: built on Dec 10 2012 at 16:08:57
[ 0.277461] Reference Linux version 2.6.37

[ 0.282542] allocated heap buffer 0xc4000000 of size 0x5000000
[ 0.282591] CMEM Range Overlaps Kernel Physical - allowing overlap
[ 0.282628] CMEM phys_start (0x1000) overlaps kernel (0x80000000 -> 0x83000000)
[ 0.282800] cmemk initialized
[ 0.282853] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.306923] serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
[ 0.853358] console [ttyS0] enabled
[ 0.878805] serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A
[ 0.889007] brd: module loaded
[ 0.901064] NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung )
[ 0.909051] Bad block table not found for chip 0
[ 0.915182] Bad block table not found for chip 0
[ 0.919825] Scanning device for bad blocks
[ 0.995738] Creating 7 MTD partitions on "davinci_nand.0":
[ 1.001354] 0x000000000000-0x000000300000 : "bootloader"
[ 1.010734] 0x000000300000-0x000000500000 : "params"
[ 1.019712] 0x000000500000-0x000000900000 : "kernel"
[ 1.028947] 0x000000900000-0x000003100000 : "filesystem1"
[ 1.038848] 0x000003100000-0x000003300000 : "data1"
[ 1.048208] 0x000003300000-0x000005b00000 : "filesystem2"
[ 1.058155] 0x000005b00000-0x000008000000 : "data2"
[ 1.067536] davinci_nand davinci_nand.0: controller rev. 2.3
[ 1.130119] davinci_mdio davinci_mdio.0: davinci mdio revision 1.4
[ 1.136332] davinci_mdio davinci_mdio.0: detected phy mask fffffffd
[ 1.144123] davinci_mdio.0: probed
[ 1.147573] davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver Davicom DM9161A
[ 1.156167] i2c /dev entries driver
[ 1.161869] Linux media interface: v0.10
[ 1.166503] Linux video capture interface: v2.00
[ 1.173402] vpbe-osd vpbe-osd: OSD sub device probe success
[ 1.179853] vpbe-venc vpbe-venc: VENC sub device probe success
[ 1.186713] vpbe-v4l2 vpbe-v4l2: vpbe v4l2 device registered
[ 1.192897] Setting default output to Composite
[ 1.197455] Setting default mode to ntsc
[ 1.201617] vpbe-v4l2 vpbe-v4l2: Trying to register VPBE display device.
[ 1.208340] vpbe-v4l2 vpbe-v4l2: layer=c28db200,layer->video_dev=c28db2e8
[ 1.216056] vpbe-v4l2 vpbe-v4l2: Trying to register VPBE display device.
[ 1.222996] vpbe-v4l2 vpbe-v4l2: layer=c2941000,layer->video_dev=c29410e8
[ 1.231640] watchdog watchdog: heartbeat 60 sec
[ 1.241570] Error: Driver 'davinci-mcbsp' is already registered, aborting...
[ 1.251557] asoc: cq93vc-hifi <-> davinci-vcif mapping ok
[ 1.260517] ALSA device list:
[ 1.263518] #0: DaVinci DM365 EVM
[ 1.268480] TCP cubic registered
[ 1.271957] NET: Registered protocol family 17
[ 1.276575] Registering the dns_resolver key type
[ 1.290568] net eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=0:01, id=181b8a0)
[ 1.310862] IP-Config: Complete:
[ 1.313946] device=eth0, addr=192.168.1.99, mask=255.255.255.0, gw=192.168.1.1,
[ 1.321788] host=192.168.1.99, domain=, nis-domain=(none),
[ 1.327729] bootserver=192.168.1.99, rootserver=192.168.1.93, rootpath=
[ 4.290355] PHY: 0:01 - Link is Up - 100/Full
[ 4.340994] VFS: Unable to mount root fs via NFS, trying floppy.
[ 4.348106] VFS: Cannot open root device "nfs" or unknown-block(2,0)
[ 4.355298] Please append a correct "root=" boot option; here are the available partitions:
[ 4.364185] 1f00 3072 mtdblock0 (driver?)
[ 4.369543] 1f01 2048 mtdblock1 (driver?)
[ 4.374746] 1f02 4096 mtdblock2 (driver?)
[ 4.380410] 1f03 40960 mtdblock3 (driver?)
[ 4.385743] 1f04 2048 mtdblock4 (driver?)
[ 4.391321] 1f05 40960 mtdblock5 (driver?)
[ 4.396571] 1f06 37888 mtdblock6 (driver?)
[ 4.401759] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[ 4.410118] Backtrace:
[ 4.412596] Function entered at [<c002e500>] from [<c0340c28>]
[ 4.418445] r7:00008000 r6:c2813000 r5:c0023988 r4:c03e80a0
[ 4.424221] Function entered at [<c0340c10>] from [<c0340c94>]
[ 4.430375] Function entered at [<c0340c2c>] from [<c0008fd0>]
[ 4.436454] r3:00000000 r2:00000000 r1:c2825f58 r0:c036217b
[ 4.442259] Function entered at [<c0008dec>] from [<c00090c4>]
[ 4.448348] Function entered at [<c0009018>] from [<c0009248>]
[ 4.454523] r4:c03e79a8
[ 4.457090] Function entered at [<c00090e8>] from [<c00084b4>]
[ 4.463005] r5:c0023124 r4:c03e7958
[ 4.466936] Function entered at [<c00083a4>] from [<c0042e0c>]
[ 4.472859] r5:c00083a4 r4:00000000

The parameters transfered to the kernel from the uboot are :

setenv bootargs 'console=ttyS0,115200n8 noinitrd rw ip=192.168.1.99:192.168.1.99:192.168.1.1:255.255.255.0:::off eth=EE:0C:0C:BE:19:02 root=/dev/nfs nfsroot=192.168.1.93:/home/davinci/IPNC_4.0/Source/ipnc_rdk/target/filesys,nolock mem=48M cmemk.phys_start="0x83000000" cmemk.phys_end="0x88000000" cmemk.phys_start_1="0x00001000" cmemk.phys_end_1="0x00008000" cmemk.pools_1="1x28672" cmemk.allowOverlap=1 eth=$(ethaddr) lpj=1077248 nohz=off highres=off';saveenv;reset;

My configuration of the nfs for the linux kernel is:

CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
CONFIG_NFS_V4_1=y
CONFIG_ROOT_NFS=y
CONFIG_NFSD=y
CONFIG_NFSD_DEPRECATED=y
# CONFIG_NFSD_V3 is not set
# CONFIG_NFSD_V4 is not set
CONFIG_LOCKD=y
CONFIG_NFS_COMMON=y

I use another linux kernel 2.6.18 ,and it can mount the nfs through the following command:

mount –t nfs 192.168.1.93:/home/davinci/IPNC_4.0/Source/ipnc_rdk/target/filesys /mnt/upan –o nolock

So I think the host configuration has no problem.

Who can help me ?Thank you a lot!!

  • Hello!

    Please recheck your Linux configuration:
    $ grep CMDLINE .config
    CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw rootfstype=jffs2 ip=off"
    # CONFIG_CMDLINE_FORCE is not set
    CONFIG_MTD_CMDLINE_PARTS=y

    You not should use CONFIG_CMDLINE_FORCE if you need change Linux boot parameters.

  • Hi ,Kirill Brilliantov .Thank you for your kind reply. I do as what you said.:grep CMDLINE davinci_dm368_ipnc_defconfig_nfs (I use this config file to config the linux)

    The following information appears:

    CONFIG_CMDLINE=""

    CONFIG_MTD_CMDLINE_PARTS=y

    So I think the problem is not as what you said. And if I don't use nand flash rather than nfs to boot the filesystem, it can work properly.The IP and other parameters can also be transfered to the linux kernel.

    What do you think?


  • And I use nand flash to boot the system to enter the system. Then I use 

    root@192:~# cat /proc/cmdline 

    The following appears:

    mem=48M console=ttyS0,115200n8 noinitrd ip=192.168.1.99:192.168.1.99:192.168.1.1:255.255.255.0:::off eth=EE:0C:0C:BE:19:02 rw ubi.mtd=3,2048 rootfstype=ubifs root=ubi0:rootfs cmemk.phys_start=0x83000000 cmemk.phys_end=0x88000000 cmemk.phys_start_1=0x00001000 cmemk.phys_end_1=0x00008000 cmemk.pools_1=1x28672 cmemk.allowOverlap=1 cmemk.useHeapIfPoolUnavailable=1 lpj=1077248 nohz=off highres=off eth=$(ethaddr) quiet

    It is the same as what I transfer in the uboot command.

  • Please recheck next points:
    - PHY work correct, for check this you can use ping or tftp from U-Boot
    - your server work and accept connections from your board, for this you can recheck /etc/exports and system logs

  • Hi,Kirill Brilliantov.

    As I said above ,I can use another board (with another kernel 2.6.18)mount the same path on my server using the command 

    mount –t nfs 192.168.1.93:/home/davinci/IPNC_4.0/Source/ipnc_rdk/target/filesys /mnt/upan –o nolock

    so I think  the server has no problem.I use tftp to download the kernel image and filesystem.So I think the phy works well .

    What do you think?

  • Hello, Minglei!

    I think you not right:
    1. if you havn't problem it confirm what it board have working PHY and NFS-server accept cannection from it
    2. if you another board can't connect to NFS-server this can have some reason:
    2.1. PHY not work, it ease check from U-Boot
    2.2. Linux havn't drivers for this PHY, this is not your case because Linux found you PHY, but it also need check
    2.3. NFS-server not accept connect from you board, it easy check in /etc/exports, e.g. /home/kirill/Projects/CombineIP/nfs 192.168.255.2(rw,no_root_squash,no_all_squash,subtree_check,sync), in this case server accept connect ONLY from 192.168.255.2
    2.4. your system drop or block connect from your board, may be iptables configured on block connect from unknow host, you can verify iptables settings via iptables -L -n -v, you shoul have root access for this
    2.5. your board have address in another network and NFS-server havn't route to this network, you can check this via ip route get <ip your board>

    As you can see you can many reason for network problem.

  • Hi,Kirill Brilliantov.

    When I use nand flash to boot the filesystem ,I can enter the system ,and I can ping the server successfully.I can also the following command to mount the directory that I want to mount.

    #mount -t nfs 192.168.1.93:/home/davinci/IPNC_4.0/Source/ipnc_rdk/target/filesys /mnt/nfs/ -o nolock

    So this shows that 2.1 2.2 2.3 2.4 2.5 that you raise have no problem.

    The only problem is when I use nfs in the uboot ,it can't work and show the following error:

    emac_addr is :EE:0C:0C:BE:19:02
    [ 1.294751] net eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=0:01, id=181b8a0)
    [ 1.320881] IP-Config: Complete:
    [ 1.323964] device=eth0, addr=192.168.1.99, mask=255.255.255.0, gw=192.168.1.1,
    [ 1.331786] host=192.168.1.99, domain=, nis-domain=(none),
    [ 1.337725] bootserver=192.168.1.99, rootserver=192.168.1.93, rootpath=
    [ 4.290356] PHY: 0:01 - Link is Up - 100/Full
    [ 4.350998] VFS: Unable to mount root fs via NFS, trying floppy.
    [ 4.358096] VFS: Cannot open root device "nfs" or unknown-block(2,0)
    [ 4.364729] Please append a correct "root=" boot option; here are the available partitions:
    [ 4.373500] 1f00 3072 mtdblock0 (driver?)
    [ 4.378953] 1f01 2048 mtdblock1 (driver?)
    [ 4.384158] 1f02 4096 mtdblock2 (driver?)
    [ 4.389248] 1f03 40960 mtdblock3 (driver?)
    [ 4.394440] 1f04 2048 mtdblock4 (driver?)
    [ 4.399531] 1f05 40960 mtdblock5 (driver?)
    [ 4.404790] 1f06 37888 mtdblock6 (driver?)
    [ 4.409876] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

  • Sounds like the NFS server is good. Unsure if mounting as root file system has more requirements than mounting as non-root file system. Some config relating to root squash might still need to be addressed.

    It might be your network driver is just barely started when the file system trys to start. Try adding rootdelay to your bootargs. Use a fairly large value to start, like "rootdelay=10".

  • Hi,Norman Wong.Than you very much ! The problem is solved when I do as what you say!