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.

Linux boot using NFS on OMAP-L138 custom board

Other Parts Discussed in Thread: OMAP-L138

Hi to everybody!

I am starting to use custom OMAP-L138 board. I also have an OMAP-L138_LCDK Kit. I tried to use NFS within the Kit, and succeeded with this. Kit downoads kernel mcsdk image through tftp server, boots kernel and then mounts filesystem using NFS server.

When I use similar bootargs to boot my custom board, I get a such result:

Detected M25P128 with page size 256 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   davinci_eth_phy_detect: too many PHYs detected
88E6165 Initialized on 88E6165
DaVinci-EMAC
Hit any key to stop autoboot:  0
U-Boot > printenv
baudrate=115200
bootargs=console=ttyS1,115200n8 root=/dev/nfs nfsroot=192.168.1.11:/home/buba/fi
lesystem/omap,nolock ip=192.168.1.1 mem=32M@0xc0000000 mem=64M@0xc4000000
bootcmd=tftp; bootm
bootdelay=3
bootfile=uImage
ethact=DaVinci-EMAC
ethaddr=00:00:00:00:0c:00
ipaddr=192.168.1.1
serverip=192.168.1.10
stderr=serial
stdin=serial
stdout=serial
ver=U-Boot 2012.04.01 (May 16 2016 - 14:35:38)

Environment size: 420/65532 bytes
U-Boot > boot
Using DaVinci-EMAC device
TFTP from server 192.168.1.10; our IP address is 192.168.1.1
Filename 'uImage'.
Load address: 0xc0700000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###############
done
Bytes transferred = 2402728 (24a9a8 hex)
## Booting kernel from Legacy Image at c0700000 ...
   Image Name:   Linux-3.3.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2402664 Bytes = 2.3 MiB
   Load Address: c0008000
   Entry Point:  c0008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0
Linux version 3.3.0 (buba@buba-VirtualBox) (gcc version 4.5.3 20110311 (prerelea
se) (GCC) ) #7 PREEMPT Tue May 17 17:06:07 UZT 2016
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: OMAP-L138 Voip board
Memory policy: ECC disabled, Data cache writeback
BUG: mapping for 0x80000000 at 0xfffe0000 out of vmalloc space
DaVinci da850/omap-l138/am18x variant 0x1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 24320
Kernel command line: console=ttyS1,115200n8 root=/dev/nfs nfsroot=192.168.1.11:/
home/buba/filesystem/omap,nolock ip=192.168.1.1 mem=32M@0xc0000000 mem=64M@0xc40
00000
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 32MB 64MB = 96MB total
Memory: 92340k/92340k available, 5964k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc0474000   (4528 kB)
      .init : 0xc0474000 - 0xc049f000   ( 172 kB)
      .data : 0xc04a0000 - 0xc04d15a0   ( 198 kB)
       .bss : 0xc04d15c4 - 0xc04ee8cc   ( 117 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:245
Console: colour dummy device 80x30
Calibrating delay loop... 148.88 BogoMIPS (lpj=744448)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0xc0362e10 - 0xc0362e68
gpiochip_add: registered GPIOs 0 to 31 on device: DaVinci
gpiochip_add: registered GPIOs 32 to 63 on device: DaVinci
gpiochip_add: registered GPIOs 64 to 95 on device: DaVinci
gpiochip_add: registered GPIOs 96 to 127 on device: DaVinci
gpiochip_add: registered GPIOs 128 to 143 on device: DaVinci
DaVinci: 144 gpio irqs
print_constraints: dummy:
NET: Registered protocol family 16
EMAC: MII PHY configured
No entry for the specified index
No entry for the specified index
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
Advanced Linux Sound Architecture Driver Version 1.0.24.
Switching to clocksource timer0_1
musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
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.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 180
io scheduler noop registered (default)
Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1c42000 (irq = 25) is a AR7
serial8250.0: ttyS1 at MMIO 0x1d0c000 (irq = 53) is a AR7
console [ttyS1] enabled
serial8250.0: ttyS2 at MMIO 0x1d0d000 (irq = 61) is a AR7
brd: module loaded
davinci_mdio davinci_mdio.0: davinci mdio revision 1.5
davinci_mdio davinci_mdio.0: detected phy mask e7c0cfb0
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device davinci_mdio-0:00, driver unknown
davinci_mdio davinci_mdio.0: phy[1]: device davinci_mdio-0:01, driver unknown
davinci_mdio davinci_mdio.0: phy[2]: device davinci_mdio-0:02, driver unknown
davinci_mdio davinci_mdio.0: phy[3]: device davinci_mdio-0:03, driver unknown
davinci_mdio davinci_mdio.0: phy[6]: device davinci_mdio-0:06, driver unknown
davinci_mdio davinci_mdio.0: phy[12]: device davinci_mdio-0:0c, driver unknown
davinci_mdio davinci_mdio.0: phy[13]: device davinci_mdio-0:0d, driver unknown
davinci_mdio davinci_mdio.0: phy[16]: device davinci_mdio-0:10, driver unknown
davinci_mdio davinci_mdio.0: phy[17]: device davinci_mdio-0:11, driver unknown
davinci_mdio davinci_mdio.0: phy[18]: device davinci_mdio-0:12, driver unknown
davinci_mdio davinci_mdio.0: phy[19]: device davinci_mdio-0:13, driver unknown
davinci_mdio davinci_mdio.0: phy[20]: device davinci_mdio-0:14, driver unknown
davinci_mdio davinci_mdio.0: phy[21]: device davinci_mdio-0:15, driver unknown
davinci_mdio davinci_mdio.0: phy[27]: device davinci_mdio-0:1b, driver unknown
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
input: gpio-keys-polled as /devices/platform/gpio-keys-polled.0/input/input0
omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
omap_rtc: RTC power up reset detected
omap_rtc: already running
i2c /dev entries driver
watchdog watchdog: heartbeat 60 sec
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usbcore: registered new interface driver snd-usb-audio
soc-audio soc-audio.0: ASoC: Failed to create card debugfs directory
ALSA device list:
  No soundcards found.
TCP cubic registered
NET: Registered protocol family 17
console [netcon0] enabled
netconsole: network logging started
davinci_emac davinci_emac.1: using random MAC addr: 6a:9a:48:a6:a6:60
omap_rtc omap_rtc: setting system clock to 2000-01-01 08:07:18 UTC (946714038)
davinci_mdio davinci_mdio.0: resetting idled controller
net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=davinci_mdio-0:02,
 id=1410cb1)
