2

I would like to add NFS support (both client and server) for my Android device. I have already built and inserted the required kernel modules (sunrpc.ko, lockd.ko, nfs.ko, exportfs.ko, nfsd.ko)

My Android phone now can act as an NFS client by mounting using Busybox. But to work as an NFS server, seems like some utilities (such as exportfs) and service daemons (portmap, nfsd, mountd, etc) are missing.

I figured I needed to install the nfs-utils package (http://nfs.sourceforge.net/).

I thought I should cross-compile it on my pc and then install it on my phone's Linux kernel. I'm not familiar with the whole cross-compiling thing. I'm trying to compile it on Ubuntu right now, and this is the command I'm using:

$ ./configure 
  --target=arm-linux-gnueabi 
  --host=arm-linux-gnueabi 
  --build=x86_64-linux 
  CC=/usr/bin/arm-linux-gnueabi-gcc 
  CPPFLAGS="-I/usr/arm-linux-gnueabi/include/" 
  CFLAGS="-nostdlib" 
  LDFLAGS="-Wl,-rpath-link=/usr/arm-linux-gnueabi/lib/ -L/usr/arm-linux-gnueabi/lib/"
  LIBS="-lc"

This gives me the error msg:

checking for libwrap... configure: error: *** libwrap missing

config.log errors:

  1. configure:3978: /usr/bin/arm-linux-gnueabi-gcc -V >&5

    arm-linux-gnueabi-gcc: fatal error: no input files

  2. configure:3978: /usr/bin/arm-linux-gnueabi-gcc -qversion >&5

    arm-linux-gnueabi-gcc: fatal error: no input files

  3. conftest.c:12:28: fatal error: ac_nonexistent.h: No such file or directory

  4. conftest.c:55:28: fatal error: sys/capability.h: No such file or directory

I have the gcc-arm-linux-gnueabi package installed, but I guess there are some problems with building/linking with dependency libraries I don't really understand. Should they be cross-compiled too? How can I do that? And will I need to insert these libraries into my phone for NFS to run properly?

I'm completely new to this so any help would be greatly appreciated.

sundie
  • 245
  • 3
  • 12

1 Answers1

1

You have a dependency of tcp-wrappers which means you must first build and install tcp wrappers.

Alternatively, you can pass this option to ./configure:

--without-tcp-wrappers \

Also, you can get a complete list of options:

./configure --help