UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor sgushwa
Visitor
10,306 Views
Registered: ‎08-05-2013

NFS server on zc706 board

Jump to solution

I am trying to install an NFS server on the zc706 dev board by cross-compiling and installing from source (linux nfs-utils.1.3.0 specifically).  The host is RHEL 6 which has built dozens of successful loads for the zc706 and a custom zynq board (Vivado/PetaLinux 2014.2). The ./configure fails because of a library dependency when invoked by this script:

 

#! /bin/sh

if [ -z "$PETALINUX" ]

then
pushd .; cd /opt/pkg/petalinux-v2014.2-final && source ./settings.sh; popd
source /opt/Xilinx/Vivado/2014.2/settings64.sh
else
echo $PETALINUX
fi

export CC=arm-xilinx-linux-gnueabi-gcc
export LD=arm-xilinx-linux-gnueabi-ld
export NM=arm-xilinx-linux-gnueabi-nm
export AR=arm-xilinx-linux-gnueabi-ar
export RANLIB=arm-xilinx-linux-gnueabi-ranlib

export OPT=-Os
export TUNE="-march=armv7-a -mtune=cortex-a9 -mthumb"
export CFLAGS="$TUNE $OPT"

 

./configure \

--host=arm-xilinx-linux-gnueabi \
--target=arm-xilinx-linux-gnueabi \
--without-tcp-wrappers \
--disable-nfsv4 \
--disable-nfsv41

make -j4

 

The last few lines of the screen output (full file is attached):

 

checking for gethostbyname... yes
checking for connect... yes
checking for getaddrinfo... yes
checking for getrpcbynumber... yes
checking for getservbyname... yes
checking for crypt in -lcrypt... yes
checking for dlclose in -ldl... yes
checking for blkid_get_library_version in -lblkid... no
configure: error: libblkid needed

 

The larger question is how should the cross-compile be configured to resolve these dependencies?  We used -mthumb to successfully compile and install Samba on the same project. The disable nfsv4 was a crutch to get around depencies as well.

 

Thanks,

Steve

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
18,654 Views
Registered: ‎12-17-2007

Re: NFS server on zc706 board

Jump to solution

libblkid is a standard Linux utility (ftp://ftp.kernel.org/pub/linux/utils/util-linux/).  It looks like you'll need to have source downloaded and available for the NFS server cross-compile.

 

My recommendation is to use the flow outlined here: http://www.xilinx.com/support/answers/59172.html

 

You'll download and cross-compile NFS server (and its dependencies) outside of PetaLinux.  Then, using the workflow outlined in that AR, bring the compiled collateral into your root filesystem.  Don't forget that NFS server has some dependencies on kernel configuration options so you'll want to make sure that your kernel is configured properly as well for NFS server support.

-------------------------------------------
this space intentionally left blank
6 Replies
Highlighted
Xilinx Employee
Xilinx Employee
18,655 Views
Registered: ‎12-17-2007

Re: NFS server on zc706 board

Jump to solution

libblkid is a standard Linux utility (ftp://ftp.kernel.org/pub/linux/utils/util-linux/).  It looks like you'll need to have source downloaded and available for the NFS server cross-compile.

 

My recommendation is to use the flow outlined here: http://www.xilinx.com/support/answers/59172.html

 

You'll download and cross-compile NFS server (and its dependencies) outside of PetaLinux.  Then, using the workflow outlined in that AR, bring the compiled collateral into your root filesystem.  Don't forget that NFS server has some dependencies on kernel configuration options so you'll want to make sure that your kernel is configured properly as well for NFS server support.

-------------------------------------------
this space intentionally left blank
Visitor sgushwa
Visitor
10,271 Views
Registered: ‎08-05-2013

Re: NFS server on zc706 board

Jump to solution

The libblkid library is already in the zynq rootfs/lib/arm-xilinx-linux-gnueabihf/libblkid.so.1 which is already cross-compiled. I was hoping to just point at it with CPPFLAGS=-I/<path> and/or LDFLAGS=-L<path> without the need for additional source (this lib contains tools for block devices which are ubiquitous).

 

The NFS client and server settings have been configured in the kernel.

 

Thanks for the AR# 59172 reference.  I will investigate that next.

0 Kudos
Visitor sgushwa
Visitor
10,214 Views
Registered: ‎08-05-2013

Re: NFS server on zc706 board

Jump to solution

I was able to cross-compile from source, install and execute on the zc706 board.  The root cause of my problem was in the nfs-utils configure, make, make install sequence where I had to use several option to compensate for shortcomings in the sequence.  None of these issues were Xilinx related.  The NFS server is now working.

0 Kudos
9,946 Views
Registered: ‎06-16-2015

Re: NFS server on zc706 board

Jump to solution

I am trying to do this exact same thing, loading a NFS server onto a ZedBoard from a CentOS VM.  Would you mind providing some information about the problem you had and the solution you found?  Thank you.

0 Kudos
Xilinx Employee
Xilinx Employee
9,933 Views
Registered: ‎02-01-2008

Re: NFS server on zc706 board

Jump to solution

I did this a while back with Ubuntu 12 desktop running in a VM. My notes are:

 

–Install and start the nfs server
sudo apt-get install nfs-kernel-server nfs-common portmap

–Create a directory to export (shared using nfs) using the command ‘sudo mkdir -p /exports/shared

–Open privileges ‘sudo chmod a+w /exports/shared

–Edit /etc/exports using ‘sudo vi /etc/exports’ and add the line:
/exports/shared *(rw,insecure,no_subtree_check,async)

–Save and close the file

–Restart the nfs server and use the new exports/shared dir with ‘sudo exportfs –a

–You can view active mounts with 'showmount -a

–Change the VM network connection by choosing machine->settings, then choose ‘network’. Change the ‘attached to’ from NAT to ‘Bridged Adapter’. This will allow a Zynq board to connect to the new nfs server we just created

 

 

0 Kudos
Visitor sgushwa
Visitor
9,924 Views
Registered: ‎08-05-2013

Re: NFS server on zc706 board

Jump to solution

John, I was able to get nfs-utils.1.3.0 working but it fell apart under heavy loading and dynamic operation. Next was an upgrade to 1.3.2 using this method: start at nfs-org and follow notes from Linux From Scratch on the topic. I used the attached script to build nfs-utils and its prerequisites. The key is the prefix ZYNQ_NFS_INSTALL which protects the host from being overwritten by cross-compiled artifacts and the PKG_CONFIG_PATH which helps prerequisites find one another. After the script completes - copy everything from the prefix directory into the petalinux targetroot directory. Ensure the NFS kernel components are enabled and that portmapper is activated. Follow the nfs-utils README and it should run. My goal was a full NFS server but, as you can see from the script, components were disabled to get a build. The goal is still a full implementation and any tips would be appreciated. Steve

0 Kudos