From 1804aa8b4dc70292944337641df4740195a3f25b Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 29 Mar 2017 16:45:51 +0200 Subject: add 3G CN: osmo-hlr, osmocom-3g, osmo-iuh, libasn1c Copy openbsc to osmocom-3g (for lack of a better name) to build the vlr_3G branch of openbsc.git, producing osmo-msc, osmo-sgsn with Iu capabilities and osmo-bsc_mgcp (now a misnomer) to direct RTP streams. Add osmo-hlr. Add osmo-iuh for osmo-hnbgw, and libosmo-ranap dependency of osmocom-3g. Add libasn1c. --- recipes-osmocom/libasn1c/libasn1c.inc | 11 +++ recipes-osmocom/libasn1c/libasn1c_git.bb | 7 ++ recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp | Bin 0 -> 12288 bytes recipes-osmocom/osmo-hlr/osmo-hlr.inc | 51 +++++++++++++ recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init | 48 ++++++++++++ recipes-osmocom/osmo-hlr/osmo-hlr_git.bb | 10 +++ recipes-osmocom/osmo-iuh/.osmo-msc_git.bb.swp | Bin 0 -> 12288 bytes recipes-osmocom/osmo-iuh/osmo-iuh.inc | 56 ++++++++++++++ recipes-osmocom/osmo-iuh/osmo-iuh/osmo-hnbgw.init | 48 ++++++++++++ recipes-osmocom/osmo-iuh/osmo-iuh_git.bb | 10 +++ recipes-osmocom/osmocom-3g/.osmo-msc_git.bb.swp | Bin 0 -> 12288 bytes recipes-osmocom/osmocom-3g/osmocom-3g.inc | 82 +++++++++++++++++++++ .../osmocom-3g/osmocom-3g/osmo-bsc_mgcp.init | 48 ++++++++++++ .../osmocom-3g/osmocom-3g/osmo-msc.init | 48 ++++++++++++ .../osmocom-3g/osmocom-3g/osmo-sgsn.init | 48 ++++++++++++ .../osmocom-3g/upgrade-mncc-version.patch | 17 +++++ recipes-osmocom/osmocom-3g/osmocom-3g_git.bb | 12 +++ 17 files changed, 496 insertions(+) create mode 100644 recipes-osmocom/libasn1c/libasn1c.inc create mode 100644 recipes-osmocom/libasn1c/libasn1c_git.bb create mode 100644 recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp create mode 100644 recipes-osmocom/osmo-hlr/osmo-hlr.inc create mode 100755 recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init create mode 100644 recipes-osmocom/osmo-hlr/osmo-hlr_git.bb create mode 100644 recipes-osmocom/osmo-iuh/.osmo-msc_git.bb.swp create mode 100644 recipes-osmocom/osmo-iuh/osmo-iuh.inc create mode 100755 recipes-osmocom/osmo-iuh/osmo-iuh/osmo-hnbgw.init create mode 100644 recipes-osmocom/osmo-iuh/osmo-iuh_git.bb create mode 100644 recipes-osmocom/osmocom-3g/.osmo-msc_git.bb.swp create mode 100644 recipes-osmocom/osmocom-3g/osmocom-3g.inc create mode 100755 recipes-osmocom/osmocom-3g/osmocom-3g/osmo-bsc_mgcp.init create mode 100755 recipes-osmocom/osmocom-3g/osmocom-3g/osmo-msc.init create mode 100755 recipes-osmocom/osmocom-3g/osmocom-3g/osmo-sgsn.init create mode 100644 recipes-osmocom/osmocom-3g/osmocom-3g/upgrade-mncc-version.patch create mode 100644 recipes-osmocom/osmocom-3g/osmocom-3g_git.bb diff --git a/recipes-osmocom/libasn1c/libasn1c.inc b/recipes-osmocom/libasn1c/libasn1c.inc new file mode 100644 index 0000000..d9df425 --- /dev/null +++ b/recipes-osmocom/libasn1c/libasn1c.inc @@ -0,0 +1,11 @@ +DESCRIPTION = "library to build asn1c generated sources" +DEPENDS = "libtalloc" +DEPENDS_append_geode = "dahdi-linux" +HOMEPAGE = "http://osmocom.org" +LICENSE = "AGPLv3" + +INC_PR="r2.${META_TELEPHONY_OSMO_INC}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" + +inherit autotools pkgconfig diff --git a/recipes-osmocom/libasn1c/libasn1c_git.bb b/recipes-osmocom/libasn1c/libasn1c_git.bb new file mode 100644 index 0000000..6bd8b0b --- /dev/null +++ b/recipes-osmocom/libasn1c/libasn1c_git.bb @@ -0,0 +1,7 @@ +require ${PN}.inc + +S = "${WORKDIR}/git" +SRCREV = "20d668cbd3c14ef32fcbd09617fbd3c8e6856ec0" +SRC_URI = "git://git.osmocom.org/libasn1c.git;protocol=git" +PV = "0.1+gitr${SRCPV}" +PR = "${INC_PR}.1" diff --git a/recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp b/recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp new file mode 100644 index 0000000..042d535 Binary files /dev/null and b/recipes-osmocom/osmo-hlr/.osmo-msc_git.bb.swp differ diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr.inc b/recipes-osmocom/osmo-hlr/osmo-hlr.inc new file mode 100644 index 0000000..4a549e8 --- /dev/null +++ b/recipes-osmocom/osmo-hlr/osmo-hlr.inc @@ -0,0 +1,51 @@ +DESCRIPTION = "Osmocom GSM/UMTS Home Location Register" +DEPENDS = "libosmocore libosmo-abis libsqlite3" +HOMEPAGE = "http://osmocom.org/projects/osmo-hlr" +LICENSE = "AGPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" + +SRC_URI = "file://osmo-hlr.init" + +INC_PR = "r1.${META_TELEPHONY_OSMO_INC}" + +inherit autotools update-rc.d pkgconfig + +# 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 -m 0660 ${S}/doc/examples/osmo-hlr/osmo-hlr.cfg ${D}${sysconfdir}/osmocom/osmo-hlr.cfg + + # Install sysv-init files + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/rc5.d + install -m 0775 ${WORKDIR}/osmo-hlr.init ${D}${sysconfdir}/init.d/osmo-hlr + + # Install systemd files and enable on sysinit + install -d ${D}${systemd_unitdir}/system + for i in `ls ${S}/contrib/systemd`; do + install -m 0644 ${S}/contrib/systemd/$i ${D}${systemd_unitdir}/system/ + done + + install -d ${D}/var/lib/osmocom +} + +PACKAGES =+ "osmo-hlr" + +INITSCRIPT_PACKAGES = "osmo-hlr" + +# Do not start any of the services by default +SYSTEMD_AUTO_ENABLE = "disable" + +CONFFILES_osmo-hlr = "${sysconfdir}/osmocom/osmo-hlr.cfg" +INITSCRIPT_NAME_osmo-hlr = "osmo-hlr" +INITSCRIPT_PARAMS_osmo-hlr = "defaults 30 30" +FILES_osmo-hlr = " ${bindir}/osmo-hlr \ + /var/lib/osmocom \ + ${sysconfdir}/init.d/osmo-hlr \ + ${sysconfdir}/osmocom/osmo-hlr.cfg \ + ${systemd_unitdir}/system/osmo-hlr.service \ + " diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init b/recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init new file mode 100755 index 0000000..2444f89 --- /dev/null +++ b/recipes-osmocom/osmo-hlr/osmo-hlr/osmo-hlr.init @@ -0,0 +1,48 @@ +!/bin/sh +### BEGIN INIT INFO +# Provides: osmo-hlr +# Required-Start: $syslog $networking +# Required-Stop: $syslog +# Default-Start: 5 +# Default-Stop: 1 +# Short-Description: Osmocom HLR +### END INIT INFO + +DAEMON=/usr/bin/osmo-hlr +NAME=osmo-hlr +DESC="Osmocom HLR" +NORMAL_ARGS="-D -c /etc/osmocom/osmo-hlr.cfg -l /var/lib/osmocom/hlr.db" + +OSMOHLR_EXTRA_ARGS="" +NO_START=1 + +set -e + +test ! -r /etc/default/osmo-hlr || . /etc/default/osmo-hlr +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 $OSMOHLR_EXTRA_ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb new file mode 100644 index 0000000..b5cffe9 --- /dev/null +++ b/recipes-osmocom/osmo-hlr/osmo-hlr_git.bb @@ -0,0 +1,10 @@ +require ${PN}.inc + +PV = "0.1.0+gitr${SRCPV}" +PRINC = "0" +PR = "${INC_PR}.1" + +SRCREV = "743cf42ac5dfa2661317e73f70b204bde7450ff2" +SRC_URI += "git://git.osmocom.org/osmo-hlr.git;protocol=git" + +S = "${WORKDIR}/git/osmo-hlr" diff --git a/recipes-osmocom/osmo-iuh/.osmo-msc_git.bb.swp b/recipes-osmocom/osmo-iuh/.osmo-msc_git.bb.swp new file mode 100644 index 0000000..042d535 Binary files /dev/null and b/recipes-osmocom/osmo-iuh/.osmo-msc_git.bb.swp differ diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh.inc b/recipes-osmocom/osmo-iuh/osmo-iuh.inc new file mode 100644 index 0000000..0fdc317 --- /dev/null +++ b/recipes-osmocom/osmo-iuh/osmo-iuh.inc @@ -0,0 +1,56 @@ +DESCRIPTION = "OsmoHNBGW, libosmo-ranap" +DEPENDS = "libosmocore libosmo-abis libosmo-netif libasn1c" +HOMEPAGE = "http://osmocom.org/projects/cellular-infrastructure" +LICENSE = "AGPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" + +SRC_URI = "file://osmo-hnbgw.init" + +INC_PR = "r1.${META_TELEPHONY_OSMO_INC}" + +#EXTRA_OECONF += " " + +inherit autotools update-rc.d pkgconfig + +# 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 -m 0660 ${S}/doc/examples/osmo-hnbgw.cfg ${D}${sysconfdir}/osmocom/osmo-hnbgw.cfg + + # Install sysv-init files + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/rc5.d + install -m 0775 ${WORKDIR}/osmo-hnbgw.init ${D}${sysconfdir}/init.d/osmo-hnbgw + + # Install systemd files and enable on sysinit + install -d ${D}${systemd_unitdir}/system + for i in `ls ${S}/contrib/systemd`; do + install -m 0644 ${S}/contrib/systemd/$i ${D}${systemd_unitdir}/system/ + done + + install -d ${D}/var/lib/osmocom +} + +PACKAGES =+ "osmo-hnbgw libosmo-ranap" + +INITSCRIPT_PACKAGES = "osmo-hnbgw" + +# Do not start any of the services by default +SYSTEMD_AUTO_ENABLE = "disable" + +CONFFILES_osmo-hnbgw = "${sysconfdir}/osmocom/osmo-hnbgw.cfg" +INITSCRIPT_NAME_osmo-hnbgw = "osmo-hnbgw" +INITSCRIPT_PARAMS_osmo-hnbgw = "defaults 30 30" +FILES_osmo-hnbgw = " ${bindir}/osmo-hnbgw \ + /var/lib/osmocom \ + ${sysconfdir}/init.d/osmo-hnbgw \ + ${sysconfdir}/osmocom/osmo-hnbgw.cfg \ + ${systemd_unitdir}/system/osmo-hnbgw.service \ + " + +# ????? +FILES_libosmo-ranap = " ${libdir}/libosmo-ranap " diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh/osmo-hnbgw.init b/recipes-osmocom/osmo-iuh/osmo-iuh/osmo-hnbgw.init new file mode 100755 index 0000000..34c21fb --- /dev/null +++ b/recipes-osmocom/osmo-iuh/osmo-iuh/osmo-hnbgw.init @@ -0,0 +1,48 @@ +!/bin/sh +### BEGIN INIT INFO +# Provides: osmo-hnbgw +# Required-Start: $syslog $networking +# Required-Stop: $syslog +# Default-Start: 5 +# Default-Stop: 1 +# Short-Description: Osmocom HNBGW +### END INIT INFO + +DAEMON=/usr/bin/osmo-hnbgw +NAME=osmo-hnbgw +DESC="Osmocom HNBGW" +NORMAL_ARGS="-D -c /etc/osmocom/osmo-hnbgw.cfg" + +OSMOHNBGW_EXTRA_ARGS="" +NO_START=1 + +set -e + +test ! -r /etc/default/osmo-hnbgw || . /etc/default/osmo-hnbgw +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 $OSMOHNBGW_EXTRA_ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb new file mode 100644 index 0000000..8e83964 --- /dev/null +++ b/recipes-osmocom/osmo-iuh/osmo-iuh_git.bb @@ -0,0 +1,10 @@ +require ${PN}.inc + +PV = "0.1.0+gitr${SRCPV}" +PRINC = "0" +PR = "${INC_PR}.1" + +SRCREV = "c23c4fe06c543648a7c7dc429ce50f5cf79abe3a" +SRC_URI += "git://git.osmocom.org/osmo-iuh.git;protocol=git" + +S = "${WORKDIR}/git/osmo-iuh" diff --git a/recipes-osmocom/osmocom-3g/.osmo-msc_git.bb.swp b/recipes-osmocom/osmocom-3g/.osmo-msc_git.bb.swp new file mode 100644 index 0000000..042d535 Binary files /dev/null and b/recipes-osmocom/osmocom-3g/.osmo-msc_git.bb.swp differ diff --git a/recipes-osmocom/osmocom-3g/osmocom-3g.inc b/recipes-osmocom/osmocom-3g/osmocom-3g.inc new file mode 100644 index 0000000..b9d4197 --- /dev/null +++ b/recipes-osmocom/osmocom-3g/osmocom-3g.inc @@ -0,0 +1,82 @@ +DESCRIPTION = "OsmoMSC, OsmoSGSN, OsmoMGCP" +DEPENDS = "libdbi libosmocore libosmo-sccp libosmo-abis libosmo-netif openggsn libsmpp34 bcg729 libgsm libpcap c-ares libasn1c osmo-iuh" +HOMEPAGE = "http://osmocom.org/projects/osmomsc" +LICENSE = "AGPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" + +RDEPENDS_osmo-msc = "libdbd-sqlite3" + +SRC_URI = "file://osmo-msc.init \ + file://osmo-bsc_mgcp.init \ + file://osmo-sgsn.init" + +INC_PR = "r1.${META_TELEPHONY_OSMO_INC}" + + +EXTRA_OECONF += " --enable-iu --enable-smpp --enable-mgcp-transcoding --with-g729" + +inherit autotools update-rc.d pkgconfig + +# 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 -m 0660 ${S}/doc/examples/osmo-msc/osmo-msc.cfg ${D}${sysconfdir}/osmocom/osmo-msc.cfg + install -m 0660 ${S}/doc/examples/osmo-bsc_mgcp/mgcp.cfg ${D}${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg + install -m 0660 ${S}/doc/examples/osmo-sgsn/osmo-sgsn.cfg ${D}${sysconfdir}/osmocom/osmo-sgsn.cfg + + # Install sysv-init files + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/rc5.d + install -m 0775 ${WORKDIR}/osmo-msc.init ${D}${sysconfdir}/init.d/osmo-msc + install -m 0775 ${WORKDIR}/osmo-bsc_mgcp.init ${D}${sysconfdir}/init.d/osmo-bsc-mgcp + install -m 0775 ${WORKDIR}/osmo-sgsn.init ${D}${sysconfdir}/init.d/osmo-sgsn + + # Install systemd files and enable on sysinit + install -d ${D}${systemd_unitdir}/system + for i in `ls ${S}/contrib/systemd`; do + install -m 0644 ${S}/contrib/systemd/$i ${D}${systemd_unitdir}/system/ + done + + install -d ${D}/var/lib/osmocom +} + +PACKAGES =+ "osmo-msc osmo-sgsn osmo-bsc-mgcp ipaccess-utils" + +INITSCRIPT_PACKAGES = "osmo-msc osmo-sgsn osmo-bsc-mgcp" + +# Do not start any of the services by default +SYSTEMD_AUTO_ENABLE = "disable" + +CONFFILES_osmo-msc = "${sysconfdir}/osmocom/osmo-msc.cfg" +INITSCRIPT_NAME_osmo-msc = "osmo-msc" +INITSCRIPT_PARAMS_osmo-msc = "defaults 30 30" +FILES_osmo-msc = " ${bindir}/osmo-msc \ + /var/lib/osmocom \ + ${sysconfdir}/init.d/osmo-msc \ + ${sysconfdir}/osmocom/osmo-msc.cfg \ + ${systemd_unitdir}/system/osmo-msc.service \ + " + +CONFFILES_osmo-sgsn = "${sysconfdir}/osmocom/osmo-sgsn.cfg" +INITSCRIPT_NAME_osmo-sgsn = "osmo-sgsn" +INITSCRIPT_PARAMS_osmo-sgsn = "defaults 30 30" +FILES_osmo-sgsn = " ${bindir}/osmo-sgsn \ + ${sysconfdir}/init.d/osmo-sgsn \ + ${sysconfdir}/osmocom/osmo-sgsn.cfg \ + ${systemd_unitdir}/system/osmo-sgsn.service \ + " + +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}/osmo-bsc_mgcp \ + ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \ + ${sysconfdir}/init.d/osmo-bsc-mgcp \ + ${systemd_unitdir}/system/osmo-bsc-mgcp.service \ + " + +FILES_ipaccess-utils = " ${bindir}/ipaccess-find ${bindir}/ipaccess-config ${bindir}/ipaccess-proxy " diff --git a/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-bsc_mgcp.init b/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-bsc_mgcp.init new file mode 100755 index 0000000..058ec80 --- /dev/null +++ b/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-bsc_mgcp.init @@ -0,0 +1,48 @@ +#!/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 MGCP proxy +### END INIT INFO + +DAEMON=/usr/bin/osmo-bsc_mgcp +NAME=osmo-bsc_mgcp +DESC="Osmocom MGCP proxy" +NORMAL_ARGS="-D -c /etc/osmocom/osmo-bsc-mgcp.cfg" + +OSMOBSCMGCP_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 $OSMOBSCMGCP_EXTRA_ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON" + echo "$NAME." + ;; + restart) + $0 stop + $0 start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-msc.init b/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-msc.init new file mode 100755 index 0000000..6369bbf --- /dev/null +++ b/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-msc.init @@ -0,0 +1,48 @@ +!/bin/sh +### BEGIN INIT INFO +# Provides: osmo-msc +# Required-Start: $syslog $networking +# Required-Stop: $syslog +# Default-Start: 5 +# Default-Stop: 1 +# Short-Description: Osmocom MSC +### END INIT INFO + +DAEMON=/usr/bin/osmo-msc +NAME=osmo-msc +DESC="Osmocom MSC" +NORMAL_ARGS="-C -D -c /etc/osmocom/osmo-msc.cfg -l /var/lib/osmocom/sms.db" + +OSMOMSC_EXTRA_ARGS="" +NO_START=1 + +set -e + +test ! -r /etc/default/osmo-msc || . /etc/default/osmo-msc +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 $OSMOMSC_EXTRA_ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-sgsn.init b/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-sgsn.init new file mode 100755 index 0000000..4481135 --- /dev/null +++ b/recipes-osmocom/osmocom-3g/osmocom-3g/osmo-sgsn.init @@ -0,0 +1,48 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: osmo-sgsn +# Required-Start: $syslog $networking +# Required-Stop: $syslog +# Default-Start: 5 +# Default-Stop: 1 +# Short-Description: Osmocom Serving GPRS Support Node +### END INIT INFO + +DAEMON=/usr/bin/osmo-sgsn +NAME=osmo-sgsn +DESC="Osmocom Serving GPRS Support Node" +NORMAL_ARGS="-D -c /etc/osmocom/osmo-sgsn.cfg" + +OSMOSGSN_EXTRA_ARGS="" +NO_START=0 + +set -e + +test ! -r /etc/default/osmo-sgsn || . /etc/default/osmo-sgsn +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 $OSMOSGSN_EXTRA_ARGS + echo "$NAME." + ;; + stop) + echo -n "Stopping $DESC: " + start-stop-daemon -K -x "$DAEMON" + echo "$NAME." + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-osmocom/osmocom-3g/osmocom-3g/upgrade-mncc-version.patch b/recipes-osmocom/osmocom-3g/osmocom-3g/upgrade-mncc-version.patch new file mode 100644 index 0000000..b856cc3 --- /dev/null +++ b/recipes-osmocom/osmocom-3g/osmocom-3g/upgrade-mncc-version.patch @@ -0,0 +1,17 @@ +lcr uses MNCC_SOCK_VERSION 5, but this is binary compatible to +what openbsc thinks is version 4. The only difference is the added +RTP related commands, which are optional. + +Index: openbsc/include/openbsc/mncc.h +=================================================================== +--- openbsc.orig/include/openbsc/mncc.h ++++ openbsc/include/openbsc/mncc.h +@@ -163,7 +163,7 @@ struct gsm_data_frame { + unsigned char data[0]; + }; + +-#define MNCC_SOCK_VERSION 4 ++#define MNCC_SOCK_VERSION 5 + struct gsm_mncc_hello { + uint32_t msg_type; + uint32_t version; diff --git a/recipes-osmocom/osmocom-3g/osmocom-3g_git.bb b/recipes-osmocom/osmocom-3g/osmocom-3g_git.bb new file mode 100644 index 0000000..b31d290 --- /dev/null +++ b/recipes-osmocom/osmocom-3g/osmocom-3g_git.bb @@ -0,0 +1,12 @@ +require ${PN}.inc + +PV = "0.14.0+gitr${SRCPV}" +PRINC = "0" +PR = "${INC_PR}.6" + +# openbsc.git branch vlr_3G +SRCREV = "2e8ecf3af3c1ffab29357f45e4576b2d3b9268e4" +SRC_URI += "git://git.osmocom.org/openbsc.git;protocol=git \ + file://upgrade-mncc-version.patch" + +S = "${WORKDIR}/git/osmocom-3g" -- cgit v1.2.3