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.

DM355: Unable to setup NFS server



I am unable to connevt DM355 board via NFS. Here is the printenv output:

DM355 EVM # printenv
bootdelay=3
baudrate=115200
=nfshost 127.0.0.1
rootpath=/home/dhd/workdir/filesys,nolock mem=116M
bootcmd=nboot 0x80700000 0 0x400000;bootm
netmask=255.255.0.0
gateway=10.20.1.1
dns1=10.20.1.1
dns2=10.20.1.2
bootfile="uImage"
nfshost=10.20.21.12
ipaddr=10.20.21.15
bootargs=console=ttyS0,115200n8 noinitrd rw ip=10.20.21.15:10.20.21.12:10.20.1.1:255.255.0.0:::off root=/dev/nfs nfsroot=10.20.21.12:/home/dhd/workdir/filesc
stdin=serial
stdout=serial
stderr=serial
videostd=ntsc

While boot it gives the following error:

eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
portmap: server 10.20.21.12 not responding, timed out
Root-NFS: Unable to get nfsd port number from server, using default
Looking up port of RPC 100005/1 on 10.20.21.12

 

I have reset the NFS server on the host several times, but it did not help

PS: Is the garbage value =nfshost 127.0.0.1 the reason, how can I remove it?

Kindly Help.

Thanks

  • to remove any variable, simply type "setenv <variable name>"; for example, to remove "=nfshost 127.0.0.1" simply type "setenv =nfsnost".

    Did you ever have NFS working before?  I would try the following

    1) ping host from EVM u-boot prompt (to ensure cables and network connection are ok)

    2) make sure host fire-wall is disabled

    3) make sure that your host "/etc/exports" lists the same directory you are trying to NFS mount

    I believe the latter two steps are part of Getting Started Guide; let me know how it goes.

  • Hi Juan If I give the command "setenv =nfshost" , I get an error - invalid variable name, special characters not allowed, which is strange considering how did the variable get created in the first instance This is the first time I am setting up NFS environment on the system. 1) I am able to ping from EVM and it shows the host to be 'alive' 2) I have disabled the firewall 3) I have put the correct directory in the exports file I am following the Getting Started guide itself to setup the NFS I opened the network log (of the host) and it contained the line: 127.0.0.1 is trying to connect to the system.......and some errors , however the IP that I have assigned to the client is 10.20.21.15
  • Can you try TFTPing linux kernel from host?  This should work so long as ping works and firewall is disabled.  Let see if we can get there by braking the problem down and taking smaller steps.

  • Also, I kind of assumed this, but just to double check...it appears your connection from host PC to EVM is direct connection via ethernet cable (no router in between) and you are using static IPs (as opposed to dynamic IPs assigned by dhcp srver in router).  Is this correct?  Since your ping is working, I assume this is the case.. but just making sure.

     

  • i have connected the board and the host to separate ports in the same lab (as in with two separate cables).

    yes i am using static IPs.

     

    right now i am trying to boot using TFTP using board's NAND Flash File System

  • I tried booting the board using TFTP as You had suggested, however it is still not working.

    I followed the Getting Started Guide section A3.2

    printev output is as follows:

    bootdelay=3
    baudrate=115200
    =nfshost 127.0.0.1
    rootpath=/home/dhd/workdir/filesys,nolock mem=116M
    netmask=255.255.0.0
    gateway=10.20.1.1
    dns1=10.20.1.1
    dns2=10.20.1.2
    nfshost=10.20.21.12
    ipaddr=10.20.21.15
    stdin=serial
    stdout=serial
    stderr=serial
    videostd=ntsc
    bootfile=uImage-dm355
    serverip=10.20.21.12
    bootcmd=tftpboot
    bootargs=mem=116M console=ttyS0,115200n8 root=/dev/mtdblock3 rw rootfstype=yaffs2 ip=10.20.21.15:10.20.21.12:10.20.1.1:255.255.0.0:::off

    Command  'boot' gives the following error:

    TFTP from server 10.20.21.12; our IP address is 10.20.21.15
    Filename 'uImage-dm355'.
    Load address: 0x80700000
    Loading: T T T T T T T T T T T T T T T T T T T T
    Retry count exceeded; starting again

     

     

  • what Linux host are you using? 

    Also, can you try typing 'dhcp' at the u-boot prompt?  if dhcp works, what ip addresses does it give you for target and host?

  • Jatin,

    A few things:

    1. I dont see any environment variable named "serverip" in your arguments. The user guide mentions that "serverip" should be set for TFTP boot. It should be same address where your TFTP server is running.

    2. Can you set environment variable "ethaddr = <MAC ADDRESS of your board>"? This might be needed for TFTP boot

    3. Can you try dhcp command from uBoot as Juan mentioned?

    4. Can you dump the whole booting log to see what happens just before the NFS mounting is tried?

     

    Regards,

    Anshuman

  • hi

    I tried dhcp at teh prompt. It does the following

    DM355 EVM # dhcp
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10

    Retry count exceeded; starting again

    @anshuman: there is a field named serverip with value 10.20.21.12 in the latter half

     

    following is the whole booting log for boot command on the following environment:

    DM355 EVM # printenv
    bootdelay=3
    baudrate=115200
    =nfshost 127.0.0.1
    rootpath=/home/dhd/workdir/filesys,nolock mem=116M
    netmask=255.255.0.0
    gateway=10.20.1.1
    dns1=10.20.1.1
    dns2=10.20.1.2
    nfshost=10.20.21.12
    ipaddr=10.20.21.15
    bootcmd=dhcp;bootm
    bootargs=mem=116M console=ttyS0,115200n8 root=/dev/mtdblock3 rw rootfstype=yaffs2 ip=dhcp
    serverip=10.20.21.12
    bootfile=uImage-dm355
    stdin=serial
    stdout=serial
    stderr=serial
    videostd=ntsc

    Environment size: 451/16380 bytes
    DM355 EVM # boot
    BOOTP broadcast 1
    BOOTP broadcast 2
    BOOTP broadcast 3
    BOOTP broadcast 4
    BOOTP broadcast 5
    BOOTP broadcast 6
    BOOTP broadcast 7
    BOOTP broadcast 8
    BOOTP broadcast 9
    BOOTP broadcast 10

    Retry count exceeded; starting again
    BOOTP broadcast 1

    Abort

  • Juan,

     

    we are using CentOS as the host

    tried dhcp at the prompt. it is not working. what should we try next ? what do you think is the problem.

    Is the line "=nfshost 127.0.0.1" a problem

     

    Found another thing that may be a problem:

    when i try to open server settings on the CentOS it gives the following warning:

    I encountered the following errors while reading /etc/exports: line 1: unknown option 'no_all_squash'

    and the file 'etc/exports' has automatically changed from

    /home/dhd/workdir/filesys *(rw,no_all_squish,no_root_squash, sync)

    to

    /home/dhd/workdir/filesys *(rw,sync,no_root_squash)

  • @anshuman

    this is the boot log for nfs boot

    DM355 EVM # printenv
    bootdelay=3
    baudrate=115200
    =nfshost 127.0.0.1
    rootpath=/home/dhd/workdir/filesys,nolock mem=116M
    gateway=10.20.1.1
    dns1=10.20.1.1
    dns2=10.20.1.2
    nfshost=10.20.21.12
    stdin=serial
    stdout=serial
    stderr=serial
    videostd=ntsc
    filesize=39b8
    fileaddr=80700000
    gatewayip=10.20.1.1
    netmask=255.255.0.0
    ipaddr=10.20.254.10
    serverip=10.20.3.6
    dnsip=10.20.3.3
    dnsip2=10.20.3.2
    bootfile=uImage
    bootcmd=nboot 0x80700000 0 0x400000;bootm
    bootargs=console=ttyS0,115200n8 noinitrd rw ip=10.20.21.15:10.20.21.12:10.20.1.1:255.255.0.0:::off root=/dev/nfs nfsroot=10.20.21.12:/home/dhd/workdir/filesc

    Environment size: 663/16380 bytes
    DM355 EVM # boot

    Loading from NAND 1GiB 3,3V 8-bit, offset 0x400000
       Image Name:   Linux-2.6.10_mvl401
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1585240 Bytes =  1.5 MB
       Load Address: 80008000
       Entry Point:  80008000
    ## Booting image at 80700000 ...
       Image Name:   Linux-2.6.10_mvl401
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    1585240 Bytes =  1.5 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
    OK

    Starting kernel ...

    Linux version 2.6.10_mvl401 (a0270758@gtmatrix) (gcc version 3.4.3 (MontaVista 3.4.3-25.0.104.0600975 2006-07-06)) #1 Wed Oct 17 15:44:12 EDT 2007
    CPU: ARM926EJ-Sid(wb) [41069265] revision 5 (ARMv5TEJ)
    CPU0: D VIVT write-back cache
    CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
    CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
    Machine: DaVinci DM355 EVM
    Memory policy: ECC disabled, Data cache writeback
    DM0350
    Built 1 zonelists
    Kernel command line: console=ttyS0,115200n8 noinitrd rw ip=10.20.21.15:10.20.21.12:10.20.1.1:255.255.0.0:::off root=/dev/nfs nfsroot=10.20.21.12:/home/dhd/wc
    PID hash table entries: 512 (order: 9, 8192 bytes)
    Console: colour dummy device 80x30
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 116MB = 116MB total
    Memory: 114176KB available (2762K code, 585K data, 164K init)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    CPU: Testing write buffer coherency: ok
    spawn_desched_task(00000000)
    desched cpu_callback 3/00000000
    ksoftirqd started up.
    desched cpu_callback 2/00000000
    desched thread 0 started up.
    NET: Registered protocol family 16
    Registering platform device 'serial8250.0'. Parent at platform
    Registering platform device 'nand_davinci.0'. Parent at platform
    Registering platform device 'dm9000.0'. Parent at platform
    Registering platform device 'mmc.0'. Parent at platform
    Registering platform device 'mmc.1'. Parent at platform
    DaVinci I2C DEBUG: 15:42:09 Oct 17 2007
    Registering platform device 'i2c'. Parent at platform
    SCSI subsystem initialized
    usbcore: registered new driver usbfs
    usbcore: registered new driver hub
    musb_hdrc: version 2.2a/db-0.4.8 [pio] [host] [debug=0]
    Registering platform device 'musb_hdrc'. Parent at platform
    musb_hdrc: USB Host mode controller at c7800000 using PIO, IRQ 12
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    arch/arm/mach-davinci/spi_platform_init.c:dm355_spi_board_init:123 dm355_spi_board_init
    arch/arm/mach-davinci/spi_platform_init.c:dm355_spi_board_init:129 REG BOARD  ret 0
    Registering platform device 'dm_spi.0'. Parent at platform
    arch/arm/mach-davinci/spi_platform_init.c:dm355_spi_board_init:136 REGISTER DEVICE ret 0
    NetWinder Floating Point Emulator V0.97 (double precision)
    JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
    yaffs Oct 17 2007 15:41:45 Installing.
    Initializing Cryptographic API
    Registering platform device 'dm355fb.0'. Parent at platform
    Console: switching to colour frame buffer device 90x30
    watchdog: TI DaVinci Watchdog Timer: timer margin 64 sec
    Registering platform device 'davinci_pwm0.0'. Parent at platform
    Registering platform device 'davinci_pwm1.1'. Parent at platform
    Registering platform device 'davinci_pwm2.2'. Parent at platform
    Registering platform device 'davinci_pwm3.3'. Parent at platform
    Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
    Registering platform device 'serial8250'. Parent at platform
    ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A
    ttyS1 at MMIO 0x1c20400 (irq = 41) is a 16550A
    ttyS2 at MMIO 0x1e06000 (irq = 14) is a 16550A
    io scheduler noop registered
    io scheduler anticipatory registered
    RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
    loop: loaded (max 8 devices)
    dm9000 Ethernet Driver
    eth0: dm9000 at c7862000,c7864002 IRQ 45 MAC: 00:0e:99:02:c4:1a
    i2c /dev entries driver
    Linux video capture interface: v1.00
    Registering platform device 'vpfe.1'. Parent at platform
    vpfe vpfe.1: DaVinci v4l2 capture driver V1.0 loaded
    ipipe major#: 253, minor# 0
    Registering platform device 'dm355_ipipe.2'. Parent at platform
    ipipe driver registered
    af major#: 252, minor# 0
    Registering platform device 'dm355_af.2'. Parent at platform
    aew major#: 251, minor# 0
    Registering platform device 'dm355_aew.2'. Parent at platform
    elevator: using anticipatory as default io scheduler
    at25xxA_spi_eeprom init
    nand_davinci nand_davinci.0: Using 4-bit hardware ECC
    NAND device: Manufacturer ID: 0x2c, Chip ID: 0xd3 (Micron NAND 1GiB 3,3V 8-bit)
    2 NAND chips detected
    nand_bbt: ECC error while reading bad block table
    nand_bbt: ECC error while reading bad block table
    Creating 5 MTD partitions on "nand_davinci.0":
    0x00000000-0x003c0000 : "bootloader"
    0x003c0000-0x00400000 : "params"
    0x00400000-0x00800000 : "kernel"
    0x00800000-0x20800000 : "filesystem1"
    0x20800000-0x80000000 : "filesystem2"
    nand_davinci nand_davinci.0: hardware revision: 2.3
    scan_boardinfo:<NULL>:-1067850772
     modias <NULL> irq 2000000 max_speed 65535 bus_num 0 chip_select 0 mode -1068867824
    drivers/spi/spi.cat25xxA_spi_eeprom device register Succeeded
    dm_spi.0: dm355 SPI Controller driver at 0xc7866000 (irq = 42)
    Initializing USB Mass Storage driver...
    usbcore: registered new driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new driver usbhid
    drivers/usb/input/hid-core.c: v2.0:USB HID core driver
    mice: PS/2 mouse device common for all mice
    mmc mmc.0: Supporting 4-bit mode
    mmc mmc.0: Using DMA mode
    mmc mmc.1: Supporting 4-bit mode
    mmc mmc.1: Using DMA mode
    Registering platform device 'davinci-audio.0'. Parent at platform
    NET: Registered protocol family 2
    IP: routing cache hash table of 512 buckets, 4Kbytes
    TCP: Hash tables configured (established 8192 bind 16384)
    Initializing XFRM netlink socket
    NET: Registered protocol family 1
    NET: Registered protocol family 10
    IPv6 over IPv4 tunneling driver
    NET: Registered protocol family 17
    eth0: link down
    IP-Config: Complete:
          device=eth0, addr=10.20.21.15, mask=255.255.0.0, gw=10.20.1.1,
         host=10.20.21.15, domain=, nis-domain=(none),
         bootserver=10.20.21.12, rootserver=10.20.21.12, rootpath=
    Looking up port of RPC 100003/2 on 10.20.21.12
    eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
    portmap: server 10.20.21.12 not responding, timed out
    Root-NFS: Unable to get nfsd port number from server, using default
    Looking up port of RPC 100005/1 on 10.20.21.12
    portmap: server 10.20.21.12 not responding, timed out
    Root-NFS: Unable to get mountd port number from server, using default
    mount: server 10.20.21.12 not responding, timed out
    Root-NFS: Server returned error -5 while mounting /home/dhd/workdir/filesys
    VFS: Unable to mount root fs via NFS, trying floppy.
    VFS: Cannot open root device "nfs" or unknown-block(2,0)
    Please append a correct "root=" boot option
    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

  • Hi,

    I think there are couple of things you should ensure:

    1. Please add ethaddr as the environment variable for the MAC address

    2. Please change subnet mask to 255.255.255.0

    Regards,

    Anshuman

  • Its done !

    We had disabled firewall but there was another security level in the system

    service iptables stop 

    did the trick

    Thanks everyone

  • Now that I have set up the NFS server. And run a simple c program (from section 4.4.1 of Getting Started)

    I am now trying to run the demos from command line (A.1)

    I copied the dvsdk_1_30_00_23 directory to the target file system

    But when I run ./loadmodules.sh I get the following error:

    insmod: can't read 'cmemk.ko': No such file or directory
    ./loadmodules.sh: line 9: ./mapdmaq: No such file or directory
    insmod: can't read 'dm350mmap.ko': No such file or directory
    mknod: wrong number of arguments
    Try `mknod --help' for more information.

    Kindly help ..

     

    Thanks again

     

  • Great!  I am glad to hear you got NFS mounted.

    You do not need to copy the entire DVSDK_1_30_00_23 directory over to the target file system.  In fact, if you are trying to run the demos from within DVSDK_1_30_00_23 directory, this will likely not work.   If you follow the Getting Started Guide, you will reach section 4.6 which takes you thru the steps of properly installing the demo software (e.g. make clean, make, make install....) onto your target file-system; please note that section 4.6 may depend on preceeding sections..

    once you complete section 4.6, you should see all necessary files (including missing *.ko) under your target /opt/dvsdk/dm355 directory

  • Dear Juan

    Thanks for the continued support. I succeeded in running the demos. Now I wish to run a script that downloads files from an ftp automatically every hour or so.

    I have prepared the script for the same and included it in the crontab file.

    However I was going through several forums to check how I can set the current time, but couldn't quite understand the procedure.

    Could you please guide me on this.

    Thanks

    Jatin

  • In Linux, there are many ways of doing this depending on what time accuracy you need; for instace, our demos use gettimeofday (popular choice) as it can give you microsecond accuracy; there is a corresponding settimeofday for setting the time.

    Also, I should mention that by default, our DM355 EVMs do not include a battery in the battery holder (labeled BHT1 on EVM) required for keeping time settings across boot cycles; for this reason, when you reboot the board, any time settings will be lost....

  • Hi Juan!

    I'm working with dm355 on Leopard Board and using NFS file system. I have a random behavior getting the following message once in a while:

    [ 6257.110000] nfs: server 10.251.101.7 not responding, still trying

    I'm using kernel 2.6.29. My bootargs are:

    bootargs=console=ttyS0,115200n8 mem=116M root=/dev/nfs nfsroot=10.251.101.7:/home/cmurillo/devdir/fs/fs rw ip=dhcp mtdparts=nand_davinci.0:4096k(UBOOT),128k(UBOOT_ENV),3456k(KERNEL),20480k(FS)

    Any idea on why I'm losing connection? Where to look?

     

    Regards,

    Cristina

     

     

     

  • seems like an unstable network connection; two potential reasons this can happen that come to mind are 1) loose cables or 2) too much network traffic in the LAN.  You can try making sure you cables are tightly connected, change cables, or maybe try to setup an isolated LAN using a small router.

  • HI Jatin,

    Its good to see that you set up the nfs server, i also facing the same problem.

    but unable to setup, can you please send the setups you followed.

    Thanks and regards,

    Mohammed Asif.