Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: NFS Mounting of Root Filesystem (SAM9G45)
PostPosted: Mon May 23, 2011 11:02 pm 
Offline

Joined: Mon May 23, 2011 10:25 pm
Posts: 5
Hi Everyone,

I read the posts that I could find on NFS mounting of the root filesystem and most of the issues seem to be related to an incorrect kernel command line. I believe mine is correct as:

bootargs=console=ttySAC0,115200 tft=m root=/dev/nfs rw nfsroot=192.168.1.6:/expo
rts/fs ip=192.168.1.200:192.168.1.6:192.168.1.1:255.255.255.0::eth0:off

Entries in .config related to NFS:

CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
# CONFIG_NFSD is not set
CONFIG_NFS_COMMON=y

I load the kernel using tftp from the same server that is exporting the root filesystem.

bootcmd=tftpboot 0x72000000 uImage.bin; bootm

My actual hardware is an Embest SBC6045 which as best as I can tell is compatible with the Atmel EK. I have tried this using the kernel shipped with the hardware as well as the prebuilt kernels and today I compiled the latest myself. All produce the same symptoms.

In the end it appears to configure the network properly. I believe the RPC call to look up the NFS port works--the packet exchange I sniffed looked fine. But then it says it mounts root and a few seconds later it says that the NFS server is not responding.

The server is Ubuntu running as a VM using the "bridged" network option and I can mount the exported filesystem on the host (OSX) just fine.

Thanks,

Kenny

U-Boot> boot
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0x45e1)
Using macb0 device
TFTP from server 192.168.1.6; our IP address is 192.168.1.200
Filename 'uImage.bin'.
Load address: 0x72000000
Loading: #################################################################
########################################################
done
Bytes transferred = 1775876 (1b1904 hex)
## Booting kernel from Legacy Image at 72000000 ...
Image Name: Linux-2.6.30
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1775812 Bytes = 1.7 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
............................................................... done, booting th
e kernel.
Linux version 2.6.30 (chengpg@LINUXSERVER) (gcc version 4.2.0 20070413 (prerelea
se) (CodeSourcery Sourcery G++ Lite 2007q1-10)) #15 Wed Jul 28 17:37:52 CST 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9G45-EKES
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Ignoring RAM at 20000000-27ffffff (vmalloc region overlap).
Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: console=ttySAC0,115200 tft=m root=/dev/nfs rw nfsroot=192.1
68.1.6:/exports/fs ip=192.168.1.200:192.168.1.6:192.168.1.1:255.255.255.0::eth0:
off
NR_IRQS:192
AT91: 160 gpio irqs in 5 banks
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 125824KB available (3084K code, 239K data, 500K init, 0K highmem)
Calibrating delay loop... 198.65 BogoMIPS (lpj=99328)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
atmel_tcb: probe of atmel_tcb.0 failed with error -22
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
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
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
yaffs Jul 28 2010 17:14:58 Installing.
msgmni has been set to 246
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 750KiB frame buffer at 77900000 (mapped at ffa00000)
Console: switching to colour frame buffer device 100x30
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00500000 (mapped at c8808000), i
rq 23
atmel_usart.0: ttySAC0 at MMIO 0xfeffee00 (irq = 1) is a ATMEL_SERIAL
atmel_usart.1: ttySAC1 at MMIO 0xfff8c000 (irq = 7) is a ATMEL_SERIAL
atmel_usart.2: ttySAC2 at MMIO 0xfff90000 (irq = 8) is a ATMEL_SERIAL
atmel_usart.3: ttySAC3 at MMIO 0xfff94000 (irq = 9) is a ATMEL_SERIAL
atmel_usart.4: ttySAC4 at MMIO 0xfff98000 (irq = 10) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffbc000 irq 25 (08:00:3e:26:0a:55)
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=ffffffff:00, irq=-1)
NAND device: Manufacturer ID: 0x20, Chip ID: 0xaa (ST Micro NAND 256MiB 1,8V 8-b
it)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Creating 7 MTD partitions on "atmel_nand":
0x000000000000-0x000000020000 : "Bootstrap"
0x000000020000-0x000000080000 : "U-Boot"
0x000000060000-0x000000080000 : "Para1"
0x000000080000-0x0000000a0000 : "Para2"
0x0000000a0000-0x0000001a0000 : "Logo"
0x0000001a0000-0x0000003a0000 : "Kernel"
0x0000003a0000-0x000010000000 : "Rootfs"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
atmel-ehci atmel-ehci: Atmel EHCI UHP HS
atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1
atmel-ehci atmel-ehci: irq 22, io mem 0x00800000
atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Atmel EHCI UHP HS
usb usb1: Manufacturer: Linux 2.6.30 ehci_hcd
usb usb1: SerialNumber: atmel-ehci
usb usb1: configuration #1 chosen from 1 choice
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
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 2
at91_ohci at91_ohci: irq 22, io mem 0x00700000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: AT91 OHCI
usb usb2: Manufacturer: Linux 2.6.30 ohci_hcd
usb usb2: SerialNumber: at91
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xfff78000 mapped at c880c000
atmel_usba_udc atmel_usba_udc: FIFO at 0x00600000 mapped at c8900000
mice: PS/2 mouse device common for all mice
atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz
atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /class/input/input0
at24 0-0050: 256 byte 24c02 EEPROM (writable)
i2c-gpio i2c-gpio.0: using pins 52 (SDA) and 53 (SCL)
Registered led device: d6
Registered led device: d7
Registered led device: d8
Registered led device: beep
Registered led device: gprs_reset
Registered led device: gprs_onoff
at_hdmac at_hdmac: Atmel AHB DMA Controller ( cpy slave ), 8 channels
Advanced Linux Sound Architecture Driver Version 1.0.20.
atmel_ac97c atmel_ac97c.0: Atmel AC97 controller at 0xc8848000, irq = 24
ALSA device list:
#0: Atmel AC97 controller
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff80000 irq 11, 1 slots
atmel_mci atmel_mci.1: Atmel MCI controller at 0xfffd0000 irq 29, 1 slots
IP-Config: Complete:
device=eth0, addr=192.168.1.200, mask=255.255.255.0, gw=192.168.1.1,
host=192.168.1.200, domain=, nis-domain=(none),
bootserver=192.168.1.6, rootserver=192.168.1.6, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.6
eth0: link up (100/Full)
Looking up port of RPC 100005/1 on 192.168.1.6
VFS: Mounted root (nfs filesystem) on device 0:12.
Freeing init memory: 500K
Warning: unable to open an initial console.
nfs: server 192.168.1.6 not responding, still trying


