Here's a rough step by step on how to compile your own kernel module for NFS server support.
- First note:
So far, I haven't been able to make this work. Should you do, let the rest of us know. After all, that is what this community is all about.
EDIT:Some sleep made it all clearer and it is now working.
- Second note:
I accept no liability should your bubba go up in flames, become a brick or what ever bad thing you can think of. In other words, YOU ARE ON YOUR OWN (but you have my sympathy
)!!
- Third note:
Your bubba is most likely far from as fast as your desktop computer. This means compiling will take time, and a lot of it. Remember, patience a virtue. All good things come to he who waits (yeah, right, but you get my drift, right....)
- Fourth note:
There may/will be errors during the build. I ignored/worked around them, you have to decide if you dare to.
- Fifth and last note (really, this is the last one)
I've modified my B2 so I may have packages installed that you don't, in other words, your mileage may vary. You may have to install packages I've forgotten to mention.
These are the packages that I know for sure you need to install before trying anything else:
- bzip2
- build-essential
- less (ok, so this is not really essential but will enhance your 'man' experience)
Each package is installed using:
Code: Select all
apt-get install <pkg-name>And now that we are prepared, off we go:
1. Log on to your bubba using your favourite SSH client.
2. Get the linux kernel source:
Code: Select all
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.5.tar.bz23. Decompress it:
Code: Select all
tar xjf linux-2.6.26.5.tar.bz24. Enter kernel source folder:
Code: Select all
cd linux-2.6.26.5Code: Select all
cp /proc/config.gz .Code: Select all
gunzip config.gzCode: Select all
cp config .configCode: Select all
vim .configCode: Select all
# CONFIG_NFSD is not setCode: Select all
CONFIG_NFSD=mCode: Select all
make modulesEDIT: I forgot to mention that you will get some questions about parts of NFS you want support for. I chose to install all that wasn't marked as experimental.
11. Ok, so the movie has ended and the compiling as well, but what the..., an error on crtsavres.o. Fear not:
Code: Select all
make arch/powerpc/lib/crtsavres.oCode: Select all
make modules13. And now everything should be complete. We need to copy the files to the right folders. You need root privilegies for this:
Code: Select all
mkdir /lib/module/`uname -r`/kernel/fs/nfsd
mkdir /lib/module/`uname -r`/kernel/fs/exportfs
mkdir /lib/module/`uname -r`/kernel/fs/nfsd_common
cp fs/nfsd/nfsd.ko /lib/kernel/`uname -r`/kernel/fs/nfsd
cp fs/exportfs/exportfs.ko /lib/module/`uname -r`/kernel/fs/exportfs
cp fs/nfs_common/nfs_acl.ko /lib/module/`uname -r`/kernel/fs/nfs_commonCode: Select all
depmod -aCode: Select all
modprobe nfsdCode: Select all
dmesg
lsmodAll you need to do next is to install nfs-kernel-server, that should also install nfs-common. Configure the /etc/exports (man exports, for help), /etc/hosts.[deny|allow] (man hosts_access, for help) and you should be up and running. Test it by running:
Code: Select all
rpcinfo -pA faster route would probably be to install a cross-compiler on your desktop computer and compile it there, but I'll save that instruction for a rainy day. The impatient may find interesting stuff at: http://kegel.com/crosstool and http://www.google.com
Another route is to compile only the missing module, but I haven't figured out how to do that. That is, I thought
Code: Select all
make SUBDIRS=fs/nfsd modules/Johan