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.
This commit is contained in:
Neels Hofmeyr 2017-03-29 16:45:51 +02:00
parent 24b544024c
commit 1804aa8b4d
17 changed files with 496 additions and 0 deletions

View File

@ -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

View File

@ -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"

Binary file not shown.

View File

@ -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 \
"

View File

@ -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

View File

@ -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"

Binary file not shown.

View File

@ -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 "

View File

@ -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

View File

@ -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"

Binary file not shown.

View File

@ -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 "

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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"