Add existing sysmocom recipes
diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis.inc b/recipes-osmocom/libosmo-abis/libosmo-abis.inc
new file mode 100644
index 0000000..0632247
--- /dev/null
+++ b/recipes-osmocom/libosmo-abis/libosmo-abis.inc
@@ -0,0 +1,13 @@
+DESCRITOPN = "An utility library for Open Source Mobile Communications"
+DEPENDS = "libosmocore ortp"
+DEPENDS_append_geode = "dahdi-linux"
+HOMEPAGE = "http://openbsc.gnumonks.org"
+LICENSE = "GPL"
+
+INC_PR="r2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
+
+inherit autotools_stage pkgconfig
+
+ALLOW_EMPTY_libosmo-abis = "1"
diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_0.0.6.bb b/recipes-osmocom/libosmo-abis/libosmo-abis_0.0.6.bb
new file mode 100644
index 0000000..362fc85
--- /dev/null
+++ b/recipes-osmocom/libosmo-abis/libosmo-abis_0.0.6.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "346374a001ba42e8d3612fefd76a061f4d494a34"
+SRC_URI = "git://git.osmocom.org/libosmo-abis.git;protocol=git"
+PR = "${INC_PR}.1"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_0.0.8.bb b/recipes-osmocom/libosmo-abis/libosmo-abis_0.0.8.bb
new file mode 100644
index 0000000..d2a25b2
--- /dev/null
+++ b/recipes-osmocom/libosmo-abis/libosmo-abis_0.0.8.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "65a50893d5f9577c17dc4485d585c12d349c8e30"
+SRC_URI = "git://git.osmocom.org/libosmo-abis.git;protocol=git"
+PR = "${INC_PR}.1"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_0.1.0.bb b/recipes-osmocom/libosmo-abis/libosmo-abis_0.1.0.bb
new file mode 100644
index 0000000..74a8481
--- /dev/null
+++ b/recipes-osmocom/libosmo-abis/libosmo-abis_0.1.0.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "fe05cf5b3980bf4778a21b3d311a835b7e19a704"
+SRC_URI = "git://git.osmocom.org/libosmo-abis.git;protocol=git"
+PR = "${INC_PR}.5"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc
new file mode 100644
index 0000000..6c9d8e2
--- /dev/null
+++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc
@@ -0,0 +1,12 @@
+DESCRITOPN = "An utility library for Open Source Mobile Communications"
+DEPENDS = "libosmocore"
+HOMEPAGE = "http://openbsc.gnumonks.org"
+LICENSE = "GPL"
+
+INC_PR="r1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+inherit autotools_stage pkgconfig
+
+ALLOW_EMPTY_libosmo-sccp = "1"
diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.5.1.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.5.1.bb
new file mode 100644
index 0000000..342c105
--- /dev/null
+++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.5.1.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "8be06bc2885460d6a6ed7c9daa7df8ab8f02a2dc"
+SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git"
+PR = "${INC_PR}.0"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.6.1.bb b/recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.6.1.bb
new file mode 100644
index 0000000..328a170
--- /dev/null
+++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.6.1.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "ef8fc3bf28634d361adeec5490f807efb0ab3341"
+SRC_URI = "git://git.osmocom.org/libosmo-sccp.git;protocol=git"
+PR = "${INC_PR}.1"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmocore/libosmocore.inc b/recipes-osmocom/libosmocore/libosmocore.inc
new file mode 100644
index 0000000..16b4882
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore.inc
@@ -0,0 +1,10 @@
+DESCRITOPN = "An utility library for Open Source Mobile Communications"
+HOMEPAGE = "http://openbsc.gnumonks.org"
+LICENSE = "GPL"
+
+INC_PR="r1"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+inherit autotools_stage pkgconfig
+
diff --git a/recipes-osmocom/libosmocore/libosmocore_0.3.1.bb b/recipes-osmocom/libosmocore/libosmocore_0.3.1.bb
new file mode 100644
index 0000000..8c4dce2
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore_0.3.1.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "ee50081daa3a80586f3044056517337a8e8fac9f"
+SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git"
+PR = "${INC_PR}.0"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmocore/libosmocore_0.3.10.bb b/recipes-osmocom/libosmocore/libosmocore_0.3.10.bb
new file mode 100644
index 0000000..bb16132
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore_0.3.10.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "c7ddbe63da535e62f9a10444f8966bf0a6565a74"
+SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git"
+PR = "${INC_PR}.2"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmocore/libosmocore_0.3.4+35.bb b/recipes-osmocom/libosmocore/libosmocore_0.3.4+35.bb
new file mode 100644
index 0000000..55b8a1a
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore_0.3.4+35.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "7e1a622124a6ca6c98e1f3170bf65649ad4321d9"
+SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git"
+PR = "${INC_PR}.0"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmocore/libosmocore_0.3.4.bb b/recipes-osmocom/libosmocore/libosmocore_0.3.4.bb
new file mode 100644
index 0000000..0f14547
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore_0.3.4.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "8264e09ca2f3bd93eba5eefa342267f303085629"
+SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git"
+PR = "${INC_PR}.0"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmocore/libosmocore_0.3.8.bb b/recipes-osmocom/libosmocore/libosmocore_0.3.8.bb
new file mode 100644
index 0000000..18eb80a
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore_0.3.8.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "ee876c91723267d913a12e76f46bd537700ab9e9"
+SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git"
+PR = "${INC_PR}.0"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmocore/libosmocore_0.3.9.bb b/recipes-osmocom/libosmocore/libosmocore_0.3.9.bb
new file mode 100644
index 0000000..22aaba5
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore_0.3.9.bb
@@ -0,0 +1,11 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "d61d517a2e35f482519561bd325652ee7144679a"
+SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git"
+PR = "${INC_PR}.0"
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+    echo "${PV}" > ${S}/.tarball-version
+}
diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb
new file mode 100644
index 0000000..f4d414c
--- /dev/null
+++ b/recipes-osmocom/libosmocore/libosmocore_git.bb
@@ -0,0 +1,7 @@
+require ${PN}.inc
+
+S = "${WORKDIR}/git"
+SRCREV = "c7ddbe63da535e62f9a10444f8966bf0a6565a74"
+SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git"
+PV = "0.3.10+gitr${SRCPV}"
+PR = "1"
diff --git a/recipes-osmocom/meta/meta-toolchain-osmo.bb b/recipes-osmocom/meta/meta-toolchain-osmo.bb
new file mode 100644
index 0000000..a8cd442
--- /dev/null
+++ b/recipes-osmocom/meta/meta-toolchain-osmo.bb
@@ -0,0 +1,6 @@
+#TOOLCHAIN_TARGET_OSMOTASK ?= "task-core-standalone-osmo-sdk-target task-core-standalone-osmo-sdk-target-dbg"
+TOOLCHAIN_TARGET_OSMOTASK ?= "task-core-standalone-osmo-sdk-target"
+TOOLCHAIN_TARGET_TASK = "${TOOLCHAIN_TARGET_OSMOTASK}"
+TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-osmo-${DISTRO_VERSION}"
+PROVIDES = "meta-toolchain-sdk"
+require ../../../meta/recipes-core/meta/meta-toolchain.bb
diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc
new file mode 100644
index 0000000..44b0935
--- /dev/null
+++ b/recipes-osmocom/openbsc/openbsc.inc
@@ -0,0 +1,69 @@
+DESCRITOPN = "OpenBSC a Free Software GSM BaseStationController"
+DEPENDS = "libdbi libosmocore libosmo-sccp libosmo-abis openggsn"
+HOMEPAGE = "http://openbsc.osmocom.org/"
+LICENSE = "AGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
+
+RDEPENDS_osmo-nitb = "libdbd-sqlite3"
+
+SRC_URI = "file://osmo-nitb.init \
+	   file://osmo-bsc_mgcp.init \
+	   file://osmo-bsc.init"
+INC_PR = "r11"
+
+
+EXTRA_OECONF += " --enable-nat --enable-osmo-bsc "
+
+inherit autotools update-rc.d
+
+# because "${WORKDIR}/git" is not a git repo, it can't figure out the version
+do_configure_prepend() {
+	echo "${PV}" > ${S}/.tarball-version
+}
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/osmocom
+	install -d ${D}${sysconfdir}/init.d
+	install -d ${D}${sysconfdir}/rc5.d
+	install -m 0660 ${S}/doc/examples/osmo-nitb/nanobts/openbsc.cfg ${D}${sysconfdir}/osmocom/osmo-nitb.cfg
+	install -m 0660 ${S}/doc/examples/osmo-bsc/osmo-bsc.cfg ${D}${sysconfdir}/osmocom/osmo-bsc.cfg
+	install -m 0660 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg
+	install -m 0775 ${WORKDIR}/osmo-nitb.init ${D}${sysconfdir}/init.d/osmo-nitb
+	install -m 0775 ${WORKDIR}/osmo-bsc_mgcp.init ${D}${sysconfdir}/init.d/osmo-bsc-mgcp
+	install -m 0775 ${WORKDIR}/osmo-bsc.init ${D}${sysconfdir}/init.d/osmo-bsc
+
+	install -d ${D}/var/lib/osmocom
+}
+
+PACKAGES =+ "osmo-bsc osmo-nitb osmo-gbproxy osmo-gbproxy-dbg osmo-sgsn ipaccess-utils osmo-bsc-mgcp osmo-bsc-nat"
+
+INITSCRIPT_PACKAGES = "osmo-bsc osmo-bsc-mgcp osmo-nitb"
+
+CONFFILES_osmo-bsc = "${sysconfdir}/osmocom/osmo-bsc.cfg"
+INITSCRIPT_NAME_osmo-bsc = "osmo-bsc"
+INITSCRIPT_PARAMS_osmo-bsc = "defaults 30 30"
+FILES_osmo-bsc = " ${bindir}/osmo-bsc \
+		${sysconfdir}/osmocom/osmo-bsc.cfg \
+		${sysconfdir}/init.d/osmo-bsc"
+
+CONFFILES_osmo-bsc-mgcp = "${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg"
+INITSCRIPT_NAME_osmo-bsc-mgcp = "osmo-bsc-mgcp"
+INITSCRIPT_PARAMS_osmo-bsc-mgcp = "defaults 30 30"
+FILES_osmo-bsc-mgcp = " ${bindir}/bsc_mgcp \
+		${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \
+		${sysconfdir}/init.d/osmo-bsc-mgcp"
+
+CONFFILES_osmo-nitb = "${sysconfdir}/osmocom/osmo-nitb.cfg"
+INITSCRIPT_NAME_osmo-nitb = "osmo-nitb"
+INITSCRIPT_PARAMS_osmo-nitb = "defaults 30 30"
+FILES_osmo-nitb = " ${bindir}/osmo-nitb \
+		/var/lib/osmocom \
+		${sysconfdir}/init.d/osmo-nitb \
+		${sysconfdir}/osmocom/osmo-nitb.cfg"
+
+FILES_osmo-sgsn = " ${bindir}/osmo-sgsn "
+FILES_ipaccess-utils = " ${bindir}/ipaccess-find ${bindir}/ipaccess-config ${bindir}/ipaccess-proxy "
+FILES_osmo-bsc-nat = " ${bindir}/osmo-bsc_nat "
+FILES_osmo-gbproxy = " ${bindir}/osmo-gbproxy "
+FILES_osmo-gbproxy-dbg = " ${bindir}/.debug/osmo-gbproxy "
+
diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc.init b/recipes-osmocom/openbsc/openbsc/osmo-bsc.init
new file mode 100755
index 0000000..dd0479a
--- /dev/null
+++ b/recipes-osmocom/openbsc/openbsc/osmo-bsc.init
@@ -0,0 +1,49 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		osmo-bsc
+# Required-Start:	$syslog $networking
+# Required-Stop:	$syslog
+# Default-Start:	5
+# Default-Stop:		1
+# Short-Description:	Osmocom GSM Base Station Controller
+### END INIT INFO
+
+DAEMON=/usr/bin/osmo-bsc
+NAME=osmo-bsc
+DESC="Osmocom GSM Base Station Controller"
+NORMAL_ARGS="-D -c /etc/osmocom/osmo-bsc.cfg"
+
+OSMOBTS_EXTRA_ARGS=""
+NO_START=1
+
+set -e
+
+test ! -r /etc/default/osmo-bsc || . /etc/default/osmo-bsc
+test "$NO_START" = "0" || exit 0
+test -x "$DAEMON" || exit 0
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon -S \
+	  -x "$DAEMON" -- $NORMAL_ARGS $OSMOBTS_EXTRA_ARGS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon -K -x "$DAEMON"
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	start-stop-daemon -K -x "$DAEMON"
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init b/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init
new file mode 100755
index 0000000..cf9c451
--- /dev/null
+++ b/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init
@@ -0,0 +1,49 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		osmo-bsc_mgcp
+# Required-Start:	$syslog $networking
+# Required-Stop:	$syslog
+# Default-Start:	5
+# Default-Stop:		1
+# Short-Description:	Osmocom GSM BSC MGCP proxy
+### END INIT INFO
+
+DAEMON=/usr/bin/bsc_mgcp
+NAME=osmo-bsc_mgcp
+DESC="Osmocom GSM BSC MGCP proxy"
+NORMAL_ARGS="-D -c /etc/osmocom/bsc_mgcp.cfg"
+
+OSMOBTS_EXTRA_ARGS=""
+NO_START=1
+
+set -e
+
+test ! -r /etc/default/osmo-bsc_mgcp || . /etc/default/osmo-bsc_mgcp
+test "$NO_START" = "0" || exit 0
+test -x "$DAEMON" || exit 0
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon -S \
+	  -x "$DAEMON" -- $NORMAL_ARGS $OSMOBTS_EXTRA_ARGS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon -K -x "$DAEMON"
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	start-stop-daemon -K -x "$DAEMON"
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/recipes-osmocom/openbsc/openbsc/osmo-nitb.init b/recipes-osmocom/openbsc/openbsc/osmo-nitb.init
new file mode 100755
index 0000000..86c7f75
--- /dev/null
+++ b/recipes-osmocom/openbsc/openbsc/osmo-nitb.init
@@ -0,0 +1,49 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:		osmo-nitb
+# Required-Start:	$syslog $networking
+# Required-Stop:	$syslog
+# Default-Start:	5
+# Default-Stop:		1
+# Short-Description:	Osmocom GSM Network in the Box
+### END INIT INFO
+
+DAEMON=/usr/bin/osmo-nitb
+NAME=osmo-nitb
+DESC="Osmocom GSM Network in the Box"
+NORMAL_ARGS="-D -c /etc/osmocom/osmo-nitb.cfg -l /var/lib/osmocom/hlr.sqlite3"
+
+OSMOBTS_EXTRA_ARGS=""
+NO_START=1
+
+set -e
+
+test ! -r /etc/default/osmo-nitb || . /etc/default/osmo-nitb
+test "$NO_START" = "0" || exit 0
+test -x "$DAEMON" || exit 0
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon -S \
+	  -x "$DAEMON" -- $NORMAL_ARGS $OSMOBTS_EXTRA_ARGS
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon -K -x "$DAEMON"
+	echo "$NAME."
+	;;
+  restart|force-reload)
+	echo -n "Restarting $DESC: "
+	start-stop-daemon -K -x "$DAEMON"
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
diff --git a/recipes-osmocom/openbsc/openbsc_git.bb b/recipes-osmocom/openbsc/openbsc_git.bb
new file mode 100644
index 0000000..40fd1dc
--- /dev/null
+++ b/recipes-osmocom/openbsc/openbsc_git.bb
@@ -0,0 +1,9 @@
+require ${PN}.inc
+
+PV = "0.10.0+gitr${SRCPV}"
+PR = "${INC_PR}.1"
+
+SRCREV = "670ffe32900c9932f5fb1f3e836f77145bee94b7"
+SRC_URI += "git://git.osmocom.org/openbsc.git;protocol=git"
+
+S = "${WORKDIR}/git/openbsc"
diff --git a/recipes-osmocom/openggsn/files/ggsn.conf b/recipes-osmocom/openggsn/files/ggsn.conf
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/recipes-osmocom/openggsn/files/ggsn.conf
diff --git a/recipes-osmocom/openggsn/files/openggsn.init b/recipes-osmocom/openggsn/files/openggsn.init
new file mode 100755
index 0000000..695a6cc
--- /dev/null
+++ b/recipes-osmocom/openggsn/files/openggsn.init
@@ -0,0 +1,169 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides:          openggsn
+# Required-Start:    $network $local_fs
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Osmocom GSM network-in-a-box
+# Description:       A minimal implementation of the GSM Base Station Controller,
+#                    Mobile Switching Center, Home Location regster and all other
+#                    components to run a self-contained GSM network.
+### END INIT INFO
+
+# Author: Harald Welte <laforge@gnumonks.org>
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="OpenGGSN Gateway GPRS Support Node"
+NAME=openggsn
+DAEMON=/usr/bin/ggsn
+DAEMON_ARGS=""             # Arguments to run the daemon with
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+CONFIG_FILE=/etc/ggsn.conf
+
+# Exit if the package is not installed
+[ -x $DAEMON ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+# . /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+# . /lib/lsb/init-functions
+
+DAEMON_ARGS="$DAEMON_ARGS -c $CONFIG_FILE"
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+	# Return
+	#   0 if daemon has been started
+	#   1 if daemon was already running
+	#   2 if daemon could not be started
+        /sbin/modprobe tun
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+		|| return 1
+
+	# Check for runtime directory of nonvolatile data
+	if [ ! -d /var/lib/ggsn ]; then
+		mkdir /var/lib/ggsn
+	fi
+
+	# Check for GTP restart counter
+	if [ ! -f /var/lib/ggsn/gsn_restart ]; then
+		echo 0 > /var/lib/ggsn/gsn_restart
+	fi
+
+	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+		$DAEMON_ARGS \
+		|| return 2
+	# Add code here, if necessary, that waits for the process to be ready
+	# to handle requests from services started subsequently which depend
+	# on this one.  As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+	# Return
+	#   0 if daemon has been stopped
+	#   1 if daemon was already stopped
+	#   2 if daemon could not be stopped
+	#   other if a failure occurred
+	start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+	RETVAL="$?"
+	[ "$RETVAL" = 2 ] && return 2
+	# Wait for children to finish too if this is a daemon that forks
+	# and if the daemon is only ever run from this initscript.
+	# If the above conditions are not satisfied then add some other code
+	# that waits for the process to drop all resources that could be
+	# needed by services started subsequently.  A last resort is to
+	# sleep for some time.
+	start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+	[ "$?" = 2 ] && return 2
+	# Many daemons don't delete their pidfiles when they exit.
+	rm -f $PIDFILE
+	return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+	#
+	# If the daemon can reload its configuration without
+	# restarting (for example, when it is sent a SIGHUP),
+	# then implement that here.
+	#
+	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	return 0
+}
+
+case "$1" in
+  start)
+    #[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
+    do_start
+    #case "$?" in
+    #		0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+    #		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+    #	esac
+  ;;
+  stop)
+	#[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+	do_stop
+	#case "$?" in
+	#	0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+	#	2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+	#esac
+	;;
+  status)
+       status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+       ;;
+  #reload|force-reload)
+	#
+	# If do_reload() is not implemented then leave this commented out
+	# and leave 'force-reload' as an alias for 'restart'.
+	#
+	#log_daemon_msg "Reloading $DESC" "$NAME"
+	#do_reload
+	#log_end_msg $?
+	#;;
+  restart|force-reload)
+	#
+	# If the "reload" option is implemented then remove the
+	# 'force-reload' alias
+	#
+	#log_daemon_msg "Restarting $DESC" "$NAME"
+	do_stop
+	case "$?" in
+	  0|1)
+		do_start
+		#case "$?" in
+		#	0) log_end_msg 0 ;;
+		#	1) log_end_msg 1 ;; # Old process is still running
+		#	*) log_end_msg 1 ;; # Failed to start
+		#esac
+		;;
+	  *)
+	  	# Failed to stop
+		#log_end_msg 1
+		;;
+	esac
+	;;
+  *)
+	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+	exit 3
+	;;
+esac
+
+:
diff --git a/recipes-osmocom/openggsn/openggsn_git.bb b/recipes-osmocom/openggsn/openggsn_git.bb
new file mode 100644
index 0000000..8cce5f1
--- /dev/null
+++ b/recipes-osmocom/openggsn/openggsn_git.bb
@@ -0,0 +1,37 @@
+DESCRITOPN = "OpenGGSN a Free Software GGSN"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+PV = "0.91+gitr${SRCPV}"
+PR = "r9"
+
+SRCREV = "fe5040967513616731d8151b22d26bdf74d65111"
+SRC_URI = "git://ggsn.git.sourceforge.net/gitroot/ggsn/ggsn \
+           file://openggsn.init                             \
+           file://ggsn.conf                                 \
+          "
+S = "${WORKDIR}/git"
+
+PACKAGES =+ " libgtp libgtp-dev openggsn-sgsnemu"
+RDEPENDS_${PN} += "kernel-module-tun"
+
+inherit autotools update-rc.d
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0776 ${WORKDIR}/openggsn.init ${D}${sysconfdir}/init.d/openggsn
+	install -m 0660 ${WORKDIR}/ggsn.conf ${D}${sysconfdir}/
+
+	# copy the config?
+}
+
+INITSCRIPT_PACKAGES = "openggsn"
+
+CONFFILES_openggsn = "${sysconfdir}/ggsn.conf"
+INITSCRIPT_NAME_openggsn = "openggsn"
+INITSCRIPT_PARAMS_openggsn = "defaults 29 29"
+RDEPENDS_${PN} += "iptables kernel-module-ipt-masquerade"
+
+FILES_libgtp = "${libdir}/*${SOLIBS}"
+FILES_libgtp-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a"
+
+FILES_openggsn-sgsnemu = "${bindir}/sgsnemu"
diff --git a/recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb b/recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb
new file mode 100644
index 0000000..e9f9995
--- /dev/null
+++ b/recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2007 OpenedHand Ltd.
+#
+
+DESCRIPTION = "Software Development Kit for Osmocom devices"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+PR = "r1"
+
+ALLOW_EMPTY = "1"
+
+require task-sdk-osmo.inc
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+RDEPENDS_${PN} = "\
+    task-core-standalone-sdk-target \
+    ${SDK-OSMO} \
+    ${SDK-EXTRAS}"
diff --git a/recipes-osmocom/tasks/task-osmocom.bb b/recipes-osmocom/tasks/task-osmocom.bb
new file mode 100644
index 0000000..de2efa0
--- /dev/null
+++ b/recipes-osmocom/tasks/task-osmocom.bb
@@ -0,0 +1,12 @@
+DESCRIPTION = "Task for Osmocom tools and header files"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+DEPENDS = "virtual/kernel"
+ALLOW_EMPTY = "1"
+PR = "r1"
+
+RDEPENDS_task-osmocom = "\
+    libosmocore \
+    "
+
diff --git a/recipes-osmocom/tasks/task-sdk-osmo.inc b/recipes-osmocom/tasks/task-sdk-osmo.inc
new file mode 100644
index 0000000..45c37c7
--- /dev/null
+++ b/recipes-osmocom/tasks/task-sdk-osmo.inc
@@ -0,0 +1,10 @@
+SDK-OSMO = " \
+    libosmocore-dev \
+    libosmo-sccp-dev \
+    "
+
+SDK-EXTRAS ?= ""
+#SDK-EXTRAS_qemux86 ?= " valgrind lttng-ust-dev"
+#SDK-EXTRAS_qemux86-64 ?= " lttng-ust-dev"
+#SDK-EXTRAS_qemuppc ?= " lttng-ust-dev"
+#SDK-EXTRAS_qemuarm ?= " lttng-ust-dev"