MIPS下nfs-server软件交叉编译

由于客户需求,需要在龙芯平台mips下架构支持nfs-server,之前检索这块资料比较少,整理一下给需要者

libtirpc-1.2.6

PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH ./configure --disable-gssapi --host=mips64el-linux --prefix=/home/share/nfs/usr
PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH make
PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH make install

rpcbind-1.2.5

PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH ./configure TIRPC_CFLAGS="-I/home/share/nfs/usr/include/tirpc" TIRPC_LIBS="-L/home/share/nfs/usr/lib -ltirpc" --without-systemdsystemunitdir --host=mips64el-linux --prefix=/home/share/nfs/usr
PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH make
PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH make install

nfs-utils-2.5.1

PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH ./configure  TIRPC_CFLAGS="-I/home/share/nfs/usr/include/tirpc" TIRPC_LIBS="-L/home/share/nfs/usr/lib -ltirpc" --disable-nfsv4 --disable-nfsv41 --disable-gss --disable-uuid  --disable-ipv6 --with-tirpcinclude=/home/share/nfs/usr/include/tirpc --host=mips64el-linux --prefix=/home/share/nfs/usr
PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH make
PATH=/opt/gcc-4.9.3-64-gnu/bin:$PATH make install

配置文件

exports为挂载点配置文件,netconfig缺失会导致后续命令异常退出

/etc/exports
/etc/netconfig

配置命令

#创建一次即可
mkdir /var/lib/nfs

#启动nfs服务
rpcbind
mount -t nfsd nfsd /proc/fs/nfsd
exportfs -av
rpc.mountd
rpc.statd --no-notify
rpc.nfsd
sm-notify
posted @ 2020-08-01 23:12  rdwr  阅读(727)  评论(0编辑  收藏  举报