NFS in KiSS

Short description ;-) :

Or go to Source patching section


Short description

1. Get these binaries - kiss-nfs.tgz
2. Unpack them, put into romfs.bin file, prepare ISO, burn it and update player.
3. Restart player and do something like this:

big:root: ~# telnet 10.1.1.2
Trying 10.1.1.2...
Connected to 10.1.1.2.
Escape character is '^]'.
/ # cd nfs

/nfs # insmod sunrpc.o
Using sunrpc.o

/nfs # insmod lockd.o
Using lockd.o

/nfs # insmod nfs.o
Using nfs.o

/nfs # cat /proc/filesystems
nodev   rootfs
nodev   bdev
nodev   proc
nodev   sockfs
nodev   pipefs
        iso9660
nodev   devfs
        romfs
        udf
nodev   devpts
nodev   nfs

/nfs # mount 10.1.1.3:/disks/d/DivX /mnt/a -o nolock -t nfs

/nfs # ls /mnt/a
-rwxr--r--    1 0        0         4866460 Nov 19  2003 Hipek.mpg
-rwxr--r--    1 0        0        37207132 Sep 30  2003 ROTK-trailer.avi
-rwxr--r--    1 0        0         8355911 Nov 19  2003 spacestar.wmv
drwxr--r--   11 0        0           16384 Sep  5  2003 test
dr-xr--r--    7 0        0           16384 Mar 24  2003 tools
-rwxr--r--    1 0        0        20290960 Sep 18  2003 tripletsofbelleville.mov

/nfs # mount
/dev/root on / type romfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
10.1.1.3:/disks/d/DivX on /mnt/a type nfs (rw,v2,rsize=8192,wsize=8192,hard,udp,nolock,addr=10.1.1.3)

/nfs # /fileplayer.bin AVI /mnt/a/ROTK-trailer.avi



Source patching section

To have NFS support in KiSS you need two things - uClinux kernel with support for NFS and busybox binary with mount command supporting NFS filesystem. To compile these two things you will need arm-elf-toolchain with SunRPC support. So here it goes:

Prerequisite - Building arm-elf toolchain with SunRPC support

1. Get all files from
this location and put them into one directory.
2. Run "./build-uclinux-tools.sh build" - it will unpack all files and try to build whole arm-elf toolchain from scratch.
3. After runing this script edit file uClibc/extra/Configs/Config.arm.default and change:
#
# Networking Support
#
# UCLIBC_HAS_IPV6 is not set
# UCLIBC_HAS_RPC is not set

#
# String and Stdio Support
#

to:
#
# Networking Support
#
# UCLIBC_HAS_IPV6 is not set
UCLIBC_HAS_RPC = y

#
# String and Stdio Support
#

4. Run "./build-uclinux-tools.sh build" until you get success ;-)
5. Run "./build-uclinux-tools.sh tar" and you'll get arm-elf-tool distribution file.
6. Install this file and you have arm-elf toolchain with uCLibc with NFS support.

Stage 1 - uCLinux source patch and kernel compiling

1. Get this archive - kiss-nfs-patch.tgz and unpack it.
2. This archive has two files - nfs-patch.diff and config.nfs .
3. Apply diff file to original uCLinux source code published by KiSS uCLinux-2.4.17.tgz using command "patch -p0 -s < nfs-patch.diff".
4. Move config.nfs file to uClinux-2.4/.config .
5. Run "make menuconfig" in uClinux-2.4 dir and exit saving your configuration but without changing anything!!!.
6. Do "make dep ; make ; make modules".
7. Copy files uClinux-2.4/linux.bin.gz , uClinux-2.4/fs/nfs/nfs.o , uClinux-2.4/fs/lockd/lockd.o and uClinux-2.4/net/sunrpc/sunrpc.o to directory with KiSS romfs contents.

Stage 2 - Building Busybox with NFS support

1. Get Busybox source from here and unpack it.
2. Run "make menuconfig" and choose what you want.
3. Additionaly go into "Linux System Utilities" section and choose mount command. Naturally also choose "Support mounting NFS filesystems" ;-) .
4. Run " mkdir /usr/local/arm-elf/include/config ; cp /usr/src/ARM/uClinux-2.4/include/linux/autoconf.h /usr/local/arm-elf/include/config".
5. Run "make ; make install PREFIX=/tmp/aaa" and you'll have in /tmp/aaa busybox with symbolic links to all binaries it supports.
6. Check all links (move some of them from sbin into bin dir!).
7. When everything's OK copy all these links and busybox binary to your romfs contents directory into bin subdir..
8. Generate new romfs.bin file.


That's all folks ;-)

Big