[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch b/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
new file mode 100644
index 0000000..5592646
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/0001-Link-with-libtirpc.patch
@@ -0,0 +1,79 @@
+From 5746b68ba9dda87586b3ac88fe84031cbc0015f7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 11 May 2018 12:20:03 -0700
+Subject: [PATCH] Link with libtirpc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure                 | 2 +-
+ rpc.rusersd/rusers_proc.c | 7 +------
+ rpc.rusersd/rusersd.c     | 6 +-----
+ rup/rup.c                 | 2 +-
+ 4 files changed, 4 insertions(+), 13 deletions(-)
+
+diff --git a/configure b/configure
+index 85f6ca6..2d2d4b7 100755
+--- a/configure
++++ b/configure
+@@ -147,7 +147,7 @@ else
+ fi
+ 
+ LDFLAGS=
+-LIBS=
++LIBS="-ltirpc"
+ 
+ rm -f __conftest*
+ 
+diff --git a/rpc.rusersd/rusers_proc.c b/rpc.rusersd/rusers_proc.c
+index 9ae6306..f9e237c 100644
+--- a/rpc.rusersd/rusers_proc.c
++++ b/rpc.rusersd/rusers_proc.c
+@@ -57,12 +57,7 @@ char rp_rcsid[] =
+ 	#define RUT_TIME ut_time
+ #endif
+ 
+-/* Glibc strikes again */
+-#ifdef __GLIBC__
+-	#include <rpcsvc/rusers.h>
+-#else
+-	#include "rusers.h"
+-#endif 
++#include "rusers.h"
+ 
+ void rusers_service(struct svc_req *rqstp, SVCXPRT *transp);
+ 
+diff --git a/rpc.rusersd/rusersd.c b/rpc.rusersd/rusersd.c
+index 762be9b..dd355ac 100644
+--- a/rpc.rusersd/rusersd.c
++++ b/rpc.rusersd/rusersd.c
+@@ -38,11 +38,7 @@ char rusersd_rcsid[] =
+ #include <rpc/pmap_clnt.h>
+ #include <unistd.h>
+ #include <grp.h>
+-#ifdef __GLIBC__
+-	#include <rpcsvc/rusers.h>
+-#else
+-	#include "rusers.h"
+-#endif
++#include "rusers.h"
+ 
+ #include "../version.h"
+ 
+diff --git a/rup/rup.c b/rup/rup.c
+index e5669ff..887f89d 100644
+--- a/rup/rup.c
++++ b/rup/rup.c
+@@ -48,7 +48,7 @@ char rcsid[] = "$Id: rup.c,v 1.8 2000/07/22 19:51:40 dholland Exp $";
+ 
+ #undef FSHIFT			/* Use protocol's shift and scale values */
+ #undef FSCALE
+-#include <rpcsvc/rstat.h>
++#include "rstat.h"
+ 
+ #include "../version.h"
+ 
+-- 
+2.17.0
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch b/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch
new file mode 100644
index 0000000..d85178d
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers/rpc.rusersd-Makefile-fix-parallel-build-issue.patch
@@ -0,0 +1,30 @@
+From c23cc112a480f90950de5cf1de09b1a7e732bf21 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 15 Dec 2014 18:31:13 -0800
+Subject: [PATCH] rpc.rusersd/Makefile: fix parallel build issue
+
+Fixed:
+rusers.x: No such file or directory
+Makefile:44: recipe for target 'rusers_xdr.c' failed
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ rpc.rusersd/Makefile |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rpc.rusersd/Makefile b/rpc.rusersd/Makefile
+index 792f528..65a424a 100644
+--- a/rpc.rusersd/Makefile
++++ b/rpc.rusersd/Makefile
+@@ -40,5 +40,5 @@ rusers.x:
+ rusers.h: $(RUSERSX) rusers.x
+ 	$(RPCGEN) -h -o rusers.h rusers.x
+ 
+-rusers_xdr.c: $(RUSERSX)
++rusers_xdr.c: $(RUSERSX) rusers.x
+ 	$(RPCGEN) -c -C -o rusers_xdr.c rusers.x
+-- 
+1.7.9.5
+
diff --git a/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb b/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
new file mode 100644
index 0000000..9b8af27
--- /dev/null
+++ b/meta/meta-openembedded/meta-networking/recipes-netkit/netkit-rusers/netkit-rusers_0.17.bb
@@ -0,0 +1,78 @@
+DESCRIPTION = "netkit-rusers includes rusers - Displays who is logged in to machines on local network \
+    rusersd - Logged in users server"
+HOMEPAGE = "ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
+SECTION = "net"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://rusers/rusers.c;beginline=2;endline=3;md5=f4fc634a4ce8c569911196b72b10770e"
+DEPENDS = " tcp-wrappers libtirpc rpcbind"
+
+SRC_URI = "http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}.orig.tar.gz;name=archive \
+           http://http.debian.net/debian/pool/main/n/${BPN}/${BPN}_${PV}-8.diff.gz;name=patch8 \
+           file://rpc.rusersd-Makefile-fix-parallel-build-issue.patch \
+           file://0001-Link-with-libtirpc.patch \
+"
+
+SRC_URI[archive.md5sum] = "dc99a80b9fde2ab427c874f88f1c1602"
+SRC_URI[archive.sha256sum] = "f00138651865ad2dcfec5dedda0cda403cb80c4ab68efcc3bbccafe198c24b6d"
+SRC_URI[patch8.md5sum] = "1ff498113e0f920d92088092e5570bdc"
+SRC_URI[patch8.sha256sum] = "14882dbdda4e37baa84d55b54b46c7e063a20fc9e04d1be1a2807643cd0f3067"
+
+inherit autotools-brokensep
+
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+LIBS += "-ltirpc"
+
+do_configure () {
+    ./configure --prefix=${prefix}
+    echo "LDFLAGS=${LDFLAGS}" >> MCONFIG
+    echo "USE_GLIBC=1" >> MCONFIG
+    echo "LIBS=${LIBS}" >> MCONFIG
+}
+
+do_install () {
+    install -d ${D}${bindir}
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man1
+    install -d ${D}${mandir}/man8
+    install -d ${D}${sysconfdir}/xinetd.d
+
+    sed -i 's/install -s/install/' rusers/Makefile
+    sed -i 's/install -s/install/' rup/Makefile
+    sed -i 's/install -s/install/' rpc.rusersd/Makefile
+
+    oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \
+    'DAEMONMODE=0755' 'MANMODE=0644' \
+    'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' install
+
+    # create the xinetd config file
+    cat >rusersd.conf <<EOF
+ service rusersd
+ {
+    disable     = yes
+    type        = RPC
+    rpc_version = 1-2
+    socket_type = dgram
+    protocol    = udp
+    wait        = yes
+    user        = root
+    server      = ${sbindir}/rpc.rusersd
+ }
+EOF
+    install rusersd.conf ${D}/${sysconfdir}/xinetd.d/rusersd
+}
+
+
+INSANE_SKIP_${PN} = "already-stripped"
+
+PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg"
+FILES_${PN}-client = "${bindir}/*"
+FILES_${PN}-server = "${sbindir}/* ${sysconfdir}"
+FILES_${PN}-doc = "${mandir}"
+FILES_${PN}-dbg = "${prefix}/src/debug \
+            ${bindir}/.debug ${sbindir}/.debug"
+
+RDEPENDS_${PN}-server = "tcp-wrappers xinetd rpcbind"
+
+# http://errors.yoctoproject.org/Errors/Details/186962/
+EXCLUDE_FROM_WORLD_libc-musl = "1"