Request Help with NFS Client Test

Till Straumann strauman at slac.stanford.edu
Mon Jul 16 06:31:24 UTC 2007


In order to make the information provided more useful
you should:

a) change your BSP so it produces a stack trace
    from the exception handler (try
    libcpu/powerpc/shared/src/stack.c: CPU_print_stack())

b) post your binary (elf file) along with the register
    and stack dump.

That said -- looking at your source code it seems
that (at least on the 4.7 branch) using a NULL pointer
for the first argument to RTEMS 'mount' is illegal.

You could also use the convenience wrapper 'nfsMount()'
which does a DNS lookup (non thread-safe gethostbyname!)
and creates a mount-point (not nested directories, though)
if necessary:

nfsMount("server","/export","/home")

both methods are explained in the rtemsNFS README.

HTH
T.

Joel Sherrill wrote:
> Hi,
>
> I have been trying to write a test for
> the NFS client.  It fails with a weird
> protection exception on the PowerPC
> target I am using.
>
> I have no idea whether I am configuring
> RTEMS right for NFS or initializing the
> NFS client correctly.
>
> The filesystem exported has no restrictions
> on it and is mountable from other computers.
> Admittedly all of them are Fedora 7 so
> it should work.
>
> Attached is the test and log.  It assumes you
> are building in the network-demos so you have
> to have a networkconfig.h.  Also you will have
> to change the mount command since I used an IP
> address for the NFS server.
>
> If someone can help get this working, I would
> appreciate it.  I want to add this to the
> network-demos.
>
> --joel
> ------------------------------------------------------------------------
>
>
>
> U-Boot 1.2.0-g9912121f-dirty (Jun 18 2007 - 14:19:53)
>
> CPU:   MPC5200 v1.2, Core v1.1 at 396 MHz
>        Bus 132 MHz, IPB 66 MHz, PCI 33 MHz
> Board: Motorola MPC5200 (IceCube)
> I2C:   85 kHz, ready
> DRAM:  128 MB
> FLASH: 16 MB
> PCI:   Bus Dev VenId DevId Class Int
>         00  1a  1057  5803  0680  00
> In:    serial
> Out:   serial
> Err:   serial
> Net:   FEC ETHERNET
> IDE:   Bus 0: not available  
>
> Type "run flash_nfs" to mount root filesystem over NFS
>
> Hit any key to stop autoboot:  0 
> Using FEC ETHERNET device
> TFTP from server 192.168.1.210; our IP address is 192.168.1.244
> Filename 'hello.img'.
> Load address: 0x1000000
> Loading: *#################################################
> done
> Bytes transferred = 248806 (3cbe6 hex)
> ## Booting image at 01000000 ...
>    Image Name:   RTEMS
>    Created:      2007-07-13  18:29:54 UTC
>    Image Type:   PowerPC RTEMS Kernel Image (gzip compressed)
>    Data Size:    248742 Bytes = 242.9 kB
>    Load Address: 00040000
>    Entry Point:  00040000
>    Verifying Checksum ... OK
>    Uncompressing Kernel Image ... OK
> ## Transferring control to RTEMS (at address 00040000) ...
> Exception handling initialization done
>
>
> *** NFS Client TEST ***
> Free space 132357464
> =============== Loading filesystem image ===============
> ============== Look at Local Filesystem ==============
> PWD: /
>
> ls /
>          2,        536b,     0.0     00755 dev/
>          5,        536b,     0.0     00755 etc/
>          8,      14586b,     0.0     00644 rtems_logo.jpg
>          9,          0b,     0.0     00755 home/
>
> ls /etc
>          6,         18b,     0.0     00644 host.conf
>          7,         69b,     0.0     00644 hosts
> ============== Initializing Network ==============
> ============== Initializing RPC ==============
> This is RTEMS-RPCIOD Release $Name:  $
> ($Id: rpcio.c,v 1.4 2006/08/30 13:52:10 joel Exp $)
>
> Till Straumann, Stanford/SLAC/SSRL 2002
> See LICENSE file for licensing info
> ============== Initializing NFS Subsystem ==============
> This is RTEMS-NFS Release $Name:  $
> ($Id: nfs.c,v 1.3 2006/06/20 00:36:25 ericn Exp $)
>
> Till Straumann, Stanford/SLAC/SSRL 2002
> See LICENSE file for licensing info
> ============== Mounting Remote Filesystem ==============
> MY_CALLOC: 1 8896
> RPCIO: entering index 106, val 24c268
> Initial lifetime: 10000 (ticks)
> RPCIO: got TX event
> XACT (0x0024c268) age is 0xc3b, now: 0x83
> RPCIO: next timeout is bb8
> RPCIO: got RX event
> RPCIO: next timeout is 2710
> RPCIO: removing index 106, val 24c268
> ---> NFS Ping server
> MY_CALLOC: 1 896
> RPCIO: entering index 101, val 24c060
> RPCIO: got TX event
> XACT (0x0024c060) age is 0x1835, now: 0xc7d
> RPCIO: next timeout is bb8
> exception handler called for exception 2
> 	 Next PC or Address of fault = 1C7F5D7C
> 	 Saved MSR = 4B010
> 	 R0 = 4B5D8
> 	 R1 = E1FE8
> 	 R2 = B010
> 	 R3 = 24C298
> 	 R4 = 54
> 	 R5 = 3
> 	 R6 = 24B8A0
> 	 R7 = 3
> 	 R8 = 24A880
> 	 R9 = 1C7F5D7F
> 	 R10 = 249180
> 	 R11 = B78BA
> 	 R12 = 0
> 	 R13 = FFC0
> 	 R14 = B0000
> 	 R15 = B0000
> 	 R16 = B0000
> 	 R17 = B37C8
> 	 R18 = B0000
> 	 R19 = F0000000
> 	 R20 = 0
> 	 R21 = B0000
> 	 R22 = B78A8
> 	 R23 = E2034
> 	 R24 = F0009D00
> 	 R25 = B0000
> 	 R26 = F0009D00
> 	 R27 = B78A8
> 	 R28 = 54
> 	 R29 = 24C268
> 	 R30 = 0
> 	 R31 = B29C4
> 	 CR = 400C6884
> 	 CTR = 1C7F5D7F
> 	 XER = 20000000
> 	 LR = 41168
> 	 MSR = B78A8
> ------------------------------------------------------------------------
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users





More information about the users mailing list