From 60ee4cd50462acf591c3f79e06a63f1f440a8b27 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 11 Nov 2011 21:26:06 +0800 Subject: [PATCH 01/39] Add existing sysmocom recipes --- README | 1 + recipes-isdn/dahdi-linux/dahdi-linux.inc | 76 ++++++++ .../dahdi-linux/dahdi-linux_2.5.0.1.bb | 5 + recipes-isdn/dahdi-tools/dahdi-tools.inc | 17 ++ .../dahdi-tools/dahdi-tools_2.5.0.1.bb | 4 + recipes-misc/libdbi/libdbi-drivers.inc | 32 ++++ recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb | 4 + recipes-misc/libdbi/libdbi.inc | 21 +++ recipes-misc/libdbi/libdbi_0.7.2.bb | 3 + recipes-misc/libdbi/libdbi_0.8.3.bb | 3 + .../files/0001-fix-unused-variables.patch | 75 ++++++++ recipes-misc/ortp/ortp.inc | 20 +++ recipes-misc/ortp/ortp_0.16.5.bb | 8 + recipes-osmocom/libosmo-abis/libosmo-abis.inc | 13 ++ .../libosmo-abis/libosmo-abis_0.0.6.bb | 11 ++ .../libosmo-abis/libosmo-abis_0.0.8.bb | 11 ++ .../libosmo-abis/libosmo-abis_0.1.0.bb | 11 ++ recipes-osmocom/libosmo-sccp/libosmo-sccp.inc | 12 ++ .../libosmo-sccp/libosmo-sccp_0.0.5.1.bb | 11 ++ .../libosmo-sccp/libosmo-sccp_0.0.6.1.bb | 11 ++ recipes-osmocom/libosmocore/libosmocore.inc | 10 ++ .../libosmocore/libosmocore_0.3.1.bb | 11 ++ .../libosmocore/libosmocore_0.3.10.bb | 11 ++ .../libosmocore/libosmocore_0.3.4+35.bb | 11 ++ .../libosmocore/libosmocore_0.3.4.bb | 11 ++ .../libosmocore/libosmocore_0.3.8.bb | 11 ++ .../libosmocore/libosmocore_0.3.9.bb | 11 ++ .../libosmocore/libosmocore_git.bb | 7 + recipes-osmocom/meta/meta-toolchain-osmo.bb | 6 + recipes-osmocom/openbsc/openbsc.inc | 69 +++++++ recipes-osmocom/openbsc/openbsc/osmo-bsc.init | 49 +++++ .../openbsc/openbsc/osmo-bsc_mgcp.init | 49 +++++ .../openbsc/openbsc/osmo-nitb.init | 49 +++++ recipes-osmocom/openbsc/openbsc_git.bb | 9 + recipes-osmocom/openggsn/files/ggsn.conf | 0 recipes-osmocom/openggsn/files/openggsn.init | 169 ++++++++++++++++++ recipes-osmocom/openggsn/openggsn_git.bb | 37 ++++ .../task-core-standalone-osmo-sdk-target.bb | 20 +++ recipes-osmocom/tasks/task-osmocom.bb | 12 ++ recipes-osmocom/tasks/task-sdk-osmo.inc | 10 ++ 40 files changed, 911 insertions(+) create mode 100644 README create mode 100644 recipes-isdn/dahdi-linux/dahdi-linux.inc create mode 100644 recipes-isdn/dahdi-linux/dahdi-linux_2.5.0.1.bb create mode 100644 recipes-isdn/dahdi-tools/dahdi-tools.inc create mode 100644 recipes-isdn/dahdi-tools/dahdi-tools_2.5.0.1.bb create mode 100644 recipes-misc/libdbi/libdbi-drivers.inc create mode 100644 recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb create mode 100644 recipes-misc/libdbi/libdbi.inc create mode 100644 recipes-misc/libdbi/libdbi_0.7.2.bb create mode 100644 recipes-misc/libdbi/libdbi_0.8.3.bb create mode 100644 recipes-misc/ortp/files/0001-fix-unused-variables.patch create mode 100644 recipes-misc/ortp/ortp.inc create mode 100644 recipes-misc/ortp/ortp_0.16.5.bb create mode 100644 recipes-osmocom/libosmo-abis/libosmo-abis.inc create mode 100644 recipes-osmocom/libosmo-abis/libosmo-abis_0.0.6.bb create mode 100644 recipes-osmocom/libosmo-abis/libosmo-abis_0.0.8.bb create mode 100644 recipes-osmocom/libosmo-abis/libosmo-abis_0.1.0.bb create mode 100644 recipes-osmocom/libosmo-sccp/libosmo-sccp.inc create mode 100644 recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.5.1.bb create mode 100644 recipes-osmocom/libosmo-sccp/libosmo-sccp_0.0.6.1.bb create mode 100644 recipes-osmocom/libosmocore/libosmocore.inc create mode 100644 recipes-osmocom/libosmocore/libosmocore_0.3.1.bb create mode 100644 recipes-osmocom/libosmocore/libosmocore_0.3.10.bb create mode 100644 recipes-osmocom/libosmocore/libosmocore_0.3.4+35.bb create mode 100644 recipes-osmocom/libosmocore/libosmocore_0.3.4.bb create mode 100644 recipes-osmocom/libosmocore/libosmocore_0.3.8.bb create mode 100644 recipes-osmocom/libosmocore/libosmocore_0.3.9.bb create mode 100644 recipes-osmocom/libosmocore/libosmocore_git.bb create mode 100644 recipes-osmocom/meta/meta-toolchain-osmo.bb create mode 100644 recipes-osmocom/openbsc/openbsc.inc create mode 100755 recipes-osmocom/openbsc/openbsc/osmo-bsc.init create mode 100755 recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init create mode 100755 recipes-osmocom/openbsc/openbsc/osmo-nitb.init create mode 100644 recipes-osmocom/openbsc/openbsc_git.bb create mode 100644 recipes-osmocom/openggsn/files/ggsn.conf create mode 100755 recipes-osmocom/openggsn/files/openggsn.init create mode 100644 recipes-osmocom/openggsn/openggsn_git.bb create mode 100644 recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb create mode 100644 recipes-osmocom/tasks/task-osmocom.bb create mode 100644 recipes-osmocom/tasks/task-sdk-osmo.inc diff --git a/README b/README new file mode 100644 index 0000000000..3caf92bfae --- /dev/null +++ b/README @@ -0,0 +1 @@ +This is a collection of OE recipes for Osmocom and things related to Osmocom diff --git a/recipes-isdn/dahdi-linux/dahdi-linux.inc b/recipes-isdn/dahdi-linux/dahdi-linux.inc new file mode 100644 index 0000000000..ebc2035f28 --- /dev/null +++ b/recipes-isdn/dahdi-linux/dahdi-linux.inc @@ -0,0 +1,76 @@ +DESCRITOPN = "Digium Asterisk Hardware Driver Interface - Linux kernel part" +SECTION = "base" +HOMEPAGE = "http://www.asterisk.org" +LICENSE = "GPL" +RDEPENDS_${PN} = "kernel (${KERNEL_VERSION})" +DEPENDS = "virtual/kernel" +RRECOMMENDS_${PN} = "dahdi-firmware" + +# those firmware images are normally downloaded as part of the 'make' +# process of dahdi-linux. In the context of OE, we want to list them +# here so they are part of the 'downloads' directory and thus don't need +# to be downloaded all the time. +FIRMWARE_URI = " \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmadt032-1.07.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.11.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.8.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.17.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.18.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.19.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.20.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.22.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-oct6114-064-1.05.01.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-oct6114-128-1.05.01.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-tc400m-MR5.6.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-tc400m-MR6.12.tar.gz \ +http://downloads.digium.com/pub/telephony/firmware/releases/zaptel-fw-vpmadt032-1.07.tar.gz\ + " + +SRC_URI = "http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/dahdi-linux-${PV}.tar.gz ${FIRMWARE_URI}" +# why does this not work? +#SRC_URI =+ "${FIRMWARE_URI}" + +INC_PR="r3" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a" + +inherit module + +do_configure() { + # make sure the extracted firmware.bin are where Makefile expects + mv ../dahdi-fw-*.bin ../zaptel-fw-*.bin drivers/dahdi/firmware/ + cp ${DL_DIR}/dahdi-fwload-*.tar.gz drivers/dahdi/firmware/ + cp ${DL_DIR}/zaptel-fw-*.tar.gz drivers/dahdi/firmware/ + cp ${DL_DIR}/dahdi-fw-*.tar.gz drivers/dahdi/firmware/ +} + +do_compile () { + do_make_scripts + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake KSRC=${STAGING_KERNEL_DIR} \ + KVERS=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + AR="${KERNEL_AR}" \ + ${MAKE_TARGETS} +} + +do_install () { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake DEPMOD=echo DESTDIR="${D}" \ + KSRC=${STAGING_KERNEL_DIR} \ + KVERS=${KERNEL_VERSION} \ + CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ + install +} + +PACKAGES =+ "dahdi-firmware" + +FILES_${PN} = "${base_libdir}/modules/ ${sysconfdir}/udev/rules.d" + +FILES_dahdi-firmware = "${base_libdir}/firmware /usr/share/dahdi" +PACKAGE_ARCH_dahdi-firmware = "all" diff --git a/recipes-isdn/dahdi-linux/dahdi-linux_2.5.0.1.bb b/recipes-isdn/dahdi-linux/dahdi-linux_2.5.0.1.bb new file mode 100644 index 0000000000..3d429c7efd --- /dev/null +++ b/recipes-isdn/dahdi-linux/dahdi-linux_2.5.0.1.bb @@ -0,0 +1,5 @@ + +require ${PN}.inc + +PR = "${INC_PR}.1" + diff --git a/recipes-isdn/dahdi-tools/dahdi-tools.inc b/recipes-isdn/dahdi-tools/dahdi-tools.inc new file mode 100644 index 0000000000..2034163cf0 --- /dev/null +++ b/recipes-isdn/dahdi-tools/dahdi-tools.inc @@ -0,0 +1,17 @@ +DESCRITOPN = "Utilities for the DAHDI Asterisk Linux kernel drivers" +DEPENDS = "dahdi-linux libnewt" +HOMEPAGE = "http://www.asterisk.org" +LICENSE = "GPL" + +SRC_URI = "http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz" + +INC_PR="r2" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=ea5bed2f60d357618ca161ad539f7c0a \ + file://LICENSE.LGPL;md5=fb504b67c50331fc78734fed90fb0e09" + +inherit autotools_stage pkgconfig + +do_configure() { + oe_runconf +} diff --git a/recipes-isdn/dahdi-tools/dahdi-tools_2.5.0.1.bb b/recipes-isdn/dahdi-tools/dahdi-tools_2.5.0.1.bb new file mode 100644 index 0000000000..d1e6987a27 --- /dev/null +++ b/recipes-isdn/dahdi-tools/dahdi-tools_2.5.0.1.bb @@ -0,0 +1,4 @@ +require ${PN}.inc + +PR = "${INC_PR}.1" + diff --git a/recipes-misc/libdbi/libdbi-drivers.inc b/recipes-misc/libdbi/libdbi-drivers.inc new file mode 100644 index 0000000000..76a5702ac8 --- /dev/null +++ b/recipes-misc/libdbi/libdbi-drivers.inc @@ -0,0 +1,32 @@ +# libdbi-drivers OE build file +# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved +# Released under the MIT license (see packages/COPYING) + +DESCRIPTION = "Database Drivers for libdbi" +HOMEPAGE = "http://libdbi-drivers.sourceforge.net/" +LICENSE = "LGPL" +LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" +SECTION = "libs" + +PROVIDES = "libdbd-sqlite" +DEPENDS = "libdbi sqlite3" + +SRC_URI = "${SOURCEFORGE_MIRROR}/libdbi-drivers/libdbi-drivers-${PV}.tar.gz" + +inherit autotools + +PACKAGES += "libdbd-sqlite3" + +EXTRA_OECONF = "--with-dbi-incdir=${STAGING_INCDIR} \ + --with-dbi-libdir=${STAGING_LIBDIR} \ + --with-sqlite3 \ + --with-sqlite3-incdir=${STAGING_INCDIR} \ + --with-sqlite3-libdir=${STAGING_LIBDIR} \ + --disable-docs" + +FILES_${PN}-dbg += " ${libdir}/dbd/.debug/*.so" +FILES_${PN}-dev += " ${libdir}/dbd/*.la ${libdir}/dbd/*.a" + +DESCRIPTION_libdbd-sqlite3 = "SQLite3 database driver for libdbi" +FILES_libdbd-sqlite3 = "${libdir}/dbd/libdbdsqlite3.so" + diff --git a/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb b/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb new file mode 100644 index 0000000000..796cefb1ae --- /dev/null +++ b/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb @@ -0,0 +1,4 @@ +require ${PN}.inc +LICENSE = "LGPL" + +PR = "r1" diff --git a/recipes-misc/libdbi/libdbi.inc b/recipes-misc/libdbi/libdbi.inc new file mode 100644 index 0000000000..571e55b6fe --- /dev/null +++ b/recipes-misc/libdbi/libdbi.inc @@ -0,0 +1,21 @@ +# libdbi OE build file +# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved +# Released under the MIT license (see packages/COPYING) + +DESCRIPTION = "Database Independent Abstraction Layer for C" +HOMEPAGE = "http://libdbi.sourceforge.net/" +LICENSE = "LGPL" +LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" +SECTION = "libs" + +INC_PR = "r1" + +SRC_URI = "${SOURCEFORGE_MIRROR}/libdbi/libdbi-${PV}.tar.gz" + +inherit autotools + +EXTRA_OECONF = "--disable-docs" + +do_configure () { + autotools_do_configure +} diff --git a/recipes-misc/libdbi/libdbi_0.7.2.bb b/recipes-misc/libdbi/libdbi_0.7.2.bb new file mode 100644 index 0000000000..d5803c0ec4 --- /dev/null +++ b/recipes-misc/libdbi/libdbi_0.7.2.bb @@ -0,0 +1,3 @@ +require ${PN}.inc + +PR = "${INC_PR}.0" diff --git a/recipes-misc/libdbi/libdbi_0.8.3.bb b/recipes-misc/libdbi/libdbi_0.8.3.bb new file mode 100644 index 0000000000..d5803c0ec4 --- /dev/null +++ b/recipes-misc/libdbi/libdbi_0.8.3.bb @@ -0,0 +1,3 @@ +require ${PN}.inc + +PR = "${INC_PR}.0" diff --git a/recipes-misc/ortp/files/0001-fix-unused-variables.patch b/recipes-misc/ortp/files/0001-fix-unused-variables.patch new file mode 100644 index 0000000000..a57eaff7ca --- /dev/null +++ b/recipes-misc/ortp/files/0001-fix-unused-variables.patch @@ -0,0 +1,75 @@ +From eb4f54377e2560a76a05f62a22c961edbce8f4c2 Mon Sep 17 00:00:00 2001 +From: Simon Morlat +Date: Tue, 31 May 2011 10:52:49 +0200 +Subject: [PATCH] fix unused variables + +--- + src/stun.c | 10 +++++----- + src/tests/rtprecv.c | 6 +++++- + 2 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/src/stun.c b/src/stun.c +index ccac58f..e0d7c80 100644 +--- a/src/stun.c ++++ b/src/stun.c +@@ -1993,7 +1993,6 @@ stunSendTest( Socket myFd, StunAddress4 *dest, + + bool_t changePort=FALSE; + bool_t changeIP=FALSE; +- bool_t discard=FALSE; + + StunMessage req; + char buf[STUN_MAX_MESSAGE_SIZE]; +@@ -2015,9 +2014,10 @@ stunSendTest( Socket myFd, StunAddress4 *dest, + case 4: + changeIP=TRUE; + break; +- case 5: ++ /* case 5: + discard=TRUE; + break; ++ */ + default: + ortp_error("stun: Test %i is unkown\n", testNum); + return ; /* error */ +@@ -2162,7 +2162,7 @@ stunNatType( StunAddress4 *dest, + + bool_t respTestI=FALSE; + bool_t isNat=TRUE; +- StunAddress4 testIchangedAddr; ++ /*StunAddress4 testIchangedAddr;*/ + StunAddress4 testImappedAddr; + bool_t respTestI2=FALSE; + bool_t mappedIpSame = TRUE; +@@ -2345,8 +2345,8 @@ stunNatType( StunAddress4 *dest, + if ( !respTestI ) + { + +- testIchangedAddr.addr = resp.changedAddress.ipv4.addr; +- testIchangedAddr.port = resp.changedAddress.ipv4.port; ++ /*testIchangedAddr.addr = resp.changedAddress.ipv4.addr; ++ testIchangedAddr.port = resp.changedAddress.ipv4.port;*/ + testImappedAddr.addr = resp.mappedAddress.ipv4.addr; + testImappedAddr.port = resp.mappedAddress.ipv4.port; + +diff --git a/src/tests/rtprecv.c b/src/tests/rtprecv.c +index 1861592..5eee649 100644 +--- a/src/tests/rtprecv.c ++++ b/src/tests/rtprecv.c +@@ -163,8 +163,12 @@ int main(int argc, char*argv[]) + /* this is to avoid to write to disk some silence before the first RTP packet is returned*/ + if ((stream_received) && (err>0)) { + size_t ret = fwrite(buffer,1,err,outfile); +- if (sound_fd>0) ++ if (sound_fd>0){ + ret = write(sound_fd,buffer,err); ++ if (ret==-1){ ++ fprintf(stderr,"write to sound card failed (%s)",strerror(errno)); ++ } ++ } + } + } + ts+=160; +-- +1.7.5.4 + diff --git a/recipes-misc/ortp/ortp.inc b/recipes-misc/ortp/ortp.inc new file mode 100644 index 0000000000..ef8bbc06ca --- /dev/null +++ b/recipes-misc/ortp/ortp.inc @@ -0,0 +1,20 @@ +DESCRIPTION = "An LGPL implementation of RTP - RFC3550" +LICENSE = "LGPL" + +INC_PR = "r1" + +inherit autotools pkgconfig + +//SRC_URI = "http://download.savannah.nongnu.org/releases/linphone/${PN}/sources/${P}.tar.gz" +SRC_URI = "http://mirror.its.uidaho.edu/pub/savannah/linphone/${PN}/sources/${P}.tar.gz" + +LICENSE = "LGPL" +LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" + +do_compile_append() { + sed -i -e s:${STAGING_DIR_TARGET}::g \ + -e s:/${TARGET_SYS}::g \ + ortp.pc + +} + diff --git a/recipes-misc/ortp/ortp_0.16.5.bb b/recipes-misc/ortp/ortp_0.16.5.bb new file mode 100644 index 0000000000..55e945815f --- /dev/null +++ b/recipes-misc/ortp/ortp_0.16.5.bb @@ -0,0 +1,8 @@ +require ortp.inc +DEPENDS = "glib-2.0 " +PR = "${INC_PR}.0" + +SRC_URI += "file://0001-fix-unused-variables.patch;patch=1" + +SRC_URI[md5sum] = "94546901d14b85f97342f4ecf39489b1" +SRC_URI[sha256sum] = "3b655a79f9122afd298e9cd702e542908bbd6ea1337c02553110c57e0b3c5835" diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis.inc b/recipes-osmocom/libosmo-abis/libosmo-abis.inc new file mode 100644 index 0000000000..0632247056 --- /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 0000000000..362fc85281 --- /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 0000000000..d2a25b254b --- /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 0000000000..74a8481da6 --- /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 0000000000..6c9d8e21c8 --- /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 0000000000..342c105342 --- /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 0000000000..328a1709e1 --- /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 0000000000..16b4882357 --- /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 0000000000..8c4dce261a --- /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 0000000000..bb16132bed --- /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 0000000000..55b8a1a4a0 --- /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 0000000000..0f145474ea --- /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 0000000000..18eb80a52a --- /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 0000000000..22aaba5fb1 --- /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 0000000000..f4d414cd06 --- /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 0000000000..a8cd442a5c --- /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 0000000000..44b093504e --- /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 0000000000..dd0479a77c --- /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 0000000000..cf9c4516c4 --- /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 0000000000..86c7f757c9 --- /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 0000000000..40fd1dcd50 --- /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 0000000000..e69de29bb2 diff --git a/recipes-osmocom/openggsn/files/openggsn.init b/recipes-osmocom/openggsn/files/openggsn.init new file mode 100755 index 0000000000..695a6cc930 --- /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 + +# 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 0000000000..8cce5f18e9 --- /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 0000000000..e9f99956e9 --- /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 0000000000..de2efa0948 --- /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 0000000000..45c37c754f --- /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" From ba3023edbcfb5e2714f460372e8719d19b95ad87 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 11 Nov 2011 21:29:47 +0800 Subject: [PATCH 02/39] ggsn: Remove the empty config file this should come from the machine integration The integrator should install a config as he can decide on the IP addresses and policy to be used. --- recipes-osmocom/openggsn/files/ggsn.conf | 0 recipes-osmocom/openggsn/openggsn_git.bb | 6 +----- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 recipes-osmocom/openggsn/files/ggsn.conf diff --git a/recipes-osmocom/openggsn/files/ggsn.conf b/recipes-osmocom/openggsn/files/ggsn.conf deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/recipes-osmocom/openggsn/openggsn_git.bb b/recipes-osmocom/openggsn/openggsn_git.bb index 8cce5f18e9..4ab6077459 100644 --- a/recipes-osmocom/openggsn/openggsn_git.bb +++ b/recipes-osmocom/openggsn/openggsn_git.bb @@ -2,12 +2,11 @@ DESCRITOPN = "OpenGGSN a Free Software GGSN" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" PV = "0.91+gitr${SRCPV}" -PR = "r9" +PR = "r10" SRCREV = "fe5040967513616731d8151b22d26bdf74d65111" SRC_URI = "git://ggsn.git.sourceforge.net/gitroot/ggsn/ggsn \ file://openggsn.init \ - file://ggsn.conf \ " S = "${WORKDIR}/git" @@ -19,9 +18,6 @@ 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" From f52b4a6ba8a573f2d8bf74884e9f559ab08f06c9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 11 Nov 2011 21:31:43 +0800 Subject: [PATCH 03/39] asterisk: Introduce asterisk recipe for 1.8.7.0 --- recipes-isdn/asterisk/asterisk_1.8.7.0.bb | 86 +++++++++++++++++++++++ recipes-isdn/asterisk/files/asterisk.init | 21 ++++++ recipes-isdn/asterisk/files/modules.conf | 2 + 3 files changed, 109 insertions(+) create mode 100644 recipes-isdn/asterisk/asterisk_1.8.7.0.bb create mode 100755 recipes-isdn/asterisk/files/asterisk.init create mode 100644 recipes-isdn/asterisk/files/modules.conf diff --git a/recipes-isdn/asterisk/asterisk_1.8.7.0.bb b/recipes-isdn/asterisk/asterisk_1.8.7.0.bb new file mode 100644 index 0000000000..e0a4d71401 --- /dev/null +++ b/recipes-isdn/asterisk/asterisk_1.8.7.0.bb @@ -0,0 +1,86 @@ +# Copyright (C) 2007-2008, Stelios Koroneos - Digital OPSiS, All Rights Reserved +# Copyright (C) 2011, sysmocom - systems for mobile communications GmbH +# Released under the MIT license (see packages/COPYING) +DESCRITOPN = "asterisk PBX" +DEPENDS = "openssl ncurses" +HOMEPAGE = "http://www.asterisk.org" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=3c6764ffcbe996d1d8f919b393ccdd67" + +PR = "r2" + +SRC_URI = "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz \ + file://modules.conf \ + file://asterisk.init" + +EXTRA_OECONF = " \ + --without-curses \ + --with-sm=internal \ + --without-gtk \ + --without-gtk2 \ + --without-isdnnet \ + --without-kde \ + --without-misdn \ + --without-nbs \ + --with-ncurses \ + --without-netsnmp \ + --without-newt \ + --without-odbc \ + --without-ogg \ + --without-osptk \ + --without-popt \ + --without-pri \ + --without-qt \ + --without-radius \ + --without-sdl \ + --without-spandsp \ + --without-suppserv \ + --without-tds \ + --without-termcap \ + --without-tinfo \ + --without-vorbis \ + --without-vpb \ + --without-postgres \ + --without-openais \ + --without-lua \ + --disable-xmldoc" + +inherit autotools update-rc.d + +FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" + +do_configure_prepend() { + # Due to menuselect below we want to save off these configures + mv ${S}/menuselect/configure ${S}/menuselect/configure.SAVE + mv ${S}/menuselect/mxml/configure ${S}/menuselect/mxml/configure.SAVE + mv ${S}/main/editline/configure ${S}/main/editline/configure.SAVE +} + +do_configure_append() { + # Put this back + mv ${S}/menuselect/configure.SAVE ${S}/menuselect/configure + mv ${S}/menuselect/mxml/configure.SAVE ${S}/menuselect/mxml/configure + mv ${S}/main/editline/configure.SAVE ${S}/main/editline/configure +} + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "asterisk" +INITSCRIPT_PARAMS_${PN} = "defaults 29 29" + +CONFFILES_${PN} = "${sysconfdir}/asterisk/extensions.conf \ + ${sysconfdir}/asterisk/modules.conf \ + ${sysconfdir}/asterisk/sip.conf" + +PACKAGES =+ "${PN}-moh" + +DESCRIPTION_${PN}-moh = "Asterisk MusicOnHold sound" +FILES_${PN}-moh = "${localstatedir}/lib/${PN}/moh" + + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/asterisk + + install -m 0775 ${WORKDIR}/asterisk.init ${D}${sysconfdir}/init.d/asterisk + install -m 0660 ${WORKDIR}/modules.conf ${D}${sysconfdir}/asterisk/ +} diff --git a/recipes-isdn/asterisk/files/asterisk.init b/recipes-isdn/asterisk/files/asterisk.init new file mode 100755 index 0000000000..8ef76aa2f6 --- /dev/null +++ b/recipes-isdn/asterisk/files/asterisk.init @@ -0,0 +1,21 @@ +#!/bin/sh + +NAME=asterisk + +set -e + +case "$1" in + start) + /usr/sbin/asterisk + echo "Forked asterisk" + ;; + stop) + echo "Can not stop it" + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 +esac + +exit 0 diff --git a/recipes-isdn/asterisk/files/modules.conf b/recipes-isdn/asterisk/files/modules.conf new file mode 100644 index 0000000000..68db67fbd9 --- /dev/null +++ b/recipes-isdn/asterisk/files/modules.conf @@ -0,0 +1,2 @@ +[modules] +autoload=yes From b49f5121bbcb0f10331e3ca82acfb95c597b4328 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 11 Nov 2011 21:36:15 +0800 Subject: [PATCH 04/39] libgsm: Introduce libgsm-1.0.13 recipe for LCR/mISDN --- .../libgsm/libgsm-1.0.13/01_makefile.patch | 71 ++++++++ .../libgsm/libgsm-1.0.13/02_cplusplus.patch | 25 +++ .../libgsm/libgsm-1.0.13/03_config.patch | 154 ++++++++++++++++++ .../libgsm/libgsm-1.0.13/04_includes.patch | 43 +++++ .../libgsm-1.0.13/05_compiler_warnings.patch | 98 +++++++++++ recipes-isdn/libgsm/libgsm.inc | 34 ++++ recipes-isdn/libgsm/libgsm_1.0.13.bb | 8 + 7 files changed, 433 insertions(+) create mode 100644 recipes-isdn/libgsm/libgsm-1.0.13/01_makefile.patch create mode 100644 recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch create mode 100644 recipes-isdn/libgsm/libgsm-1.0.13/03_config.patch create mode 100644 recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch create mode 100644 recipes-isdn/libgsm/libgsm-1.0.13/05_compiler_warnings.patch create mode 100644 recipes-isdn/libgsm/libgsm.inc create mode 100644 recipes-isdn/libgsm/libgsm_1.0.13.bb diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/01_makefile.patch b/recipes-isdn/libgsm/libgsm-1.0.13/01_makefile.patch new file mode 100644 index 0000000000..947db37bfc --- /dev/null +++ b/recipes-isdn/libgsm/libgsm-1.0.13/01_makefile.patch @@ -0,0 +1,71 @@ +diff -urNad libgsm-1.0.12~/Makefile libgsm-1.0.12/Makefile +--- libgsm-1.0.12~/Makefile 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.12/Makefile 2007-11-01 15:43:06.000000000 +0100 +@@ -96,7 +96,7 @@ + # Other tools + + SHELL = /bin/sh +-LN = ln ++LN = ln -s + BASENAME = basename + AR = ar + ARFLAGS = cr +@@ -140,6 +140,7 @@ + # Targets + + LIBGSM = $(LIB)/libgsm.a ++LIBGSMSO= $(LIB)/libgsm.so + + TOAST = $(BIN)/toast + UNTOAST = $(BIN)/untoast +@@ -279,7 +280,7 @@ + + # Target rules + +-all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST) ++all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST) + @-echo $(ROOT): Done. + + tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result +@@ -299,6 +300,11 @@ + + # The basic API: libgsm + ++$(LIBGSMSO): $(LIB) $(GSM_OBJECTS) ++ $(LD) -o $@.1.0.12 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc $(LDFLAGS) ++ ln -fs libgsm.so.1.0.12 lib/libgsm.so.1 ++ ln -fs libgsm.so.1.0.12 lib/libgsm.so ++ + $(LIBGSM): $(LIB) $(GSM_OBJECTS) + -rm $(RMFLAGS) $(LIBGSM) + $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS) +@@ -308,15 +314,15 @@ + # Toast, Untoast and Tcat -- the compress-like frontends to gsm. + + $(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM) +- $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB) ++ $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB) + + $(UNTOAST): $(BIN) $(TOAST) + -rm $(RMFLAGS) $(UNTOAST) +- $(LN) $(TOAST) $(UNTOAST) ++ $(LN) toast $(UNTOAST) + + $(TCAT): $(BIN) $(TOAST) + -rm $(RMFLAGS) $(TCAT) +- $(LN) $(TOAST) $(TCAT) ++ $(LN) toast $(TCAT) + + + # The local bin and lib directories +@@ -426,7 +432,9 @@ + + clean: semi-clean + -rm $(RMFLAGS) $(LIBGSM) $(ADDTST)/add \ +- $(TOAST) $(TCAT) $(UNTOAST) \ ++ $(LIBGSMSO) $(LIB)/libgsm.so.1.0.12 \ ++ $(LIB)libgsm.so.1 \ ++ $(TOAST) $(TCAT) $(UNTOAST) \ + $(ROOT)/gsm-1.0.tar.Z + + diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch b/recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch new file mode 100644 index 0000000000..a4bbb40674 --- /dev/null +++ b/recipes-isdn/libgsm/libgsm-1.0.13/02_cplusplus.patch @@ -0,0 +1,25 @@ +diff -urNad libgsm-1.0.10~/inc/gsm.h libgsm-1.0.10/inc/gsm.h +--- libgsm-1.0.10~/inc/gsm.h 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/inc/gsm.h 2007-11-01 15:44:52.000000000 +0100 +@@ -54,6 +54,10 @@ + #define GSM_OPT_FRAME_INDEX 5 + #define GSM_OPT_FRAME_CHAIN 6 + ++#ifdef __cplusplus ++extern "C" { ++#endif ++ + extern gsm gsm_create GSM_P((void)); + extern void gsm_destroy GSM_P((gsm)); + +@@ -66,6 +70,10 @@ + extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *)); + extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *)); + ++#ifdef __cplusplus ++} ++#endif ++ + #undef GSM_P + + #endif /* GSM_H */ diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/03_config.patch b/recipes-isdn/libgsm/libgsm-1.0.13/03_config.patch new file mode 100644 index 0000000000..dad241e2bd --- /dev/null +++ b/recipes-isdn/libgsm/libgsm-1.0.13/03_config.patch @@ -0,0 +1,154 @@ +diff -urNad libgsm-1.0.10~/Makefile libgsm-1.0.10/Makefile +--- libgsm-1.0.10~/Makefile 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/Makefile 2007-11-01 15:48:02.000000000 +0100 +@@ -151,7 +151,7 @@ + + HEADERS = $(INC)/proto.h \ + $(INC)/unproto.h \ +- $(INC)/config.h \ ++ $(INC)/gsm_config.h \ + $(INC)/private.h \ + $(INC)/gsm.h \ + $(INC)/toast.h \ +diff -urNad libgsm-1.0.10~/inc/config.h libgsm-1.0.10/inc/config.h +--- libgsm-1.0.10~/inc/config.h 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/inc/config.h 1970-01-01 01:00:00.000000000 +0100 +@@ -1,37 +0,0 @@ +-/* +- * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische +- * Universitaet Berlin. See the accompanying file "COPYRIGHT" for +- * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. +- */ +- +-/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/config.h,v 1.5 1996/07/02 11:26:20 jutta Exp $*/ +- +-#ifndef CONFIG_H +-#define CONFIG_H +- +-/*efine SIGHANDLER_T int /* signal handlers are void */ +-/*efine HAS_SYSV_SIGNAL 1 /* sigs not blocked/reset? */ +- +-#define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */ +-#define HAS_LIMITS_H 1 /* /usr/include/limits.h */ +-#define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */ +-#define HAS_ERRNO_DECL 1 /* errno.h declares errno */ +- +-#define HAS_FSTAT 1 /* fstat syscall */ +-#define HAS_FCHMOD 1 /* fchmod syscall */ +-#define HAS_CHMOD 1 /* chmod syscall */ +-#define HAS_FCHOWN 1 /* fchown syscall */ +-#define HAS_CHOWN 1 /* chown syscall */ +-/*efine HAS__FSETMODE 1 /* _fsetmode -- set file mode */ +- +-#define HAS_STRING_H 1 /* /usr/include/string.h */ +-/*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */ +- +-#define HAS_UNISTD_H 1 /* /usr/include/unistd.h */ +-#define HAS_UTIME 1 /* POSIX utime(path, times) */ +-/*efine HAS_UTIMES 1 /* use utimes() syscall instead */ +-#define HAS_UTIME_H 1 /* UTIME header file */ +-#define HAS_UTIMBUF 1 /* struct utimbuf */ +-/*efine HAS_UTIMEUSEC 1 /* microseconds in utimbuf? */ +- +-#endif /* CONFIG_H */ +diff -urNad libgsm-1.0.10~/inc/gsm_config.h libgsm-1.0.10/inc/gsm_config.h +--- libgsm-1.0.10~/inc/gsm_config.h 1970-01-01 01:00:00.000000000 +0100 ++++ libgsm-1.0.10/inc/gsm_config.h 2007-11-01 15:46:19.000000000 +0100 +@@ -0,0 +1,37 @@ ++/* ++ * Copyright 1992 by Jutta Degener and Carsten Bormann, Technische ++ * Universitaet Berlin. See the accompanying file "COPYRIGHT" for ++ * details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. ++ */ ++ ++/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/config.h,v 1.5 1996/07/02 11:26:20 jutta Exp $*/ ++ ++#ifndef CONFIG_H ++#define CONFIG_H ++ ++/*efine SIGHANDLER_T int -* signal handlers are void */ ++/*efine HAS_SYSV_SIGNAL 1 -* sigs not blocked/reset? */ ++ ++#define HAS_STDLIB_H 1 /* /usr/include/stdlib.h */ ++#define HAS_STDIO_H 1 /* /usr/include/stdio.h */ ++/*efine HAS_LIMITS_H 1 -* /usr/include/limits.h */ ++#define HAS_FCNTL_H 1 /* /usr/include/fcntl.h */ ++ ++#define HAS_FSTAT 1 /* fstat syscall */ ++#define HAS_FCHMOD 1 /* fchmod syscall */ ++#define HAS_CHMOD 1 /* chmod syscall */ ++#define HAS_FCHOWN 1 /* fchown syscall */ ++#define HAS_CHOWN 1 /* chown syscall */ ++/*efine HAS__FSETMODE 1 -* _fsetmode -- set file mode */ ++ ++#define HAS_STRING_H 1 /* /usr/include/string.h */ ++/*efine HAS_STRINGS_H 1 -* /usr/include/strings.h */ ++ ++#define HAS_UNISTD_H 1 /* /usr/include/unistd.h */ ++#define HAS_UTIME 1 /* POSIX utime(path, times) */ ++/*efine HAS_UTIMES 1 -* use utimes() syscall instead */ ++#define HAS_UTIME_H 1 /* UTIME header file */ ++/*efine HAS_UTIMBUF 1 -* struct utimbuf */ ++/*efine HAS_UTIMEUSEC 1 -* microseconds in utimbuf? */ ++ ++#endif /* CONFIG_H */ +diff -urNad libgsm-1.0.10~/inc/toast.h libgsm-1.0.10/inc/toast.h +--- libgsm-1.0.10~/inc/toast.h 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/inc/toast.h 2007-11-01 15:48:17.000000000 +0100 +@@ -9,7 +9,7 @@ + #ifndef TOAST_H + #define TOAST_H /* Guard against multiple includes */ + +-#include "config.h" ++#include "gsm_config.h" + + #include + #include +diff -urNad libgsm-1.0.10~/src/code.c libgsm-1.0.10/src/code.c +--- libgsm-1.0.10~/src/code.c 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/src/code.c 2007-11-01 15:48:34.000000000 +0100 +@@ -6,7 +6,7 @@ + + /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/code.c,v 1.3 1996/07/02 09:59:05 jutta Exp $ */ + +-#include "config.h" ++#include "gsm_config.h" + + + #ifdef HAS_STDLIB_H +diff -urNad libgsm-1.0.10~/src/gsm_create.c libgsm-1.0.10/src/gsm_create.c +--- libgsm-1.0.10~/src/gsm_create.c 1996-07-02 16:32:44.000000000 +0200 ++++ libgsm-1.0.10/src/gsm_create.c 2007-11-01 15:48:48.000000000 +0100 +@@ -6,7 +6,7 @@ + + static char const ident[] = "$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_create.c,v 1.4 1996/07/02 09:59:05 jutta Exp $"; + +-#include "config.h" ++#include "gsm_config.h" + + #ifdef HAS_STRING_H + #include +diff -urNad libgsm-1.0.10~/src/gsm_destroy.c libgsm-1.0.10/src/gsm_destroy.c +--- libgsm-1.0.10~/src/gsm_destroy.c 1996-07-02 16:32:39.000000000 +0200 ++++ libgsm-1.0.10/src/gsm_destroy.c 2007-11-01 15:48:57.000000000 +0100 +@@ -7,7 +7,7 @@ + /* $Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm_destroy.c,v 1.3 1994/11/28 19:52:25 jutta Exp $ */ + + #include "gsm.h" +-#include "config.h" ++#include "gsm_config.h" + #include "proto.h" + + #ifdef HAS_STDLIB_H +diff -urNad libgsm-1.0.10~/tls/taste.c libgsm-1.0.10/tls/taste.c +--- libgsm-1.0.10~/tls/taste.c 1996-07-02 16:33:05.000000000 +0200 ++++ libgsm-1.0.10/tls/taste.c 2007-11-01 15:49:54.000000000 +0100 +@@ -10,7 +10,7 @@ + #include + #include + +-#include "config.h" ++#include "gsm_config.h" + + #ifdef HAS_STDLIB_H + # include diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch b/recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch new file mode 100644 index 0000000000..2769b40b05 --- /dev/null +++ b/recipes-isdn/libgsm/libgsm-1.0.13/04_includes.patch @@ -0,0 +1,43 @@ +diff -urNad libgsm-1.0.10~/inc/toast.h libgsm-1.0.10/inc/toast.h +--- libgsm-1.0.10~/inc/toast.h 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/inc/toast.h 2007-11-01 15:52:33.000000000 +0100 +@@ -16,11 +16,12 @@ + + #include + #include ++#include + #include + + #include +-#ifndef HAS_ERRNO_DECL +- extern int errno; ++#ifndef errno ++ extern int errno; + #endif + + #ifdef HAS_LIMITS_H +@@ -37,6 +38,10 @@ + # endif + #endif + ++#ifdef HAS_STDIO_H ++# include ++#endif ++ + #include "gsm.h" + + #ifndef S_ISREG +diff -urNad libgsm-1.0.10~/src/code.c libgsm-1.0.10/src/code.c +--- libgsm-1.0.10~/src/code.c 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/src/code.c 2007-11-01 15:52:33.000000000 +0100 +@@ -9,8 +9,8 @@ + #include "config.h" + + +-#ifdef HAS_STDLIB_H +-#include ++#ifdef HAS_STRING_H ++#include + #else + # include "proto.h" + extern char * memcpy P((char *, char *, int)); diff --git a/recipes-isdn/libgsm/libgsm-1.0.13/05_compiler_warnings.patch b/recipes-isdn/libgsm/libgsm-1.0.13/05_compiler_warnings.patch new file mode 100644 index 0000000000..c40100c922 --- /dev/null +++ b/recipes-isdn/libgsm/libgsm-1.0.13/05_compiler_warnings.patch @@ -0,0 +1,98 @@ +diff -urNad libgsm-1.0.10~/src/debug.c libgsm-1.0.10/src/debug.c +--- libgsm-1.0.10~/src/debug.c 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/src/debug.c 2007-11-01 15:53:42.000000000 +0100 +@@ -49,7 +49,7 @@ + fprintf( stderr, "%s [%d .. %d]: ", name, from, to ); + while (from <= to) { + +- fprintf(stderr, "%d ", ptr[ from ] ); ++ fprintf(stderr, "%ld ", ptr[ from ] ); + from++; + if (nprinted++ >= 7) { + nprinted = 0; +@@ -63,14 +63,14 @@ + char * name, + longword value ) + { +- fprintf(stderr, "%s: %d\n", name, (long)value ); ++ fprintf(stderr, "%s: %ld\n", name, (long)value ); + } + + void gsm_debug_word P2( (name, value), + char * name, + word value ) + { +- fprintf(stderr, "%s: %d\n", name, (long)value); ++ fprintf(stderr, "%s: %ld\n", name, (long)value); + } + + #endif +diff -urNad libgsm-1.0.10~/src/toast.c libgsm-1.0.10/src/toast.c +--- libgsm-1.0.10~/src/toast.c 2007-11-01 15:37:52.000000000 +0100 ++++ libgsm-1.0.10/src/toast.c 2007-11-01 15:53:42.000000000 +0100 +@@ -251,8 +251,8 @@ + { + char * s; + if (!(s = malloc(len))) { +- fprintf(stderr, "%s: failed to malloc %d bytes -- abort\n", +- progname, len); ++ fprintf(stderr, "%s: failed to malloc %ld bytes -- abort\n", ++ progname, (long) len); + onintr(); + exit(1); + } +@@ -270,7 +270,7 @@ + maxlen = strlen(name) + 1 + strlen(want) + strlen(cut); + p = strcpy(emalloc(maxlen), name); + +- if (s = suffix(p, cut)) strcpy(s, want); ++ if ((s = suffix(p, cut))) strcpy(s, want); + else if (*want && !suffix(p, want)) strcat(p, want); + + return p; +@@ -386,7 +386,7 @@ + ut[0] = instat.st_atime; + ut[1] = instat.st_mtime; + +- (void) utime(outname, ut); ++ (void) utime(outname, (struct utimbuf *)ut); + + #endif /* UTIMBUF */ + } +@@ -416,7 +416,7 @@ + } + if (st->st_nlink > 1 && !f_cat && !f_precious) { + fprintf(stderr, +- "%s: \"%s\" has %s other link%s -- unchanged.\n", ++ "%s: \"%s\" has %d other link%s -- unchanged.\n", + progname,name,st->st_nlink - 1,"s" + (st->st_nlink<=2)); + return 0; + } +@@ -585,8 +585,8 @@ + + if (cc != sizeof(s)) { + if (cc >= 0) fprintf(stderr, +- "%s: incomplete frame (%d byte%s missing) from %s\n", +- progname, sizeof(s) - cc, ++ "%s: incomplete frame (%ld byte%s missing) from %s\n", ++ progname, (long) sizeof(s) - cc, + "s" + (sizeof(s) - cc == 1), + inname ? inname : "stdin" ); + gsm_destroy(r); +@@ -624,8 +624,6 @@ + + static int process P1((name), char * name) + { +- int step = 0; +- + out = (FILE *)0; + in = (FILE *)0; + +@@ -779,7 +777,6 @@ + case 'h': help(); exit(0); + + default: +- usage: + fprintf(stderr, + "Usage: %s [-fcpdhvuaslFC] [files...] (-h for help)\n", + progname); diff --git a/recipes-isdn/libgsm/libgsm.inc b/recipes-isdn/libgsm/libgsm.inc new file mode 100644 index 0000000000..aa0386c31c --- /dev/null +++ b/recipes-isdn/libgsm/libgsm.inc @@ -0,0 +1,34 @@ +DESCRIPTION = "GSM Audio Library" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "libgsm" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=fc1372895b173aaf543a122db37e04f5" + +INC_PR = "r2" + +SRC_URI = "http://www.quut.com/gsm/gsm-${PV}.tar.gz \ + file://01_makefile.patch \ + file://02_cplusplus.patch \ + file://03_config.patch \ + file://04_includes.patch \ + file://05_compiler_warnings.patch \ + " + +CFLAGS += "-c -g -fPIC -Wall -D_GNU_SOURCE -D_REENTRANT -DNeedFunctionPrototypes=1 -DWAV49 -I./inc" + +PARALLEL_MAKE = "" + +do_compile() { + unset LD + oe_runmake CCFLAGS="${CFLAGS}" +} + +do_install() { + oe_libinstall -a -C lib libgsm ${D}${libdir} + oe_libinstall -so -C lib libgsm ${D}${libdir} + install -d ${D}${includedir}/gsm + install -m 0644 ${S}/inc/gsm.h ${D}${includedir}/gsm/ + cd ${D}${includedir} + ln -s gsm/gsm.h gsm.h +} + diff --git a/recipes-isdn/libgsm/libgsm_1.0.13.bb b/recipes-isdn/libgsm/libgsm_1.0.13.bb new file mode 100644 index 0000000000..b26f587578 --- /dev/null +++ b/recipes-isdn/libgsm/libgsm_1.0.13.bb @@ -0,0 +1,8 @@ +require libgsm.inc + +PR = ${INC_PR}.0 + +S = "${WORKDIR}/gsm-1.0-pl13/" + +SRC_URI[md5sum] = "c1ba392ce61dc4aff1c29ea4e92f6df4" +SRC_URI[sha256sum] = "52c518244d428c2e56c543b98c9135f4a76ff780c32455580b793f60a0a092ad" From 6fe3d672990da107909a20c9870c702b32dc20ce Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 11 Nov 2011 21:37:15 +0800 Subject: [PATCH 05/39] misdn: Build the userspace library Apply a local patch to increase the the buffer size, on different platforms the kernel structs have holes that this calculation did not account for. --- recipes-isdn/misdn/files/misdn-ph-size.diff | 13 +++++++++++++ recipes-isdn/misdn/misdn-utils_git.bb | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 recipes-isdn/misdn/files/misdn-ph-size.diff create mode 100644 recipes-isdn/misdn/misdn-utils_git.bb diff --git a/recipes-isdn/misdn/files/misdn-ph-size.diff b/recipes-isdn/misdn/files/misdn-ph-size.diff new file mode 100644 index 0000000000..98bf866d26 --- /dev/null +++ b/recipes-isdn/misdn/files/misdn-ph-size.diff @@ -0,0 +1,13 @@ +diff --git a/include/mISDN/mbuffer.h b/include/mISDN/mbuffer.h +index 5e3dc96..8e6ed52 100644 +--- a/include/mISDN/mbuffer.h ++++ b/include/mISDN/mbuffer.h +@@ -54,7 +54,7 @@ struct mbuffer { + struct l3_msg l3; + } __attribute__((__may_alias__)); + +-#define MBUFFER_DATA_SIZE 280 ++#define MBUFFER_DATA_SIZE 400 + + /* + * init mbuffer caching diff --git a/recipes-isdn/misdn/misdn-utils_git.bb b/recipes-isdn/misdn/misdn-utils_git.bb new file mode 100644 index 0000000000..7e37837fd5 --- /dev/null +++ b/recipes-isdn/misdn/misdn-utils_git.bb @@ -0,0 +1,18 @@ +DESCRITOPN = "mISDNutils userspace library" +HOMEPAGE = "http://misdn.org" +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605" +PR = "r3" + +SRC_URI = "git://git.misdn.org/mISDNuser.git \ + file://misdn-ph-size.diff" +SRCREV = "609658c19630c01f82cbfb5687fc70a356fc6db5" +S = "${WORKDIR}/git" + +PACKAGES =+ "misdn-tools-dbg misdn-tools" + +inherit autotools + +FILES_misdn-tools = "${bindir} ${sbindir}" +FILES_misdn-tools-dbg = "${bindir}/.debug ${sbindir}/.debug" +RDEPENDS_misdn-tools-dbg = "${PN}-dbg" From 0b0ef8aae6dc7b065728211771862095ae3cc562 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 11 Nov 2011 21:41:31 +0800 Subject: [PATCH 06/39] lcr: Introduce 1.10 of LCR with a custom start script for it. --- recipes-isdn/lcr/files/gsm-diff.patch | 44 +++++++++++++++++++++++++++ recipes-isdn/lcr/files/lcr.init | 21 +++++++++++++ recipes-isdn/lcr/lcr_git.bb | 41 +++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 recipes-isdn/lcr/files/gsm-diff.patch create mode 100644 recipes-isdn/lcr/files/lcr.init create mode 100644 recipes-isdn/lcr/lcr_git.bb diff --git a/recipes-isdn/lcr/files/gsm-diff.patch b/recipes-isdn/lcr/files/gsm-diff.patch new file mode 100644 index 0000000000..0a84cacdf1 --- /dev/null +++ b/recipes-isdn/lcr/files/gsm-diff.patch @@ -0,0 +1,44 @@ +Index: git/Makefile.am +=================================================================== +--- git.orig/Makefile.am 2011-10-14 00:53:48.245117239 +0800 ++++ git/Makefile.am 2011-10-14 00:53:48.633117240 +0800 +@@ -53,7 +53,7 @@ + + GSM_SOURCE += gsm_audio.c gsm.cpp + +-GSM_LIB += /usr/lib/libgsm.a ++GSM_LIB += -lgsm + + #gsm_audio.po: gsm_audio.c gsm_audio.h + # $(CC) -D_GNU_SOURCE -fPIC -c gsm_audio.c -o gsm_audio.po +Index: git/configure.ac +=================================================================== +--- git.orig/configure.ac 2011-10-14 00:53:48.257117239 +0800 ++++ git/configure.ac 2011-10-14 00:53:48.633117240 +0800 +@@ -178,12 +178,7 @@ + AM_CONDITIONAL(ENABLE_GSM, test "x$with_gsm_bs" == "xyes" -o "x$with_gsm_ms" == "xyes") + + AS_IF([test "x$with_gsm_bs" == xyes -o "x$with_gsm_ms" == xyes], +- [AC_MSG_CHECKING(/usr/include/gsm/gsm.h) +- if test -e /usr/include/gsm/gsm.h; then +- AC_MSG_RESULT(yes) +- else +- AC_MSG_FAILURE([You have enabled GSM, but /usr/include/gsm/gsm.h not found! Please install the lossy GSM codec. Be sure to install it in /usr/ and not in /usr/local/. You will also find a copy on http://www.linux-call-router.de.]) +- fi ++ AC_MSG_RESULT(yes...why not use ac_check_headers...) + ]) + + # check for ss5 +Index: git/gsm_audio.c +=================================================================== +--- git.orig/gsm_audio.c 2011-10-14 00:53:48.000000000 +0800 ++++ git/gsm_audio.c 2011-10-14 00:55:12.929117386 +0800 +@@ -10,7 +10,7 @@ + \*****************************************************************************/ + + extern "C" { +-#include "/usr/include/gsm/gsm.h" ++#include + + + /* create gsm instance */ diff --git a/recipes-isdn/lcr/files/lcr.init b/recipes-isdn/lcr/files/lcr.init new file mode 100644 index 0000000000..f9924c5ebc --- /dev/null +++ b/recipes-isdn/lcr/files/lcr.init @@ -0,0 +1,21 @@ +#!/bin/sh + +NAME=lcr + +set -e + +case "$1" in + start) + /usr/sbin/lcr fork + echo "Forked asterisk" + ;; + stop) + echo "Can not stop it" + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 +esac + +exit 0 diff --git a/recipes-isdn/lcr/lcr_git.bb b/recipes-isdn/lcr/lcr_git.bb new file mode 100644 index 0000000000..de820e6758 --- /dev/null +++ b/recipes-isdn/lcr/lcr_git.bb @@ -0,0 +1,41 @@ +DESCRITOPN = "Linux Call Router" +DEPENDS = "misdn-utils asterisk libgsm" +HOMEPAGE = "http://isdn.eversberg.eu/" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=de9327a12ae1ccc94dade892a360f996" + +PV = "1.10" +PR = "r10" + +SRCREV = "27ade6eeb9859a0702e77b27ca0abed63d298cda" +SRC_URI = "git://git.misdn.org/lcr.git \ + file://lcr.init \ + file://gsm-diff.patch" +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--with-gsm-bs --with-asterisk" + +RDEPENDS_${PN} += "kernel-module-misdn-l1loop kernel-module-misdn-dsp" + +inherit autotools update-rc.d + +PACKAGES =+ "${PN}-tones-de ${PN}-vbox-de \ + ${PN}-tones-en ${PN}-vbox-en " + +FILES_${PN} += "/usr/local ${libdir}/asterisk/modules" +FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" +CONFFILES_${PN} = "/usr/local/lcr/interface.conf /usr/local/lcr/routing.conf /usr/local/lcr/options.conf" +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "lcr" +INITSCRIPT_PARAMS_${PN} = "defaults 30 30" + +FILES_${PN}-tones-de = "/usr/local/lcr/tones_german" +FILES_${PN}-tones-en = "/usr/local/lcr/tones_american" +FILES_${PN}-vbox-de = "/usr/local/lcr/vbox_german" +FILES_${PN}-vbox-en = "/usr/local/lcr/vbox_english" + + +do_install_append() { + install -d ${D}${sysconfdir}/init.d + install -m 0775 ${WORKDIR}/lcr.init ${D}${sysconfdir}/init.d/lcr +} From 1d9cbe012b089851abfcb4dcd207d4b032de5edc Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 11 Nov 2011 22:15:00 +0800 Subject: [PATCH 07/39] libosmocore: Build the latest git version of libosmocore --- recipes-osmocom/libosmocore/libosmocore_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index f4d414cd06..2b6e20bacf 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "c7ddbe63da535e62f9a10444f8966bf0a6565a74" +SRCREV = "3ec5047c6be00729f57da23f6d5de6d5a357ec7a" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git" PV = "0.3.10+gitr${SRCPV}" PR = "1" From 8083eb0be3221e4849dcc3aca4bc71183def32e4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 14 Nov 2011 20:41:20 +0800 Subject: [PATCH 08/39] openggsn: Remove the ggsn.conf in CONFFILES as the file is not here --- recipes-osmocom/openggsn/openggsn_git.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-osmocom/openggsn/openggsn_git.bb b/recipes-osmocom/openggsn/openggsn_git.bb index 4ab6077459..0867a14999 100644 --- a/recipes-osmocom/openggsn/openggsn_git.bb +++ b/recipes-osmocom/openggsn/openggsn_git.bb @@ -22,7 +22,6 @@ do_install_append() { 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" From 447e9fa77d066266574450a90de7e596b1a71887 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 11 Dec 2011 15:19:18 +0100 Subject: [PATCH 09/39] conf: Introduce the conf/layer.conf to make it work as a layer --- conf/layer.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 conf/layer.conf diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000000..8162d1a773 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,11 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH := "${BBPATH}:${LAYERDIR}" + +# We have a packages directory, add to BBFILES +BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "telephony" +BBFILE_PATTERN_telephony := "^${LAYERDIR}/" +BBFILE_PRIORITY_telephony = "5" + From f75ebc3f4b46f7c0bebdd792f66a98b265148274 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 11 Dec 2011 15:20:51 +0100 Subject: [PATCH 10/39] meta-toolchain-osmo: Include without direct addresssing Use the BBPATH to find the recipe instead of assuming where this layer has been placed. --- recipes-osmocom/meta/meta-toolchain-osmo.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-osmocom/meta/meta-toolchain-osmo.bb b/recipes-osmocom/meta/meta-toolchain-osmo.bb index a8cd442a5c..336e95fdaa 100644 --- a/recipes-osmocom/meta/meta-toolchain-osmo.bb +++ b/recipes-osmocom/meta/meta-toolchain-osmo.bb @@ -3,4 +3,4 @@ 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 +require recipes-core/meta/meta-toolchain.bb From 9d9e971a87341c4406378daf2cb66b936bb98edd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 11 Dec 2011 17:36:35 +0100 Subject: [PATCH 11/39] task: Add a task to build everything in this layer Add a task to build test everything that is in this layer. --- recipes-telephony/tasks/task-telephony-all.bb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 recipes-telephony/tasks/task-telephony-all.bb diff --git a/recipes-telephony/tasks/task-telephony-all.bb b/recipes-telephony/tasks/task-telephony-all.bb new file mode 100644 index 0000000000..7ee97ff1cd --- /dev/null +++ b/recipes-telephony/tasks/task-telephony-all.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Task for the meta-telephony layer. This is to build everything" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +ALLOW_EMPTY = "1" +PR = "r1" + +DEPENDS = "\ + libosmo-abis \ + libosmo-sccp \ + libosmocore \ + openbsc \ + task-osmocom \ + openggsn \ + misdn-utils \ + dahdi-linux \ + dahdi-tools \ + lcr \ + asterisk \ + libgsm \ + ortp \ + libdbi \ + libdbi-drivers \ + " + From f58538edcd7e452a48e683a759fe12cf7ff0ec3a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 11 Dec 2011 21:38:31 +0100 Subject: [PATCH 12/39] asterisk: Remove the CONFFILES that are not provided here --- recipes-isdn/asterisk/asterisk_1.8.7.0.bb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/recipes-isdn/asterisk/asterisk_1.8.7.0.bb b/recipes-isdn/asterisk/asterisk_1.8.7.0.bb index e0a4d71401..72466158e3 100644 --- a/recipes-isdn/asterisk/asterisk_1.8.7.0.bb +++ b/recipes-isdn/asterisk/asterisk_1.8.7.0.bb @@ -7,7 +7,7 @@ HOMEPAGE = "http://www.asterisk.org" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3c6764ffcbe996d1d8f919b393ccdd67" -PR = "r2" +PR = "r3" SRC_URI = "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz \ file://modules.conf \ @@ -67,10 +67,6 @@ INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME_${PN} = "asterisk" INITSCRIPT_PARAMS_${PN} = "defaults 29 29" -CONFFILES_${PN} = "${sysconfdir}/asterisk/extensions.conf \ - ${sysconfdir}/asterisk/modules.conf \ - ${sysconfdir}/asterisk/sip.conf" - PACKAGES =+ "${PN}-moh" DESCRIPTION_${PN}-moh = "Asterisk MusicOnHold sound" From dca725b36807d524ebe8bcff9f9bb6caf63bdb36 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 11 Dec 2011 22:08:19 +0100 Subject: [PATCH 13/39] osmocom: Introduce META_TELEPHONY_OSMO_INC to easily bump version For libosmocore updates we need a nice way to rebuild all libraries using it. This can be done using the META_TELEPHONY_OSMO_INC variable. --- conf/layer.conf | 1 + recipes-osmocom/libosmo-abis/libosmo-abis.inc | 2 +- recipes-osmocom/libosmo-sccp/libosmo-sccp.inc | 2 +- recipes-osmocom/libosmocore/libosmocore.inc | 2 +- recipes-osmocom/openbsc/openbsc.inc | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/layer.conf b/conf/layer.conf index 8162d1a773..8d40b7bab4 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -9,3 +9,4 @@ BBFILE_COLLECTIONS += "telephony" BBFILE_PATTERN_telephony := "^${LAYERDIR}/" BBFILE_PRIORITY_telephony = "5" +META_TELEPHONY_OSMO_INC = "1" diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis.inc b/recipes-osmocom/libosmo-abis/libosmo-abis.inc index 0632247056..acfe526958 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis.inc +++ b/recipes-osmocom/libosmo-abis/libosmo-abis.inc @@ -4,7 +4,7 @@ DEPENDS_append_geode = "dahdi-linux" HOMEPAGE = "http://openbsc.gnumonks.org" LICENSE = "GPL" -INC_PR="r2" +INC_PR="r2.${META_TELEPHONY_OSMO_INC}" LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc index 6c9d8e21c8..0a8e6633e9 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc @@ -3,7 +3,7 @@ DEPENDS = "libosmocore" HOMEPAGE = "http://openbsc.gnumonks.org" LICENSE = "GPL" -INC_PR="r1" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" diff --git a/recipes-osmocom/libosmocore/libosmocore.inc b/recipes-osmocom/libosmocore/libosmocore.inc index 16b4882357..6e091efbf1 100644 --- a/recipes-osmocom/libosmocore/libosmocore.inc +++ b/recipes-osmocom/libosmocore/libosmocore.inc @@ -2,7 +2,7 @@ DESCRITOPN = "An utility library for Open Source Mobile Communications" HOMEPAGE = "http://openbsc.gnumonks.org" LICENSE = "GPL" -INC_PR="r1" +INC_PR="r1.${META_TELEPHONY_OSMO_INC}" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc index 44b093504e..4fbb14b8b7 100644 --- a/recipes-osmocom/openbsc/openbsc.inc +++ b/recipes-osmocom/openbsc/openbsc.inc @@ -9,7 +9,7 @@ RDEPENDS_osmo-nitb = "libdbd-sqlite3" SRC_URI = "file://osmo-nitb.init \ file://osmo-bsc_mgcp.init \ file://osmo-bsc.init" -INC_PR = "r11" +INC_PR = "r11.${META_TELEPHONY_OSMO_INC}" EXTRA_OECONF += " --enable-nat --enable-osmo-bsc " From 183d75b24d7fe7744b7ccdc1c62fef45f1852e40 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 11 Dec 2011 23:12:26 +0100 Subject: [PATCH 14/39] libosmocore: Add version 0.4.1 of libosmocore, force re-build --- conf/layer.conf | 2 +- recipes-osmocom/libosmocore/libosmocore_0.4.1.bb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 recipes-osmocom/libosmocore/libosmocore_0.4.1.bb diff --git a/conf/layer.conf b/conf/layer.conf index 8d40b7bab4..5679e7ea9a 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -9,4 +9,4 @@ BBFILE_COLLECTIONS += "telephony" BBFILE_PATTERN_telephony := "^${LAYERDIR}/" BBFILE_PRIORITY_telephony = "5" -META_TELEPHONY_OSMO_INC = "1" +META_TELEPHONY_OSMO_INC = "3" diff --git a/recipes-osmocom/libosmocore/libosmocore_0.4.1.bb b/recipes-osmocom/libosmocore/libosmocore_0.4.1.bb new file mode 100644 index 0000000000..2541c0d568 --- /dev/null +++ b/recipes-osmocom/libosmocore/libosmocore_0.4.1.bb @@ -0,0 +1,11 @@ +require ${PN}.inc + +S = "${WORKDIR}/git" +SRCREV = "72bd4eb3b9e674d771d911e27cacb45468d51487" +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 +} From 8946d523ed60b9fb703cef7c45afefb3fb9d331a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 11 Jan 2012 20:44:34 +0800 Subject: [PATCH 15/39] libosmocore: Update the git recipe to include latest LAPD fix --- conf/layer.conf | 2 +- recipes-osmocom/libosmocore/libosmocore_git.bb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/layer.conf b/conf/layer.conf index 5679e7ea9a..0ddda0d069 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -9,4 +9,4 @@ BBFILE_COLLECTIONS += "telephony" BBFILE_PATTERN_telephony := "^${LAYERDIR}/" BBFILE_PRIORITY_telephony = "5" -META_TELEPHONY_OSMO_INC = "3" +META_TELEPHONY_OSMO_INC = "4" diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 2b6e20bacf..41fae845bf 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "3ec5047c6be00729f57da23f6d5de6d5a357ec7a" +SRCREV = "301f01e938e72423079afe1a1836937053481fd6" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git" -PV = "0.3.10+gitr${SRCPV}" +PV = "0.4.1+gitr${SRCPV}" PR = "1" From c2d998c9b4719de43c41d226282f22909663617a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Jan 2012 16:06:09 +0800 Subject: [PATCH 16/39] mISDN: Upgrade the mISDNuser library to post 2.0.5 --- recipes-isdn/misdn/misdn-utils_git.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-isdn/misdn/misdn-utils_git.bb b/recipes-isdn/misdn/misdn-utils_git.bb index 7e37837fd5..261bbed442 100644 --- a/recipes-isdn/misdn/misdn-utils_git.bb +++ b/recipes-isdn/misdn/misdn-utils_git.bb @@ -2,11 +2,11 @@ DESCRITOPN = "mISDNutils userspace library" HOMEPAGE = "http://misdn.org" LICENSE = "LGPLv2+" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605" -PR = "r3" +PR = "r4" -SRC_URI = "git://git.misdn.org/mISDNuser.git \ +SRC_URI = "git://git.misdn.eu/mISDNuser.git \ file://misdn-ph-size.diff" -SRCREV = "609658c19630c01f82cbfb5687fc70a356fc6db5" +SRCREV = "fd246f6bbbf2f4692f507018bcd1a526fab16499" S = "${WORKDIR}/git" PACKAGES =+ "misdn-tools-dbg misdn-tools" From 956671540540dcc1993782aa52f5a75017c95a00 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Jan 2012 16:07:56 +0800 Subject: [PATCH 17/39] asterisk: Upgrade from version 1.8.7.0 to 1.8.8.1 Move along the stable track. --- .../asterisk/{asterisk_1.8.7.0.bb => asterisk_1.8.8.1.bb} | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) rename recipes-isdn/asterisk/{asterisk_1.8.7.0.bb => asterisk_1.8.8.1.bb} (93%) diff --git a/recipes-isdn/asterisk/asterisk_1.8.7.0.bb b/recipes-isdn/asterisk/asterisk_1.8.8.1.bb similarity index 93% rename from recipes-isdn/asterisk/asterisk_1.8.7.0.bb rename to recipes-isdn/asterisk/asterisk_1.8.8.1.bb index 72466158e3..869de251c6 100644 --- a/recipes-isdn/asterisk/asterisk_1.8.7.0.bb +++ b/recipes-isdn/asterisk/asterisk_1.8.8.1.bb @@ -11,7 +11,11 @@ PR = "r3" SRC_URI = "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz \ file://modules.conf \ - file://asterisk.init" + file://asterisk.init " + +SRC_URI[md5sum] = "783b2da2036745edeea8885c62bbc8bf" +SRC_URI[sha256sum] = "ed98204f6261e1362c673e595823c668ae39b9833daec9127a4936cf9f4890e1" + EXTRA_OECONF = " \ --without-curses \ From e77df798a7b091d7157a57e19a0ed3469f22e022 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Jan 2012 16:08:45 +0800 Subject: [PATCH 18/39] asterisk: Band aid for a crash on RTP RTCP message This might be a general TLS issue with Asterisk on ARM. I have not looked into why this is happening. Create a band-aid. Crash: (gdb) bt it crashed when formating/printing the &addr in the rtcp recv method ... RTCP: Packet generated from Ekiga 3.2.7 (Debian Unstable). Cause: Not very clear, maybe something with TLS handling of asterisk --- recipes-isdn/asterisk/asterisk_1.8.8.1.bb | 7 ++++--- recipes-isdn/asterisk/files/stop-crash.patch | 13 +++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 recipes-isdn/asterisk/files/stop-crash.patch diff --git a/recipes-isdn/asterisk/asterisk_1.8.8.1.bb b/recipes-isdn/asterisk/asterisk_1.8.8.1.bb index 869de251c6..f31ae33f43 100644 --- a/recipes-isdn/asterisk/asterisk_1.8.8.1.bb +++ b/recipes-isdn/asterisk/asterisk_1.8.8.1.bb @@ -1,5 +1,5 @@ # Copyright (C) 2007-2008, Stelios Koroneos - Digital OPSiS, All Rights Reserved -# Copyright (C) 2011, sysmocom - systems for mobile communications GmbH +# Copyright (C) 2011-2012, sysmocom - systems for mobile communications GmbH # Released under the MIT license (see packages/COPYING) DESCRITOPN = "asterisk PBX" DEPENDS = "openssl ncurses" @@ -7,11 +7,12 @@ HOMEPAGE = "http://www.asterisk.org" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=3c6764ffcbe996d1d8f919b393ccdd67" -PR = "r3" +PR = "r4" SRC_URI = "http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${PV}.tar.gz \ file://modules.conf \ - file://asterisk.init " + file://asterisk.init \ + file://stop-crash.patch " SRC_URI[md5sum] = "783b2da2036745edeea8885c62bbc8bf" SRC_URI[sha256sum] = "ed98204f6261e1362c673e595823c668ae39b9833daec9127a4936cf9f4890e1" diff --git a/recipes-isdn/asterisk/files/stop-crash.patch b/recipes-isdn/asterisk/files/stop-crash.patch new file mode 100644 index 0000000000..3fe0d5e4a9 --- /dev/null +++ b/recipes-isdn/asterisk/files/stop-crash.patch @@ -0,0 +1,13 @@ +Index: asterisk-1.8.8.1/res/res_rtp_asterisk.c +=================================================================== +--- asterisk-1.8.8.1.orig/res/res_rtp_asterisk.c 2011-09-20 08:56:20.000000000 +0800 ++++ asterisk-1.8.8.1/res/res_rtp_asterisk.c 2012-01-16 02:45:57.227713136 +0800 +@@ -1902,7 +1902,7 @@ + "IAJitter: %u\r\n" + "LastSR: %lu.%010lu\r\n" + "DLSR: %4.4f(sec)\r\n", +- ast_sockaddr_stringify(&addr), ++ "NA" /*ast_sockaddr_stringify(&addr)*/, + pt, (pt == 200) ? "Sender Report" : (pt == 201) ? "Receiver Report" : (pt == 192) ? "H.261 FUR" : "Unknown", + rc, + rtcpheader[i + 1], From 8f3955af2047f4215f43f02009b0006a370b1711 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Jan 2012 16:11:55 +0800 Subject: [PATCH 19/39] lcr: Upgrade to post 1.10 and build from my personal branch Update to 1.10 to work with newer osmo-nitb, including the version handshake that was introduced. --- recipes-isdn/lcr/files/gsm-diff.patch | 44 --------------------------- recipes-isdn/lcr/lcr_git.bb | 11 +++---- 2 files changed, 5 insertions(+), 50 deletions(-) delete mode 100644 recipes-isdn/lcr/files/gsm-diff.patch diff --git a/recipes-isdn/lcr/files/gsm-diff.patch b/recipes-isdn/lcr/files/gsm-diff.patch deleted file mode 100644 index 0a84cacdf1..0000000000 --- a/recipes-isdn/lcr/files/gsm-diff.patch +++ /dev/null @@ -1,44 +0,0 @@ -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am 2011-10-14 00:53:48.245117239 +0800 -+++ git/Makefile.am 2011-10-14 00:53:48.633117240 +0800 -@@ -53,7 +53,7 @@ - - GSM_SOURCE += gsm_audio.c gsm.cpp - --GSM_LIB += /usr/lib/libgsm.a -+GSM_LIB += -lgsm - - #gsm_audio.po: gsm_audio.c gsm_audio.h - # $(CC) -D_GNU_SOURCE -fPIC -c gsm_audio.c -o gsm_audio.po -Index: git/configure.ac -=================================================================== ---- git.orig/configure.ac 2011-10-14 00:53:48.257117239 +0800 -+++ git/configure.ac 2011-10-14 00:53:48.633117240 +0800 -@@ -178,12 +178,7 @@ - AM_CONDITIONAL(ENABLE_GSM, test "x$with_gsm_bs" == "xyes" -o "x$with_gsm_ms" == "xyes") - - AS_IF([test "x$with_gsm_bs" == xyes -o "x$with_gsm_ms" == xyes], -- [AC_MSG_CHECKING(/usr/include/gsm/gsm.h) -- if test -e /usr/include/gsm/gsm.h; then -- AC_MSG_RESULT(yes) -- else -- AC_MSG_FAILURE([You have enabled GSM, but /usr/include/gsm/gsm.h not found! Please install the lossy GSM codec. Be sure to install it in /usr/ and not in /usr/local/. You will also find a copy on http://www.linux-call-router.de.]) -- fi -+ AC_MSG_RESULT(yes...why not use ac_check_headers...) - ]) - - # check for ss5 -Index: git/gsm_audio.c -=================================================================== ---- git.orig/gsm_audio.c 2011-10-14 00:53:48.000000000 +0800 -+++ git/gsm_audio.c 2011-10-14 00:55:12.929117386 +0800 -@@ -10,7 +10,7 @@ - \*****************************************************************************/ - - extern "C" { --#include "/usr/include/gsm/gsm.h" -+#include - - - /* create gsm instance */ diff --git a/recipes-isdn/lcr/lcr_git.bb b/recipes-isdn/lcr/lcr_git.bb index de820e6758..962c1be564 100644 --- a/recipes-isdn/lcr/lcr_git.bb +++ b/recipes-isdn/lcr/lcr_git.bb @@ -4,13 +4,12 @@ HOMEPAGE = "http://isdn.eversberg.eu/" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=de9327a12ae1ccc94dade892a360f996" -PV = "1.10" -PR = "r10" +PV = "1.10+gitr${SRCPV}" +PR = "r14" -SRCREV = "27ade6eeb9859a0702e77b27ca0abed63d298cda" -SRC_URI = "git://git.misdn.org/lcr.git \ - file://lcr.init \ - file://gsm-diff.patch" +SRCREV = "cd2834a10ceb14f8d2e70334a89b531119b954d4" +SRC_URI = "git://git.misdn.eu/lcr.git \ + file://lcr.init " S = "${WORKDIR}/git" EXTRA_OECONF = "--with-gsm-bs --with-asterisk" From 6e64338f29150d39cd63cd1ac3c1db88a8da7b64 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Jan 2012 16:13:42 +0800 Subject: [PATCH 20/39] libosmo-abis: Add recipe for upstream version 0.1.1 --- recipes-osmocom/libosmo-abis/libosmo-abis_0.1.1.bb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 recipes-osmocom/libosmo-abis/libosmo-abis_0.1.1.bb diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis_0.1.1.bb b/recipes-osmocom/libosmo-abis/libosmo-abis_0.1.1.bb new file mode 100644 index 0000000000..358f1fbfc4 --- /dev/null +++ b/recipes-osmocom/libosmo-abis/libosmo-abis_0.1.1.bb @@ -0,0 +1,11 @@ +require ${PN}.inc + +S = "${WORKDIR}/git" +SRCREV = "55467f0478e37b35cceec3051c645b8a407110bc" +SRC_URI = "git://git.osmocom.org/libosmo-abis.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 +} From 73bcd9a75c5e87dae6eec832057d42e93ab98d2e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Jan 2012 16:14:43 +0800 Subject: [PATCH 21/39] libosmocore: Upgrade git to after the 0.4.1 release In this git version LAPDm is fixed in a way that it is working for the osmo-bts again. --- recipes-osmocom/libosmocore/libosmocore_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index 41fae845bf..d3428ece2c 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "301f01e938e72423079afe1a1836937053481fd6" +SRCREV = "3a5f08c221b32381623e50095de2751183e994c4" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git" PV = "0.4.1+gitr${SRCPV}" -PR = "1" +PR = "0" From 23dbc00a4e8ccf92fef6ccb4bdcc23b2ae3c1303 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 16 Jan 2012 16:16:08 +0800 Subject: [PATCH 22/39] openbsc: Upgrade git version to track 0.10.1+ --- recipes-osmocom/openbsc/openbsc_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-osmocom/openbsc/openbsc_git.bb b/recipes-osmocom/openbsc/openbsc_git.bb index 40fd1dcd50..2c9bf0e934 100644 --- a/recipes-osmocom/openbsc/openbsc_git.bb +++ b/recipes-osmocom/openbsc/openbsc_git.bb @@ -1,9 +1,9 @@ require ${PN}.inc -PV = "0.10.0+gitr${SRCPV}" +PV = "0.10.1+gitr${SRCPV}" PR = "${INC_PR}.1" -SRCREV = "670ffe32900c9932f5fb1f3e836f77145bee94b7" +SRCREV = "aa433d2d8418b73760fd1f9db1c9e84a05fe3551" SRC_URI += "git://git.osmocom.org/openbsc.git;protocol=git" S = "${WORKDIR}/git/openbsc" From 75abc06f34752baf7001fb712be82466027fafe7 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 23 Jan 2012 02:25:15 +0800 Subject: [PATCH 23/39] lcr: Remove not installed files from the CONFFILES --- recipes-isdn/lcr/lcr_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-isdn/lcr/lcr_git.bb b/recipes-isdn/lcr/lcr_git.bb index 962c1be564..3f8d904cb4 100644 --- a/recipes-isdn/lcr/lcr_git.bb +++ b/recipes-isdn/lcr/lcr_git.bb @@ -5,7 +5,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=de9327a12ae1ccc94dade892a360f996" PV = "1.10+gitr${SRCPV}" -PR = "r14" +PR = "r15" SRCREV = "cd2834a10ceb14f8d2e70334a89b531119b954d4" SRC_URI = "git://git.misdn.eu/lcr.git \ @@ -23,7 +23,7 @@ PACKAGES =+ "${PN}-tones-de ${PN}-vbox-de \ FILES_${PN} += "/usr/local ${libdir}/asterisk/modules" FILES_${PN}-dbg += "${libdir}/asterisk/modules/.debug" -CONFFILES_${PN} = "/usr/local/lcr/interface.conf /usr/local/lcr/routing.conf /usr/local/lcr/options.conf" +CONFFILES_${PN} = "/usr/local/lcr/options.conf" INITSCRIPT_PACKAGES = "${PN}" INITSCRIPT_NAME_${PN} = "lcr" INITSCRIPT_PARAMS_${PN} = "defaults 30 30" From a56c10d89a4a8552f4326a693763e663da307930 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 23 Jan 2012 02:32:32 +0800 Subject: [PATCH 24/39] lcr: Clean out the default config files --- recipes-isdn/lcr/lcr_git.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes-isdn/lcr/lcr_git.bb b/recipes-isdn/lcr/lcr_git.bb index 3f8d904cb4..60089bd600 100644 --- a/recipes-isdn/lcr/lcr_git.bb +++ b/recipes-isdn/lcr/lcr_git.bb @@ -5,7 +5,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=de9327a12ae1ccc94dade892a360f996" PV = "1.10+gitr${SRCPV}" -PR = "r15" +PR = "r16" SRCREV = "cd2834a10ceb14f8d2e70334a89b531119b954d4" SRC_URI = "git://git.misdn.eu/lcr.git \ @@ -37,4 +37,7 @@ FILES_${PN}-vbox-en = "/usr/local/lcr/vbox_english" do_install_append() { install -d ${D}${sysconfdir}/init.d install -m 0775 ${WORKDIR}/lcr.init ${D}${sysconfdir}/init.d/lcr + + rm ${D}/usr/local/lcr/routing.conf + rm ${D}/usr/local/lcr/interface.conf } From 904300e21a57f3736503474ed2f63e01ec9ff677 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 16 Feb 2012 03:44:32 +0800 Subject: [PATCH 25/39] openggsn_git: Upgrade to the latest git revision This version includes a libgtp.pc that is required to compile the osmo-sgsn. --- recipes-osmocom/openggsn/openggsn_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-osmocom/openggsn/openggsn_git.bb b/recipes-osmocom/openggsn/openggsn_git.bb index 0867a14999..9b15d9f731 100644 --- a/recipes-osmocom/openggsn/openggsn_git.bb +++ b/recipes-osmocom/openggsn/openggsn_git.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" PV = "0.91+gitr${SRCPV}" PR = "r10" -SRCREV = "fe5040967513616731d8151b22d26bdf74d65111" +SRCREV = "95848bafcef145d776d70a73f7bdc3fe37e85724" SRC_URI = "git://ggsn.git.sourceforge.net/gitroot/ggsn/ggsn \ file://openggsn.init \ " From e08238ed3d04ae10d88d5d12cf864914fc1e31e2 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 5 Mar 2012 02:44:24 +0800 Subject: [PATCH 26/39] osmocom-tcpdump: Add a tcpdump wrapper that logs to finite space tcpdump can create a new log file every couple of bytes, it can also be asked to limit the number of logfiles and wraps the counter back to zero, and at least tcpdump 4.1 can also compress the log file with an external script. Create a start script around this feature to log to a given directory but not use more space than allowed to. The script was created by Jan Luebbe and then modified. --- .../osmocom-tcpdump/files/osmocom-tcpdump | 111 ++++++++++++++++++ .../osmocom-tcpdump/files/tcpdump-compress | 4 + .../osmocom-tcpdump/osmocom-tcpdump_1.0.bb | 25 ++++ 3 files changed, 140 insertions(+) create mode 100755 recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump create mode 100755 recipes-osmocom/osmocom-tcpdump/files/tcpdump-compress create mode 100644 recipes-osmocom/osmocom-tcpdump/osmocom-tcpdump_1.0.bb diff --git a/recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump b/recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump new file mode 100755 index 0000000000..5886c29c69 --- /dev/null +++ b/recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump @@ -0,0 +1,111 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: on-waves-capture +# Required-Start: $remote_fs $network +# Should-Start: udev +# Required-Stop: $remote_fs $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Osmocom traffic capture" +NAME="tcpdump" +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/osmocom-tcpdump-$NAME.pid +SCRIPTNAME=/etc/init.d/osmocom-tcpdump + + +CAPTURE_ENABLED="0" +CAPTURE_LIMIT="8" +CAPTURE_SIZE="1" +CAPTURE_BASENAME="/tmp/tcpdump-capture-" +CAPTURE_COMPRESS="-z /usr/sbin/tcpdump-compress" + +if [ -e /etc/default/osmocom-tcpdump ]; then + . /etc/default/osmocom-tcpdump +fi + + +CAPTURE_OPTIONS="-pi $CAPTURE_DEVICE -s0 -w $CAPTURE_BASENAME -C $CAPTURE_SIZE -W $CAPTURE_LIMIT $CAPTURE_COMPRESS" + +# +# 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 + if [ -z "$CAPTURE_DEVICE" -o -z "$CAPTURE_FILTER" ]; then + echo "Unable to start $DESC" "$NAME" "(unconfigured)" + exit 2 + fi + if [ "$CAPTURE_ENABLED" != "1" ]; then + echo "Not starting $DESC" "$NAME" "(disabled)" + exit 0 + fi + #start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ + # || return 1 + echo "Starting $DESC" "$NAME" + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \ + --background --make-pidfile -- $CAPTURE_OPTIONS $CAPTURE_FILTER \ + || return 2 +} + +# +# 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 + echo "Stopping $DESC" "$NAME" + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + do_start + exit $? + ;; + stop) + do_stop + exit $? + ;; + restart) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + do_stop + case "$?" in + 0|1) + do_start + exit $? + ;; + *) + # Failed to stop + exit 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2 + exit 3 + ;; +esac + +: diff --git a/recipes-osmocom/osmocom-tcpdump/files/tcpdump-compress b/recipes-osmocom/osmocom-tcpdump/files/tcpdump-compress new file mode 100755 index 0000000000..0a55605a5a --- /dev/null +++ b/recipes-osmocom/osmocom-tcpdump/files/tcpdump-compress @@ -0,0 +1,4 @@ +#!/bin/bash + +rm -f $1.pcap.gz || true +gzip -c $1 > $1.pcap.gz && rm -f $1 || true diff --git a/recipes-osmocom/osmocom-tcpdump/osmocom-tcpdump_1.0.bb b/recipes-osmocom/osmocom-tcpdump/osmocom-tcpdump_1.0.bb new file mode 100644 index 0000000000..b86c8e35e7 --- /dev/null +++ b/recipes-osmocom/osmocom-tcpdump/osmocom-tcpdump_1.0.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Osmocom round-robin tcpdump/capture" +LICENSE = "GPLv3+" +RDEPENDS = "tcpdump bash" +PR = "r10" + +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +SRC_URI = " \ + file://osmocom-tcpdump \ + file://tcpdump-compress \ +" + +do_install () { + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/default + install -d ${D}${sbindir} + + install -m 0755 ${WORKDIR}/osmocom-tcpdump ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/tcpdump-compress ${D}${sbindir}/ +} + +inherit update-rc.d + +INITSCRIPT_NAME = "osmocom-tcpdump" +INITSCRIPT_PARAMS = "defaults 21" From aeca0842f34c0d3b2d93ea833dbf90c95dd09e1e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 6 Apr 2012 21:00:44 +0800 Subject: [PATCH 27/39] osmocom-tcpdump: Correct the provides name in the start script --- recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump b/recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump index 5886c29c69..71478c9155 100755 --- a/recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump +++ b/recipes-osmocom/osmocom-tcpdump/files/osmocom-tcpdump @@ -1,6 +1,6 @@ #!/bin/sh ### BEGIN INIT INFO -# Provides: on-waves-capture +# Provides: osmocom-tcpdump # Required-Start: $remote_fs $network # Should-Start: udev # Required-Stop: $remote_fs $network From 9d939cbe6c55a1e928195ac533caf8ff516af03b Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 7 Apr 2012 21:57:42 +0800 Subject: [PATCH 28/39] ortp: Move back to the savannah infrastructure mirror.its.uidaho.edu is not reachable anymore and savannah appears to be working again. --- recipes-misc/ortp/ortp.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes-misc/ortp/ortp.inc b/recipes-misc/ortp/ortp.inc index ef8bbc06ca..3e77a0e928 100644 --- a/recipes-misc/ortp/ortp.inc +++ b/recipes-misc/ortp/ortp.inc @@ -5,8 +5,7 @@ INC_PR = "r1" inherit autotools pkgconfig -//SRC_URI = "http://download.savannah.nongnu.org/releases/linphone/${PN}/sources/${P}.tar.gz" -SRC_URI = "http://mirror.its.uidaho.edu/pub/savannah/linphone/${PN}/sources/${P}.tar.gz" +SRC_URI = "http://download.savannah.nongnu.org/releases/linphone/${PN}/sources/${P}.tar.gz" LICENSE = "LGPL" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" From fab01cc65755bf5d14a7e230d15e75e9405e66e9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 13 Apr 2012 03:21:01 +0800 Subject: [PATCH 29/39] osmocom: Upgrade libosmocore and openbsc to newer versions Build newer versions of libosmocore and openbsc. --- recipes-osmocom/libosmocore/libosmocore_git.bb | 2 +- recipes-osmocom/openbsc/openbsc_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index d3428ece2c..e85f3e65c4 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "3a5f08c221b32381623e50095de2751183e994c4" +SRCREV = "df90aedcc72e40bac9e87618dd9437e1e9b6d12a" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git" PV = "0.4.1+gitr${SRCPV}" PR = "0" diff --git a/recipes-osmocom/openbsc/openbsc_git.bb b/recipes-osmocom/openbsc/openbsc_git.bb index 2c9bf0e934..f0c77df15b 100644 --- a/recipes-osmocom/openbsc/openbsc_git.bb +++ b/recipes-osmocom/openbsc/openbsc_git.bb @@ -3,7 +3,7 @@ require ${PN}.inc PV = "0.10.1+gitr${SRCPV}" PR = "${INC_PR}.1" -SRCREV = "aa433d2d8418b73760fd1f9db1c9e84a05fe3551" +SRCREV = "09db1a44bc56e81780954555acfbc1bf2fb7cc81" SRC_URI += "git://git.osmocom.org/openbsc.git;protocol=git" S = "${WORKDIR}/git/openbsc" From e005f8d60e6c3319a9829ec7829a7c98c0a0d657 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 14 Apr 2012 19:39:29 +0800 Subject: [PATCH 30/39] openbsc: Fix the name of the MGCP MGW start script The binary was renamed in the master branch, catch up. --- recipes-osmocom/openbsc/openbsc.inc | 4 ++-- recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc index 4fbb14b8b7..f60da86cdc 100644 --- a/recipes-osmocom/openbsc/openbsc.inc +++ b/recipes-osmocom/openbsc/openbsc.inc @@ -9,7 +9,7 @@ RDEPENDS_osmo-nitb = "libdbd-sqlite3" SRC_URI = "file://osmo-nitb.init \ file://osmo-bsc_mgcp.init \ file://osmo-bsc.init" -INC_PR = "r11.${META_TELEPHONY_OSMO_INC}" +INC_PR = "r12.${META_TELEPHONY_OSMO_INC}" EXTRA_OECONF += " --enable-nat --enable-osmo-bsc " @@ -49,7 +49,7 @@ FILES_osmo-bsc = " ${bindir}/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 \ +FILES_osmo-bsc-mgcp = " ${bindir}/osmo-bsc_mgcp \ ${sysconfdir}/osmocom/osmo-bsc-mgcp.cfg \ ${sysconfdir}/init.d/osmo-bsc-mgcp" diff --git a/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init b/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init index cf9c4516c4..bfddac962a 100755 --- a/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init +++ b/recipes-osmocom/openbsc/openbsc/osmo-bsc_mgcp.init @@ -8,7 +8,7 @@ # Short-Description: Osmocom GSM BSC MGCP proxy ### END INIT INFO -DAEMON=/usr/bin/bsc_mgcp +DAEMON=/usr/bin/osmo-bsc_mgcp NAME=osmo-bsc_mgcp DESC="Osmocom GSM BSC MGCP proxy" NORMAL_ARGS="-D -c /etc/osmocom/bsc_mgcp.cfg" From 96a864f527fb4e1cbcc6054ae4cca3556fa03091 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 28 Apr 2012 22:38:54 +0800 Subject: [PATCH 31/39] libosmocore: Upgrade to get GSM_LCHAN_PDTCH --- recipes-osmocom/libosmocore/libosmocore_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index e85f3e65c4..cbe4295253 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -1,7 +1,7 @@ require ${PN}.inc S = "${WORKDIR}/git" -SRCREV = "df90aedcc72e40bac9e87618dd9437e1e9b6d12a" +SRCREV = "81cd54a0c36cd9cf2bedd97221658a276aa2d84c" SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git" PV = "0.4.1+gitr${SRCPV}" PR = "0" From d24c97d308fb5fb9b75c359085ad9803d0311eb4 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 30 May 2012 17:50:06 +0800 Subject: [PATCH 32/39] osmocom: Fix the license of the libraries GPL is too unspecific, point to the right versions --- recipes-osmocom/libosmo-abis/libosmo-abis.inc | 2 +- recipes-osmocom/libosmo-sccp/libosmo-sccp.inc | 2 +- recipes-osmocom/libosmocore/libosmocore.inc | 2 +- recipes-osmocom/openbsc/openbsc.inc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes-osmocom/libosmo-abis/libosmo-abis.inc b/recipes-osmocom/libosmo-abis/libosmo-abis.inc index acfe526958..ddc1275c0b 100644 --- a/recipes-osmocom/libosmo-abis/libosmo-abis.inc +++ b/recipes-osmocom/libosmo-abis/libosmo-abis.inc @@ -2,7 +2,7 @@ DESCRITOPN = "An utility library for Open Source Mobile Communications" DEPENDS = "libosmocore ortp" DEPENDS_append_geode = "dahdi-linux" HOMEPAGE = "http://openbsc.gnumonks.org" -LICENSE = "GPL" +LICENSE = "AGPLv3" INC_PR="r2.${META_TELEPHONY_OSMO_INC}" diff --git a/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc index 0a8e6633e9..0b4ae81870 100644 --- a/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc +++ b/recipes-osmocom/libosmo-sccp/libosmo-sccp.inc @@ -1,7 +1,7 @@ DESCRITOPN = "An utility library for Open Source Mobile Communications" DEPENDS = "libosmocore" HOMEPAGE = "http://openbsc.gnumonks.org" -LICENSE = "GPL" +LICENSE = "AGPLv3" INC_PR="r1.${META_TELEPHONY_OSMO_INC}" diff --git a/recipes-osmocom/libosmocore/libosmocore.inc b/recipes-osmocom/libosmocore/libosmocore.inc index 6e091efbf1..c0dba30f28 100644 --- a/recipes-osmocom/libosmocore/libosmocore.inc +++ b/recipes-osmocom/libosmocore/libosmocore.inc @@ -1,6 +1,6 @@ DESCRITOPN = "An utility library for Open Source Mobile Communications" HOMEPAGE = "http://openbsc.gnumonks.org" -LICENSE = "GPL" +LICENSE = "GPLv2+" INC_PR="r1.${META_TELEPHONY_OSMO_INC}" diff --git a/recipes-osmocom/openbsc/openbsc.inc b/recipes-osmocom/openbsc/openbsc.inc index f60da86cdc..1f71e4d6d8 100644 --- a/recipes-osmocom/openbsc/openbsc.inc +++ b/recipes-osmocom/openbsc/openbsc.inc @@ -1,7 +1,7 @@ DESCRITOPN = "OpenBSC a Free Software GSM BaseStationController" DEPENDS = "libdbi libosmocore libosmo-sccp libosmo-abis openggsn" HOMEPAGE = "http://openbsc.osmocom.org/" -LICENSE = "AGPLv3" +LICENSE = "AGPLv3+" LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" RDEPENDS_osmo-nitb = "libdbd-sqlite3" From 5a11d46c4ef33f7a8010bb8b5fc01d30661e81fe Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 30 May 2012 19:17:49 +0800 Subject: [PATCH 33/39] libdbi: Be more precise about the license of libdbi and libdbi-drivers --- recipes-misc/libdbi/libdbi-drivers.inc | 2 +- recipes-misc/libdbi/libdbi.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-misc/libdbi/libdbi-drivers.inc b/recipes-misc/libdbi/libdbi-drivers.inc index 76a5702ac8..555a6b697a 100644 --- a/recipes-misc/libdbi/libdbi-drivers.inc +++ b/recipes-misc/libdbi/libdbi-drivers.inc @@ -4,7 +4,7 @@ DESCRIPTION = "Database Drivers for libdbi" HOMEPAGE = "http://libdbi-drivers.sourceforge.net/" -LICENSE = "LGPL" +LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" SECTION = "libs" diff --git a/recipes-misc/libdbi/libdbi.inc b/recipes-misc/libdbi/libdbi.inc index 571e55b6fe..e77a5eec3c 100644 --- a/recipes-misc/libdbi/libdbi.inc +++ b/recipes-misc/libdbi/libdbi.inc @@ -4,7 +4,7 @@ DESCRIPTION = "Database Independent Abstraction Layer for C" HOMEPAGE = "http://libdbi.sourceforge.net/" -LICENSE = "LGPL" +LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499" SECTION = "libs" From 8caa70df0a437f08c9d2f84e97345cfe6d1745af Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 30 May 2012 19:19:10 +0800 Subject: [PATCH 34/39] ortp: Be more specific about the version of the LGPL --- recipes-misc/ortp/ortp.inc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes-misc/ortp/ortp.inc b/recipes-misc/ortp/ortp.inc index 3e77a0e928..2e75bcdc0d 100644 --- a/recipes-misc/ortp/ortp.inc +++ b/recipes-misc/ortp/ortp.inc @@ -1,5 +1,5 @@ DESCRIPTION = "An LGPL implementation of RTP - RFC3550" -LICENSE = "LGPL" +LICENSE = "LGPLv2.1+" INC_PR = "r1" @@ -7,7 +7,6 @@ inherit autotools pkgconfig SRC_URI = "http://download.savannah.nongnu.org/releases/linphone/${PN}/sources/${P}.tar.gz" -LICENSE = "LGPL" LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34" do_compile_append() { From 39b09a8849d4dec82f1cf4694da4afba5a840536 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 30 May 2012 19:21:39 +0800 Subject: [PATCH 35/39] dahdi: Be more specific about the version of GPL. --- recipes-isdn/dahdi-linux/dahdi-linux.inc | 2 +- recipes-isdn/dahdi-tools/dahdi-tools.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-isdn/dahdi-linux/dahdi-linux.inc b/recipes-isdn/dahdi-linux/dahdi-linux.inc index ebc2035f28..506c4f9a66 100644 --- a/recipes-isdn/dahdi-linux/dahdi-linux.inc +++ b/recipes-isdn/dahdi-linux/dahdi-linux.inc @@ -1,7 +1,7 @@ DESCRITOPN = "Digium Asterisk Hardware Driver Interface - Linux kernel part" SECTION = "base" HOMEPAGE = "http://www.asterisk.org" -LICENSE = "GPL" +LICENSE = "GPLv2" RDEPENDS_${PN} = "kernel (${KERNEL_VERSION})" DEPENDS = "virtual/kernel" RRECOMMENDS_${PN} = "dahdi-firmware" diff --git a/recipes-isdn/dahdi-tools/dahdi-tools.inc b/recipes-isdn/dahdi-tools/dahdi-tools.inc index 2034163cf0..6d0f462ddc 100644 --- a/recipes-isdn/dahdi-tools/dahdi-tools.inc +++ b/recipes-isdn/dahdi-tools/dahdi-tools.inc @@ -1,7 +1,7 @@ DESCRITOPN = "Utilities for the DAHDI Asterisk Linux kernel drivers" DEPENDS = "dahdi-linux libnewt" HOMEPAGE = "http://www.asterisk.org" -LICENSE = "GPL" +LICENSE = "GPLv2" SRC_URI = "http://downloads.asterisk.org/pub/telephony/dahdi-tools/releases/dahdi-tools-${PV}.tar.gz" From 1e224b39ae241636eb01e9c9ea41520d67ba376c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 30 May 2012 19:23:22 +0800 Subject: [PATCH 36/39] libdbi-drivers: Remove redundant LICENSE assignment --- recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb b/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb index 796cefb1ae..a4897d0190 100644 --- a/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb +++ b/recipes-misc/libdbi/libdbi-drivers_0.8.3-1.bb @@ -1,4 +1,3 @@ require ${PN}.inc -LICENSE = "LGPL" PR = "r1" From 242922ceaefc6d09daa3f5217761dc8594306fcd Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 31 May 2012 17:46:54 +0200 Subject: [PATCH 37/39] SDK: make sure to include libosmo-abis, libdbi and libgtp headers This enables the SDK to do a full openbsc build. --- recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb | 2 +- recipes-osmocom/tasks/task-sdk-osmo.inc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb b/recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb index e9f99956e9..b591b66ae0 100644 --- a/recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb +++ b/recipes-osmocom/tasks/task-core-standalone-osmo-sdk-target.bb @@ -6,7 +6,7 @@ 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" +PR = "r2" ALLOW_EMPTY = "1" diff --git a/recipes-osmocom/tasks/task-sdk-osmo.inc b/recipes-osmocom/tasks/task-sdk-osmo.inc index 45c37c754f..0eac22ad58 100644 --- a/recipes-osmocom/tasks/task-sdk-osmo.inc +++ b/recipes-osmocom/tasks/task-sdk-osmo.inc @@ -1,6 +1,9 @@ SDK-OSMO = " \ libosmocore-dev \ libosmo-sccp-dev \ + libosmo-abis-dev \ + libgtp-dev \ + libdbi-dev \ " SDK-EXTRAS ?= "" From 9f86fa35a232e629eb9d3d4f58de98e9831d0b07 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 10 Jun 2012 04:53:33 +0800 Subject: [PATCH 38/39] openmoko-gsmd: Add the Openmoko GSMD recipe This is based on the gsmd recipe from OE classic. There will be some more tweaking for respawn and the cell log utility. --- recipes-openmoko/openmoko-gsmd/files/default | 54 ++++++++++++ recipes-openmoko/openmoko-gsmd/files/gsmd | 47 +++++++++++ .../openmoko-gsmd/openmoko-gsmd_git.bb | 83 +++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 recipes-openmoko/openmoko-gsmd/files/default create mode 100644 recipes-openmoko/openmoko-gsmd/files/gsmd create mode 100644 recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb diff --git a/recipes-openmoko/openmoko-gsmd/files/default b/recipes-openmoko/openmoko-gsmd/files/default new file mode 100644 index 0000000000..cf36460fac --- /dev/null +++ b/recipes-openmoko/openmoko-gsmd/files/default @@ -0,0 +1,54 @@ +# gsmd This shell script configures for the gsmd init script. + +. /etc/init.d/functions + +case `machine_id` in + "gta01"|"gta02") + GSMD_OPTS="-s 115200 -F" + if [ -d '/sys/bus/platform/devices/gta01-pm-gsm.0' ] ; then + GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on" + GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset" + else + GSM_POW="/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on" + GSM_RES="/sys/bus/platform/devices/neo1973-pm-gsm.0/reset" + fi + GSM_DEV="/dev/ttySAC0" + GSM_DL="/sys/devices/platform/neo1973-pm-gsm.0/download" + ;; + "htc_apache"|"htc_blueangel"|"htc_universal") + GSMD_OPTS="-s 115200 -F" + GSM_DEV="/dev/ttyS0" + ;; + "htc_himalaya") + GSMD_OPTS="-s 115200 -F" + GSM_DEV="/dev/ttyS2" + ;; + "htc_magician") + GSMD_OPTS="-s 115200 -F" + GSM_DEV="/dev/ttyS1" + ;; + "palm_treo_650") + GSMD_OPTS="-s 460800 -F -w 1" + GSM_DEV="/dev/ttyS0" + ;; + "motorola_ezx_platform") + GSMD_OPTS="-s 115200 -F -v ti" + GSM_DEV="/dev/mux0" + ;; + *) + # Unknown board + + # If you must specify special options, uncomment and modify the next line + #GSMD_OPTS="-s 115200 -F" + + # If your GSM device needs to be powered up, uncomment and modify the next line + #GSM_POW="/sys/bus/platform/devices/gta01-pm-gsm.0/power_on" + + # If your GSM device then needs to be reset, uncomment and modify the next line + #GSM_RES="/sys/bus/platform/devices/gta01-pm-gsm.0/reset" + + # This should be in a common /etc/default/serial, together with + # BT_DEV and IR_DEV for devices that have those on a serial port + #GSM_DEV="/dev/ttyS1" + ;; +esac diff --git a/recipes-openmoko/openmoko-gsmd/files/gsmd b/recipes-openmoko/openmoko-gsmd/files/gsmd new file mode 100644 index 0000000000..dc10e63098 --- /dev/null +++ b/recipes-openmoko/openmoko-gsmd/files/gsmd @@ -0,0 +1,47 @@ +#! /bin/sh +# +# gsmd This shell script starts and stops gsmd. +# +# chkconfig: 345 90 40 +# description: Gsmd manages access to a serial- or USB-connected GSM +# processname: gsmd + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +[ -f /etc/default/rcS ] && . /etc/default/rcS +[ -f /etc/default/gsmd ] && . /etc/default/gsmd + +case "$1" in + start) + [ -n "$GSM_POW" ] && ( echo "0" >$GSM_POW; sleep 1 ) + [ -n "$GSM_POW" ] && ( echo "1" >$GSM_POW; sleep 1 ) + [ -n "$GSM_RES" ] && ( echo "1" >$GSM_RES; sleep 1 ) + [ -n "$GSM_RES" ] && ( echo "0" >$GSM_RES; sleep 2 ) + + echo -n "Starting GSM daemon: " + start-stop-daemon -S -x /usr/sbin/gsmd -- gsmd -p $GSM_DEV $GSMD_OPTS -d -l syslog + + if [ $? = 0 ]; then + echo "gsmd." + else + echo "(failed.)" + fi + ;; + stop) + [ -n "$GSM_POW" ] && echo "0" >$GSM_POW + + echo -n "Stopping GSM daemon: " + start-stop-daemon -K -x /usr/sbin/gsmd + echo "gsmd." + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/gsmd {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb b/recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb new file mode 100644 index 0000000000..dce93febf6 --- /dev/null +++ b/recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb @@ -0,0 +1,83 @@ +DESCRIPTION = "GSM libraries and daemons implementing the ETSI 07.10 specification" +HOMEPAGE = "http://www.openmoko.org" +SECTION = "telephony" + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://COPYING.library;md5=2d5025d4aa3495befef8f17206a5b0a1 " + +# Fork with wavecom support +SRC_URI = "git://git.gnumonks.org/openmoko-gsmd.git;branch=master \ + file://gsmd \ + file://default" +SRCREV = "28e25ae42da7d65face9ad2472075f7c4fc87e92" +S = "${WORKDIR}/git" + +PR = "r7" + +inherit autotools pkgconfig update-rc.d + + +# handle update-rc.d RDEPENDS_${PN} manually, we don't need it on +# anything but gsmd + +INITSCRIPT_NAME = "gsmd" +INITSCRIPT_PARAMS = "defaults 35" + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gsmd ${D}/${sysconfdir}/init.d/ + install -d ${D}/${sysconfdir}/default + install ${WORKDIR}/default ${D}/${sysconfdir}/default/gsmd +} + +PACKAGES =+ "\ + ${PN}-tools \ + ${PN}-plugins \ + ${PN}-plugin-machine-generic \ + ${PN}-plugin-machine-tihtc \ + ${PN}-plugin-machine-gta01 \ + ${PN}-plugin-machine-telit \ + ${PN}-plugin-vendor-bcm \ + ${PN}-plugin-vendor-qc \ + ${PN}-plugin-vendor-telit \ + ${PN}-plugin-vendor-ti \ + ${PN}-plugin-vendor-tihtc \ + ${PN}-plugin-vendor-wavecom \ +" + +RDEPENDS_${PN}-plugins = "\ + ${PN}-plugin-machine-generic \ + ${PN}-plugin-machine-tihtc \ + ${PN}-plugin-machine-gta01 \ + ${PN}-plugin-machine-telit \ + ${PN}-plugin-vendor-bcm \ + ${PN}-plugin-vendor-qc \ + ${PN}-plugin-vendor-telit \ + ${PN}-plugin-vendor-ti \ + ${PN}-plugin-vendor-tihtc \ + ${PN}-plugin-vendor-wavecom \ +" + +RDEPENDS_${PN} += "update-rc.d" + +FILES_${PN}-dbg += "${libdir}/gsmd/.debug/*" +FILES_${PN}-tools = "${bindir}/*" +FILES_${PN}-plugins = "" +FILES_${PN}-dev += " ${libdir}/gsmd/*.la " +FILES_${PN}-staticdev += " ${libdir}/gsmd/*.a" +FILES_${PN}-plugin-machine-generic = "${libdir}/gsmd/libgsmd-machine_generic.so*" +FILES_${PN}-plugin-machine-tihtc = "${libdir}/gsmd/libgsmd-machine_tihtc.so*" +FILES_${PN}-plugin-machine-gta01 = "${libdir}/gsmd/libgsmd-machine_gta01.so*" +FILES_${PN}-plugin-machine-telit = "${libdir}/gsmd/libgsmd-machine_telit.so*" +FILES_${PN}-plugin-vendor-qc = "${libdir}/gsmd/libgsmd-vendor_qc.so*" +FILES_${PN}-plugin-vendor-bcm = "${libdir}/gsmd/libgsmd-vendor_bcm.so*" +FILES_${PN}-plugin-vendor-telit = "${libdir}/gsmd/libgsmd-vendor_telit.so*" +FILES_${PN}-plugin-vendor-ti = "${libdir}/gsmd/libgsmd-vendor_ti.so*" +FILES_${PN}-plugin-vendor-tihtc = "${libdir}/gsmd/libgsmd-vendor_tihtc.so*" +FILES_${PN}-plugin-vendor-wavecom = "${libdir}/gsmd/libgsmd-vendor_wavecom.so*" + +PACKAGES_DYNAMIC = "lib${PN}* ${PN}" + +ALLOW_EMPTY_${PN}-plugins = "1" + From 4fed144378a38115805f986c56d883763f6dab79 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 11 Jun 2012 08:38:52 +0200 Subject: [PATCH 39/39] openmoko-gsmd: Add support for the sysmobts_v2 with a modem daughterboard --- recipes-openmoko/openmoko-gsmd/files/default | 4 ++++ recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes-openmoko/openmoko-gsmd/files/default b/recipes-openmoko/openmoko-gsmd/files/default index cf36460fac..e7c536ba1f 100644 --- a/recipes-openmoko/openmoko-gsmd/files/default +++ b/recipes-openmoko/openmoko-gsmd/files/default @@ -35,6 +35,10 @@ case `machine_id` in GSMD_OPTS="-s 115200 -F -v ti" GSM_DEV="/dev/mux0" ;; + "sysmocom_sysmobts_v2") + GSMD_OPTS="-v wavecom" + GSM_DEV="/dev/ttyS0" + ;; *) # Unknown board diff --git a/recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb b/recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb index dce93febf6..68477bca8f 100644 --- a/recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb +++ b/recipes-openmoko/openmoko-gsmd/openmoko-gsmd_git.bb @@ -13,7 +13,7 @@ SRC_URI = "git://git.gnumonks.org/openmoko-gsmd.git;branch=master \ SRCREV = "28e25ae42da7d65face9ad2472075f7c4fc87e92" S = "${WORKDIR}/git" -PR = "r7" +PR = "r8" inherit autotools pkgconfig update-rc.d