PHY: davinci_mdio-0:02 - Link is Up - 1000/Full
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
     device=eth0, addr=192.168.1.1, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.1.1, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.1.11, rootpath=
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; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

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; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)

I don't know what do I need to change to mount filesystem using NFS.

I'm using mcsdk_1_01_00_02.

TFTP server and NFS server have different addresses (192.168.1.10 and 192.168.1.11).

Custom board has the same kernel .config as a kit.

I don't want to use dhcp during linux boot, only static ip address.

I noticed that there is no any packets from the custom board when NFS working.

I tried many bootargs variants but with no luck (example: setenv bootargs 'console=ttyS1,115200n8 noinitrd rw ip=192.168.1.1 root=/dev/nfs nfsroot=192.168.1.11:/home/buba/filesystem/omap,nolock mem=32M@0xc0000000 mem=64M@0xc4000000 rootdelay=5').

I also read these links

http://processors.wiki.ti.com/index.php/MCSDK_OMAPL138_User_Guide_Chapter_Exploring

http://processors.wiki.ti.com/index.php/GSG:_Setting_up_OMAP-L1/AM1x_Target_File_System

and went through the e2e forum, but didn't find solution.

Please help me! I will be very much appreciated for your early reply.

  • Hi,

    We will work on this and will let you know the update shortly.

    Thanks & regards,
    Sivaraj K
  • Dear Bakir,
    Have you exported the filesystem in NFS server?
    /home/buba/filesystem/omap

    You have to add the NFS filesystem path in the NFS server PC.
    /etc/exports
  • Hi Sivaraj,

    Thank you for your reply!

    Recently I could boot linux with a ramdisk and have entered in linux console. But after that I couldn't ping my linux host.

    So, I think that the problem in ethernet linux initialization on omap-l138. Imho, that's why I couldn't mount NFS.

    Regards,

    Bakir

  • Hi Titus!

    - Have you exported the filesystem in NFS server?

    - You have to add the NFS filesystem path in the NFS server PC.

    - Yes, I did both of them.

    Thank you and regards,

    Bakir

  • TFTP server and NFS server have different addresses (192.168.1.10 and 192.168.1.11).

    Can you try to use the IP address as 192.168.1.9 or some thing different not 192.168.1.1 (it seems gateway IP)

    Have you did the following command in Linux NFS server PC ?
    sudo exportfs -rav
    sudo exportfs
  • Hi Bakir,

    You might be able to ping the "192.168.1.10".
    Are you able to ping the NFS server "192.168.1.11" ?
  • Dear Titus,

    I tried to use diff. IP, but with no luck.

    I also tried to view exported filesystem, and got a such results:

    buba@buba-VirtualBox:~$ sudo exportfs -rav

    exporting *:/home/buba/filesystem

    buba@buba-VirtualBox:~$ sudo exportfs

    /home/buba/filesystem

                   <world>

    buba@buba-VirtualBox:~$

    Regards,

    Bakir

  • Dear Shankari!

    I can't ping both of them, when booting linux with initramdisk.

    Please press Enter to activate this console.
    
    / # ping 192.168.1.10
    
    PING 192.168.1.10 (192.168.1.10): 56 data bytes
    
    ^C
    
    --- 192.168.1.10 ping statistics ---
    
    2 packets transmitted, 0 packets received, 100% packet loss
    
    / # ping 192.168.1.11
    
    PING 192.168.1.11 (192.168.1.11): 56 data bytes
    
    ^C
    
    --- 192.168.1.11 ping statistics ---
    
    1 packets transmitted, 0 packets received, 100% packet loss
    
    / # ping 192.168.1.1
    
    PING 192.168.1.1 (192.168.1.1): 56 data bytes
    
    64 bytes from 192.168.1.1: seq=0 ttl=64 time=1.001 ms
    
    ^C
    
    --- 192.168.1.1 ping statistics ---
    
    1 packets transmitted, 1 packets received, 0% packet loss
    
    round-trip min/avg/max = 1.001/1.001/1.001 ms
    
    / # ifconfig
    
    eth0      Link encap:Ethernet  HWaddr 0A:18:AE:ED:F3:34
    
             inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
    
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    
             RX packets:2 errors:0 dropped:0 overruns:0 frame:0
    
             TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
    
             collisions:0 txqueuelen:1000
    
             RX bytes:184 (184.0 B)  TX bytes:180 (180.0 B)
    
             Interrupt:33
    
    lo        Link encap:Local Loopback
    
             inet addr:127.0.0.1  Mask:255.0.0.0
    
             UP LOOPBACK RUNNING  MTU:16436  Metric:1
    
             RX packets:5 errors:0 dropped:0 overruns:0 frame:0
    
             TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
    
             collisions:0 txqueuelen:0
    
             RX bytes:504 (504.0 B)  TX bytes:504 (504.0 B)
    
    / #

    Reagrds,

    Bakir

  • Dear Bakir,

    buba@buba-VirtualBox:~$ sudo exportfs -rav

    exporting *:/home/buba/filesystem

    buba@buba-VirtualBox:~$ sudo exportfs

    /home/buba/filesystem

    <world>
    buba@buba-VirtualBox:~$


    I tried many bootargs variants but with no luck (example: setenv bootargs 'console=ttyS1,115200n8 noinitrd rw ip=192.168.1.1 root=/dev/nfs nfsroot=192.168.1.11:/home/buba/filesystem/omap,nolock mem=32M@0xc0000000 mem=64M@0xc4000000 rootdelay=5').


    You have exported "/home/buba/filesystem" but used " /home/buba/filesystem/omap"
    So, can you please edit the /etc/exports" file and change it to " /home/buba/filesystem/omap" ?
    Can you please make sure that you have used the correct NFS path and you have filesystem ?
  • Dear Titus,

    I tried this, but the same. I can't even ping 192.168.1.10/11 hosts.

    Regards,
    Bakir
  • How did you connect the target board and PC ?


    I am starting to use custom OMAP-L138 board. I also have an OMAP-L138_LCDK Kit. I tried to use NFS within the Kit, and succeeded with this. Kit downoads kernel mcsdk image through tftp server, boots kernel and then mounts filesystem using NFS server.

    Still you are able to mount NFS on LCDK board ?
    Are you using the same setup for your custom board too?

    It seems ethernet is working perfectly on your custom board, so please check your bootargs and NFS server setup in Linux PC.
    Also please make sure that you are using the same bootargs in your custom board.
  • Hi Titus!

    OMAP-L138 on my custom board connects with Marvell 88E6165 through MII interface. During linux boot one of 88E6165 PHYs connects with my PC at 1000Mb/s, but PHY on the Kit connects at 100Mb/s. So, I tried to change speed on my PC. And what you think? I saw long-awaited message: VFS: Mounted root (nfs filesystem) on device 0:13

    So, I did all right. Now I think, I need to change ethernet phy driver to accept 1000Mb/s connection.

    Thank you very much Titus! Thanks to all who replied to me!!!

    I have one more question: Is any method to bind 2 Eth PHYs to one Ethernet interface (eth0)?

    Best regards,

    Bakir

  • Sounds good.
    Thanks for the update.