Top
 Profile  
 
 Post subject: Re: NFS Mounting of Root Filesystem (SAM9G45)
PostPosted: Tue May 24, 2011 12:10 am 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Hello,

It's hard to find where the problem comes from.

Some clues:
- a problem with your /etc/exports file but stranged if it works with the host
- kernel configuration, check if IP_PNP and ROOT_NFS are selected
- when you say you have sniffed the packet, where? On your host machine or on the virtual one?


Top
 Profile  
 
 Post subject: Re: NFS Mounting of Root Filesystem (SAM9G45)
PostPosted: Tue May 24, 2011 2:06 am 
Offline

Joined: Mon May 23, 2011 10:25 pm
Posts: 5
Thanks for the reply.

IP_PNP and CONFIG_ROOT_NFS were not selected. But I got the same results when I enabled them. It does have me wondering if I am missing some other option somewhere.

I have no reason to doubt the NFS export at this time.

I used WireShark on the VM *host*. It worked fine. I could see packets for TFTP, RCP, and NFS being sent. I will take a closer look at what is happening in the NFS packets.

Kenny


Top
 Profile  
 
 Post subject: Re: NFS Mounting of Root Filesystem (SAM9G45)
PostPosted: Tue May 24, 2011 9:03 am 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
Concerning kernel options I think it's good. I am always using this set of options and I have no trouble.

Very strange if you see the frames into your VM. That's why I am thinking maybe there is a right problem with the nfs configuration. Have you tried to mount your nfs share on another machine than the host?


Top
 Profile  
 
 Post subject: Re: NFS Mounting of Root Filesystem (SAM9G45)
PostPosted: Sun May 29, 2011 8:21 pm 
Offline

Joined: Mon May 23, 2011 10:25 pm
Posts: 5
Resolved. This is for the Embest SBC6045 which is very similar to the SAM9G45 board.

It turned out that the network configuration on the root filesystem was incorrect.
The kernel was able to mount the file system and indicated so but then the
network initialized to an incorrect static IP when the user space booted.

Modify /etc/init.d/S40network in the filesystem shipped with the Embest system.
I believe this is "rfs-qtopia".

This file had hardcoded eth0 with ifconfig rather than use the interfaces file so
my entries were ignored. I modified this file to use "ifup".

Also, you may get an error that is it unable to open the console if you are trying
to access via the serial port. One source of this error is that /dev/console does
not exist. You can create the character device node from the *host* using:

sudo mknod dev/console c 5 1


Top
 Profile  
 
 Post subject: Re: NFS Mounting of Root Filesystem (SAM9G45)
PostPosted: Mon May 30, 2011 12:02 pm 
Offline

Joined: Thu Jan 06, 2011 11:13 am
Posts: 31
[quote="Twanger"]
It turned out that the network configuration on the root filesystem was incorrect.
The kernel was able to mount the file system and indicated so but then the
network initialized to an incorrect static IP when the user space booted.
[/quote]

Congratulation to find the issue, it's a common problem but I have not thought it can be your problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: