I have a patch for this I'll share tomorrow.
Hint: all the kernel modules have the wrong deps. Here's the extract from ~/src/openwrt/trunk/package/kernel/modulesfs.mk file.
It also supports NFS with kerberos too (if you choose to install nfsv-4-common) - only if mit-krb5 wasn't broken in openwrt. I'm going to make a hemidal package for openwrt too if I have time.
define KernelPackage/fs-nfs
SUBMENU:=$(FS_MENU)
TITLE:=NFS filesystem support
DEPENDS:=+kmod-fs-nfs-common
KCONFIG:= \
CONFIG_NFS_FS \
CONFIG_NFS_USE_LEGACY_DNS=y \
CONFIG_NFS_USE_NEW_IDMAPPER=y \
CONFIG_NFS_V3_ACL=n \
CONFIG_NFS_ACL_SUPPORT=n \
CONFIG_NFS_SWAP=y
FILES:= $(LINUX_DIR)/fs/nfs/nfs.ko \
$(LINUX_DIR)/fs/nfs/nfsv3.ko
AUTOLOAD:=$(call AutoLoad,40,nfs nfsv3)
endef
define KernelPackage/fs-nfs/description
Kernel module for NFS support
endef
$(eval $(call KernelPackage,fs-nfs))
define KernelPackage/fs-nfs-common
SUBMENU:=$(FS_MENU)
TITLE:=Common NFS filesystem modules
KCONFIG:= \
CONFIG_LOCKD \
CONFIG_SUNRPC \
CONFIG_SUNRPC_SWAP=y \
CONFIG_NFS_COMMON=y \
CONFIG_NFS_ACL_SUPPORT=n
FILES:= \
$(LINUX_DIR)/fs/lockd/lockd.ko \
$(LINUX_DIR)/net/sunrpc/sunrpc.ko
AUTOLOAD:=$(call AutoLoad,30,sunrpc lockd)
endef
$(eval $(call KernelPackage,fs-nfs-common))
define KernelPackage/fs-nfs-common-v4
SUBMENU:=$(FS_MENU)
TITLE:=Common NFS V4 filesystem modules
KCONFIG+=\
CONFIG_SUNRPC_GSS\
CONFIG_NFS_V4 \
CONFIG_KEYS=y \
CONFIG_RPCSEC_GSS_KRB5
DEPENDS:= +kmod-fs-nfs-common +kmod-fs-nfs +kmod-crypto-manager \
+kmod-crypto-cts +kmod-crypto-cbc +kmod-crypto-ecb \
+kmod-crypto-hmac +kmod-crypto-sha1 +kmod-crypto-aes \
+kmod-crypto-des +kmod-crypto-md5 +kmod-crypto-arc4
FILES+=$(LINUX_DIR)/net/sunrpc/auth_gss/auth_rpcgss.ko \
$(LINUX_DIR)/fs/nfs/nfsv4.ko \
$(LINUX_DIR)/net/sunrpc/auth_gss/rpcsec_gss_krb5.ko
AUTOLOAD=$(call AutoLoad,30,auth_rpcgss rpcsec_gss_krb5 nfsv4)
endef
define KernelPackage/fs-nfs-common-v4/description
Kernel modules for NFS V4 kernel support
endef
$(eval $(call KernelPackage,fs-nfs-common-v4))
define KernelPackage/fs-nfsd
SUBMENU:=$(FS_MENU)
TITLE:=NFS kernel server support
DEPENDS:=+kmod-fs-nfs-common +kmod-fs-exportfs +kmod-nfs-common-v4
KCONFIG:= \
CONFIG_NFSD \
CONFIG_NFSD_FAULT_INJECTION=n \
CONFIG_NFSD_V2_ACL=n \
CONFIG_NFSD_V3_ACL=n \
CONFIG_NFSD_V3=y \
CONFIG_NFSD_V4=y
FILES:=$(LINUX_DIR)/fs/nfsd/nfsd.ko
AUTOLOAD:=$(call AutoLoad,40,nfsd)
endef
define KernelPackage/fs-nfsd/description
Kernel module for NFS kernel server support
endef
$(eval $(call KernelPackage,fs-nfsd))
I boot nfsv3 in my 3.6 meg image (yes needs portmap), then I can load in the modules into memory. zramfs helps, but it's somewhat broken in it's current version (yes patch coming for that too).
I could be wrong and the kernel could make a nfs.ko (for nfs3 only), but if you want 3 and 4 there is also a nfsv3.ko that needs to be installed. I think this is required in any case for everything to work.
Cheers.
update: oh and also you need to make a few more cryptoapi kernel module package definitions
You will also be needing a custom kernel with swap support and a other few goodies to make nfs happy.
You get the benefit of swaping your PC's /tmpfs mount containing a linux swapfile in memory for your router, in effect beefing up your routers memory to run more apps (though there is network latency involved - do this if you have a decent router with gigabit lan)
(Last edited by hojuruku on 4 Apr 2013, 19:14)