From 5928a0374aa8e9a67944c3a4ff7248ad3dab79f8 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 7 Aug 2012 17:31:56 +0200 Subject: [PATCH 01/14] update to firware + api version 2.4 --- recipes-sysmobts/femtobts-api/femtobts-api_git.bb | 4 ++-- recipes-sysmobts/firmware/sysmobts-firmware_git.bb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/recipes-sysmobts/femtobts-api/femtobts-api_git.bb b/recipes-sysmobts/femtobts-api/femtobts-api_git.bb index 9006c1dbdf..3e58b38a64 100644 --- a/recipes-sysmobts/femtobts-api/femtobts-api_git.bb +++ b/recipes-sysmobts/femtobts-api/femtobts-api_git.bb @@ -3,9 +3,9 @@ SECTION = "kernel" LICENSE = "CLOSED" SRC_URI = "git://git.sysmocom.de/sysmo-bts/femtobts-firmware.git;protocol=git;branch=master" -SRCREV = "6656cf9df31adb0d5514689db6f00119c237dea0" +SRCREV = "997a9439c8209d4b134c1fdbd2820c956f1cfe43" PV = "2.4+git${SRCPV}" -PR = "r6" +PR = "r7" S = "${WORKDIR}/git" diff --git a/recipes-sysmobts/firmware/sysmobts-firmware_git.bb b/recipes-sysmobts/firmware/sysmobts-firmware_git.bb index 3f400ef204..19603f0cd1 100644 --- a/recipes-sysmobts/firmware/sysmobts-firmware_git.bb +++ b/recipes-sysmobts/firmware/sysmobts-firmware_git.bb @@ -4,11 +4,11 @@ LICENSE = "CLOSED" SRC_URI = "git://git.sysmocom.de/sysmo-bts/femtobts-firmware;protocol=git;branch=master" -SRCREV = "6656cf9df31adb0d5514689db6f00119c237dea0" +SRCREV = "997a9439c8209d4b134c1fdbd2820c956f1cfe43" S = "${WORKDIR}/git" -PV = "1.0+git${SRCPV}" -PR = "r6" +PV = "2.4+git${SRCPV}" +PR = "r0" do_compile() { : From 6734e9a69536913ef5391846976f102b5b4cedd4 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 7 Aug 2012 17:33:51 +0200 Subject: [PATCH 02/14] add osmo-pcu for GPRS support on sysmobts --- recipes-apps/tasks/task-sysmocom-bts.bb | 3 ++- recipes-sysmobts/osmo-bts/osmo-bts_git.bb | 6 +++--- recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb diff --git a/recipes-apps/tasks/task-sysmocom-bts.bb b/recipes-apps/tasks/task-sysmocom-bts.bb index 246bd6c2d4..71502366ef 100644 --- a/recipes-apps/tasks/task-sysmocom-bts.bb +++ b/recipes-apps/tasks/task-sysmocom-bts.bb @@ -4,13 +4,14 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" DEPENDS = "virtual/kernel" ALLOW_EMPTY = "1" -PR = "r12" +PR = "r13" # TODO: re-add femtobts-calib after it went through the API migration RDEPENDS_task-sysmocom-bts = "\ osmo-bts \ osmo-bts-remote \ sysmobts-calib \ + osmo-pcu \ lmsensors-scripts \ " diff --git a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb index 1fcff2338a..eaaf54525f 100644 --- a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb +++ b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb @@ -4,10 +4,10 @@ LIC_FILES_CHKSUM="file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=master;name=osmobts;destsuffix=git \ git://git.osmocom.org/openbsc;protocol=git;branch=master;name=openbsc;destsuffix=openbsc" -SRCREV_osmobts = "b19592f7134baeae1541e55b6efead887739291d" -SRCREV_openbsc = "019f913ca383bda9256e273c06327041b1761330" +SRCREV_osmobts = "7c2427c020949c778f4a59443c16fae7b9e2d98e" +SRCREV_openbsc = "3217fa24120ee06705e2f7ea5faf449e8387d15c" PV = "0.0+git${SRCPV}" -PR = "r21" +PR = "r22" S = "${WORKDIR}/git" SRCREV_FORMAT = "openbsc-rosmobts" diff --git a/recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb b/recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb new file mode 100644 index 0000000000..53991de1e7 --- /dev/null +++ b/recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Osmocom PCU for sysmoBTS" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "git://git.osmocom.org/osmo-pcu.git;protocol=git;branch=jolly" +SRCREV = "da62859231cbe25ff7772e3d2389e15e5f8b4d8a" +PV = "0.0+git${SRCPV}" +PR = "r3" +S = "${WORKDIR}/git" + +DEPENDS = "libosmocore femtobts-api osmo-bts" + +EXTRA_OECONF += "--enable-sysmocom-bts" + +inherit autotools + +# Select the API version +inherit femtobts_api +CPPFLAGS += " ${BTS_HW_VERSION} " + From 2be99ac429874e82de89a838e8d02c27ec35322f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 13 Aug 2012 12:10:48 +0200 Subject: [PATCH 03/14] Add a new task 'task-gprscore' containing sgsn/ggsn/routing --- recipes-apps/tasks/task-gprscore.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 recipes-apps/tasks/task-gprscore.bb diff --git a/recipes-apps/tasks/task-gprscore.bb b/recipes-apps/tasks/task-gprscore.bb new file mode 100644 index 0000000000..98eb987e9e --- /dev/null +++ b/recipes-apps/tasks/task-gprscore.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Task for GPRS core network" +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-gprscore = "\ + openggsn \ + gprs-routing osmo-sgsn \ + sysmocom-ggsn-config \ + " + From d03aa9c51636ebccdd9e80a6580705fbac686e26 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 15 Aug 2012 16:35:58 +0200 Subject: [PATCH 04/14] osmo-bts,osmo-pcu: Both applications should be rebuild on osmocore upgrades Rebuild the BTS and PCU when the SOVERSION of a libosmocore library is changing. Do that by adding the ${META_TELEPHONY_OSMO_INC} into the PR. --- recipes-sysmobts/osmo-bts/osmo-bts_git.bb | 2 +- recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb index eaaf54525f..5c3df0a086 100644 --- a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb +++ b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb @@ -7,7 +7,7 @@ SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=master;name=os SRCREV_osmobts = "7c2427c020949c778f4a59443c16fae7b9e2d98e" SRCREV_openbsc = "3217fa24120ee06705e2f7ea5faf449e8387d15c" PV = "0.0+git${SRCPV}" -PR = "r22" +PR = "r22.${META_TELEPHONY_OSMO_INC}" S = "${WORKDIR}/git" SRCREV_FORMAT = "openbsc-rosmobts" diff --git a/recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb b/recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb index 53991de1e7..4a2a2a8658 100644 --- a/recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb +++ b/recipes-sysmobts/osmo-pcu/osmo-pcu_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git.osmocom.org/osmo-pcu.git;protocol=git;branch=jolly" SRCREV = "da62859231cbe25ff7772e3d2389e15e5f8b4d8a" PV = "0.0+git${SRCPV}" -PR = "r3" +PR = "r3.${META_TELEPHONY_OSMO_INC}" S = "${WORKDIR}/git" DEPENDS = "libosmocore femtobts-api osmo-bts" From 62e7f7f1bc1efafe06a0d7f6071369cbdff3e768 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 15 Aug 2012 16:40:03 +0200 Subject: [PATCH 05/14] osmo-bts: Build the latest version of osmo-bts This has a GSM band selection fix. GSM1900 band is now working properly. --- recipes-sysmobts/osmo-bts/osmo-bts_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb index 5c3df0a086..6a6523fc1c 100644 --- a/recipes-sysmobts/osmo-bts/osmo-bts_git.bb +++ b/recipes-sysmobts/osmo-bts/osmo-bts_git.bb @@ -4,10 +4,10 @@ LIC_FILES_CHKSUM="file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788" SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;branch=master;name=osmobts;destsuffix=git \ git://git.osmocom.org/openbsc;protocol=git;branch=master;name=openbsc;destsuffix=openbsc" -SRCREV_osmobts = "7c2427c020949c778f4a59443c16fae7b9e2d98e" +SRCREV_osmobts = "8c3d807b3fc785ffb18aeb97355150c92221e8a0" SRCREV_openbsc = "3217fa24120ee06705e2f7ea5faf449e8387d15c" PV = "0.0+git${SRCPV}" -PR = "r22.${META_TELEPHONY_OSMO_INC}" +PR = "r23.${META_TELEPHONY_OSMO_INC}" S = "${WORKDIR}/git" SRCREV_FORMAT = "openbsc-rosmobts" From 2d8f097946dedbcc3dfa1c13395de5ff615d8a29 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 15 Aug 2012 17:50:48 +0200 Subject: [PATCH 06/14] openvpn: Introduce OpenVPN from meta-openembedded --- recipes-extra/openvpn/openvpn/openvpn | 104 +++++++++++++++++++++++++ recipes-extra/openvpn/openvpn_2.1.3.bb | 28 +++++++ 2 files changed, 132 insertions(+) create mode 100644 recipes-extra/openvpn/openvpn/openvpn create mode 100644 recipes-extra/openvpn/openvpn_2.1.3.bb diff --git a/recipes-extra/openvpn/openvpn/openvpn b/recipes-extra/openvpn/openvpn/openvpn new file mode 100644 index 0000000000..28ab37b436 --- /dev/null +++ b/recipes-extra/openvpn/openvpn/openvpn @@ -0,0 +1,104 @@ +#!/bin/sh -e +# +# Original version by Robert Leslie +# , edited by iwj and cs +# Modified for openvpn by Alberto Gonzalez Iniesta +# Modified for restarting / starting / stopping single tunnels by Richard Mueller + +test $DEBIAN_SCRIPT_DEBUG && set -v -x + +DAEMON=/usr/sbin/openvpn +CONFIG_DIR=/etc/openvpn +test -x $DAEMON || exit 0 +test -d $CONFIG_DIR || exit 0 + +start_vpn () { + modprobe tun >/dev/null 2>&1 || true + $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \ + --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED->" + echo -n " $NAME" +} +stop_vpn () { + kill `cat $PIDFILE` || true + rm $PIDFILE +} + +case "$1" in +start) + echo -n "Starting openvpn:" + + if test -z $2 ; then + for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do + NAME=${CONFIG%%.conf} + start_vpn + done + else + if test -e $CONFIG_DIR/$2.conf ; then + NAME=$2 + start_vpn + else + echo -n " No such VPN: $2" + fi + fi + echo "." + + ;; +stop) + echo -n "Stopping openvpn:" + + if test -z $2 ; then + for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do + NAME=`echo $PIDFILE | cut -c18-` + NAME=${NAME%%.pid} + stop_vpn + echo -n " $NAME" + done + else + if test -e /var/run/openvpn.$2.pid ; then + PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null` + NAME=`echo $PIDFILE | cut -c18-` + NAME=${NAME%%.pid} + stop_vpn + echo -n " $NAME" + else + echo -n " No such VPN: $2" + fi + fi + echo "." + ;; +# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'. +reload|force-reload) + echo -n "Reloading openvpn:" + for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do + NAME=`echo $PIDFILE | cut -c18-` + NAME=${NAME%%.pid} +# If openvpn if running under a different user than root we'll need to restart + if egrep '^( |\t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then + stop_vpn + sleep 1 + start_vpn + echo -n "(restarted)" + else + kill -HUP `cat $PIDFILE` || true +# start-stop-daemon --stop --signal HUP --quiet --oknodo \ +# --exec $DAEMON --pidfile $PIDFILE + echo -n " $NAME" + fi + done + echo "." + ;; + +restart) + $0 stop $2 + sleep 1 + $0 start $2 + ;; +*) + echo "Usage: $0 {start|stop|reload|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + +# vim:set ai et sts=2 sw=2 tw=0: diff --git a/recipes-extra/openvpn/openvpn_2.1.3.bb b/recipes-extra/openvpn/openvpn_2.1.3.bb new file mode 100644 index 0000000000..fd481f6b1b --- /dev/null +++ b/recipes-extra/openvpn/openvpn_2.1.3.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "A full-featured SSL VPN solution via tun device." +HOMEPAGE = "http://openvpn.sourceforge.net" +SECTION = "console/network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c" +DEPENDS = "lzo openssl" +RRECOMMENDS_${PN} = "kernel-module-tun" + +PR = "r1" + +inherit autotools + +SRC_URI = "http://openvpn.net/release/openvpn-${PV}.tar.gz \ + file://openvpn" + +CFLAGS += "-fno-inline" + +# I want openvpn to be able to read password from file (hrw) +EXTRA_OECONF += "--enable-password-save" + +do_install_append() { + install -d ${D}/${sysconfdir}/init.d + install -d ${D}/${sysconfdir}/openvpn + install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d +} + +SRC_URI[md5sum] = "7486d3e270ba4b033e311d3e022a0ad7" +SRC_URI[sha257sum] = "5185181df2e6043bd667377bc92e36ea5a5bd7600af209654f109b6403ca5b36" From f5b92b4bf2f85fd80024a65050ecc52e29202ada Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 15 Aug 2012 21:34:25 +0200 Subject: [PATCH 07/14] u-boot: Upgrade to a version with the recovery mode --- recipes-sysmobts/uboot/u-boot_2011.03.bbappend | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-sysmobts/uboot/u-boot_2011.03.bbappend b/recipes-sysmobts/uboot/u-boot_2011.03.bbappend index 1cf3777174..7153cbb81a 100644 --- a/recipes-sysmobts/uboot/u-boot_2011.03.bbappend +++ b/recipes-sysmobts/uboot/u-boot_2011.03.bbappend @@ -1,9 +1,9 @@ SRC_URI = "git://git.sysmocom.de/sysmo-bts/u-boot;branch=v2011.12;protocol=git" -SRCREV = "e77802c0b8b818f502189f24e15f3ca47f1fa344" +SRCREV = "5ee9b97601d29a63f1eaa5dd7f9a393b31e67828" PV = "v2011.12+git${SRCPV}" S = "${WORKDIR}/git" -PRINC = "4" +PRINC = "5" LIC_FILES_CHKSUM = "file://COPYING;md5=1707d6db1d42237583f50183a5651ecb \ file://README;beginline=1;endline=22;md5=5ba4218ac89af7846802d0348df3fb90" From ba44e70c381ca761dd2cfe0b2c1dcd6f8b73d37e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 4 Aug 2012 18:17:40 +0800 Subject: [PATCH 08/14] sysmocom-bsc-e1: Introduce a sysmocom-bsc-e1 machine type --- conf/machine/sysmocom-bsc-e1.conf | 10 ++++++++++ conf/machine/sysmocom-bsc.conf | 1 + 2 files changed, 11 insertions(+) create mode 100644 conf/machine/sysmocom-bsc-e1.conf diff --git a/conf/machine/sysmocom-bsc-e1.conf b/conf/machine/sysmocom-bsc-e1.conf new file mode 100644 index 0000000000..451aae3299 --- /dev/null +++ b/conf/machine/sysmocom-bsc-e1.conf @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@NAME: common_pc +#@DESCRIPTION: Machine configuration for running a common x86 + +require sysmocom-bsc.conf + +MACHINEOVERRIDES = "${MACHINE}:sysmocom-bsc" +SERIAL_CONSOLE = "19200 ttyS0" +MACHINE_CONSOLE = "console=ttyS0,19200n8" + diff --git a/conf/machine/sysmocom-bsc.conf b/conf/machine/sysmocom-bsc.conf index 0fbf9213ea..3e3de7f468 100644 --- a/conf/machine/sysmocom-bsc.conf +++ b/conf/machine/sysmocom-bsc.conf @@ -19,6 +19,7 @@ KERNEL_IMAGETYPE = "bzImage" IMAGE_FSTYPES ?= "tar.gz ext3" SERIAL_CONSOLE = "38400 ttyS0" +MACHINE_CONSOLE = "console=ttyS0,38400n8" # We bypass swrast but we need it to be present for X to load correctly XSERVER ?= "xserver-xf86-dri-lite \ From bbbc805a2d0a563f4da42c9281c302f38f1bc738 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 20 Aug 2012 19:26:31 +0200 Subject: [PATCH 09/14] femtobts: Drop the old femtobts calibration utility A new version can be found inside the osmo-bts repository. --- .../femtobts-calib/femtobts-calib_git.bb | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 recipes-sysmobts/femtobts-calib/femtobts-calib_git.bb diff --git a/recipes-sysmobts/femtobts-calib/femtobts-calib_git.bb b/recipes-sysmobts/femtobts-calib/femtobts-calib_git.bb deleted file mode 100644 index bccb5b447a..0000000000 --- a/recipes-sysmobts/femtobts-calib/femtobts-calib_git.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "sysmocom calibration utility" -SECTION = "kernel" -LICENSE = "CLOSED" -DEPENDS = "femtobts-api" - -SRC_URI = "git://git@git.sysmocom.de/sysmobts/calib.git;protocol=ssh;branch=master" -SRCREV = "a54f9c42a22af8ce8b9843e4d5b33718a81dfd0b" -PV = "0.0+git${SRCPV}" -PR = "r1" -S = "${WORKDIR}/git" - -# Select the API version -inherit femtobts_api -CPPFLAGS += " ${BTS_HW_VERSION} " - - -do_compile() { - oe_runmake -} - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/femto-calib ${D}${bindir}/ -} From fd604f849710775a1f5961159cce486bcbe843c6 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 20 Aug 2012 19:30:02 +0200 Subject: [PATCH 10/14] sysmocom-*-image: Add the IP and E1 image to this layer Add a BSC IP and BSC E1 image to the meta-sysmocom-bsp. --- .../sysmocom-bsc-e1-image-directdisk.bb | 20 +++++++++++++++++++ recipes-apps/images/sysmocom-bsc-e1-image.bb | 10 ++++++++++ .../sysmocom-bsc-ip-image-directdisk.bb | 20 +++++++++++++++++++ recipes-apps/images/sysmocom-bsc-ip-image.bb | 7 +++++++ 4 files changed, 57 insertions(+) create mode 100644 recipes-apps/images/sysmocom-bsc-e1-image-directdisk.bb create mode 100644 recipes-apps/images/sysmocom-bsc-e1-image.bb create mode 100644 recipes-apps/images/sysmocom-bsc-ip-image-directdisk.bb create mode 100644 recipes-apps/images/sysmocom-bsc-ip-image.bb diff --git a/recipes-apps/images/sysmocom-bsc-e1-image-directdisk.bb b/recipes-apps/images/sysmocom-bsc-e1-image-directdisk.bb new file mode 100644 index 0000000000..3ab18d558d --- /dev/null +++ b/recipes-apps/images/sysmocom-bsc-e1-image-directdisk.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "sysmocom BSC/E1 image" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +LICENSE = "MIT" + +inherit boot-directdisk + + +do_bootdirectdisk_prepend () { + import bb + fstypes = bb.data.getVar('IMAGE_FSTYPES', d, True) + if 'ext3' not in fstypes: + bb.msg.fatal(bb.msg.domain.Build, "ext3 not in IMAGE_FSTYPES") +} + +ROOTFS = "${DEPLOY_DIR_IMAGE}/sysmocom-bsc-e1-image-${MACHINE}.ext3" +do_bootdirectdisk[depends] += "sysmocom-bsc-e1-image:do_rootfs" + + diff --git a/recipes-apps/images/sysmocom-bsc-e1-image.bb b/recipes-apps/images/sysmocom-bsc-e1-image.bb new file mode 100644 index 0000000000..f3491eaf6c --- /dev/null +++ b/recipes-apps/images/sysmocom-bsc-e1-image.bb @@ -0,0 +1,10 @@ +IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${ROOTFS_PKGMANAGE} task-osmocom task-sysmocom \ + task-sysmocom-debug task-sysmocom-tools task-sysmocom-e1 task-gprscore \ + e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-e2fsck e2fsprogs-fsck \ + kernel-module-nls-iso8859-1 kernel-module-nls-cp437" +IMAGE_LINGUAS = " " +LICENSE = "MIT" + +inherit core-image + +IMAGE_ROOTFS_SIZE = "524288" diff --git a/recipes-apps/images/sysmocom-bsc-ip-image-directdisk.bb b/recipes-apps/images/sysmocom-bsc-ip-image-directdisk.bb new file mode 100644 index 0000000000..0ebfa93964 --- /dev/null +++ b/recipes-apps/images/sysmocom-bsc-ip-image-directdisk.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "sysmocom BSC/IP image" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +LICENSE = "MIT" + +inherit boot-directdisk + + +do_bootdirectdisk_prepend () { + import bb + fstypes = bb.data.getVar('IMAGE_FSTYPES', d, True) + if 'ext3' not in fstypes: + bb.msg.fatal(bb.msg.domain.Build, "ext3 not in IMAGE_FSTYPES") +} + +ROOTFS = "${DEPLOY_DIR_IMAGE}/sysmocom-bsc-ip-image-${MACHINE}.ext3" +do_bootdirectdisk[depends] += "sysmocom-bsc-ip-image:do_rootfs" + + diff --git a/recipes-apps/images/sysmocom-bsc-ip-image.bb b/recipes-apps/images/sysmocom-bsc-ip-image.bb new file mode 100644 index 0000000000..c52f824dac --- /dev/null +++ b/recipes-apps/images/sysmocom-bsc-ip-image.bb @@ -0,0 +1,7 @@ +IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} ${ROOTFS_PKGMANAGE} task-osmocom task-sysmocom task-sysmocom-debug task-sysmocom-tools task-gprscore sysmocom-udhcpd-config busybox-udhcpd" +IMAGE_LINGUAS = " " +LICENSE = "MIT" + +inherit core-image + +IMAGE_ROOTFS_SIZE = "262144" From d9150d375c7dc7a25f9724f9980db878941b0ede Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 20 Aug 2012 19:34:05 +0200 Subject: [PATCH 11/14] openggsn-config: Add the GGSN configuration to this layer --- .../openggsn-config/files/sysmobsc/ggsn.conf | 88 +++++++++++++++++++ .../files/sysmobsc/gprs_routing | 23 +++++ .../files/sysmobts-v1/ggsn.conf | 88 +++++++++++++++++++ .../files/sysmobts-v1/gprs_routing | 23 +++++ .../files/sysmobts-v2/ggsn.conf | 88 +++++++++++++++++++ .../files/sysmobts-v2/gprs_routing | 23 +++++ .../openggsn-config/gprs-routing_0.1.bb | 20 +++++ .../sysmocom-ggsn-config_0.1.bb | 11 +++ 8 files changed, 364 insertions(+) create mode 100644 recipes-config/openggsn-config/files/sysmobsc/ggsn.conf create mode 100755 recipes-config/openggsn-config/files/sysmobsc/gprs_routing create mode 100644 recipes-config/openggsn-config/files/sysmobts-v1/ggsn.conf create mode 100755 recipes-config/openggsn-config/files/sysmobts-v1/gprs_routing create mode 100644 recipes-config/openggsn-config/files/sysmobts-v2/ggsn.conf create mode 100755 recipes-config/openggsn-config/files/sysmobts-v2/gprs_routing create mode 100644 recipes-config/openggsn-config/gprs-routing_0.1.bb create mode 100644 recipes-config/openggsn-config/sysmocom-ggsn-config_0.1.bb diff --git a/recipes-config/openggsn-config/files/sysmobsc/ggsn.conf b/recipes-config/openggsn-config/files/sysmobsc/ggsn.conf new file mode 100644 index 0000000000..138e7af738 --- /dev/null +++ b/recipes-config/openggsn-config/files/sysmobsc/ggsn.conf @@ -0,0 +1,88 @@ +############################################################################## +# +# Sample ggsn configuration file +# +############################################################################## + +# TAG: fg +# Include this flag if process is to run in the foreground +# +#fg + +# TAG: debug +# Include this flag to include debug information. +#debug + + +# TAG: conf +# Configuration file to use. This file is the configuration file, +# so changing this parameter in the configuration file does not make +# sense. Use it on the command line instead. + +# TAG: pidfile +# File to store information about the process id of the program. +# The program must have write access to this file/directory. +#pidfile /var/run/ggsn.pid + +# TAG: statedir +# Directory to use for nonvolatile storage. +# The program must have write access to this directory. +#statedir /var/lib/ggsn/ + + +# TAG: listen +# Specifies the local IP address to listen to +#listen 10.0.0.240 +listen 10.23.123.1 + +# TAG: net +# IP network address of external packet data network +# Used to set up network interface. +net 10.23.42.0/24 + +# TAG: ipup +# Script executed after network interface has been brought up. +# Executed with the following parameters: +#ipup /etc/ggsn/ip-up + +# TAG: ipdown +# Script executed after network interface has been taken down. +# Executed with the following parameters: +#ipdown /etc/ggsn/ip-down + +# TAG: dynip +# Dynamic IP address pool. +# Used for allocation of dynamic IP address when address is not given +# by HLR. +# If this option is not given then the net option is used as a substitute. +#dynip 192.168.0.0/24 + +# TAG: statip +# Use of this tag is currently UNSUPPORTED +# Static IP address pool. +# Used for allocation of static IP address by means of HLR. +#statip 192.168.1.0/24 + +# TAG: pcodns1 +# Protocol configuration option domain name system server 1. +pcodns1 8.8.8.8 + +# TAG: pcodns2 +# Protocol configuration option domain name system server 2. +#pcodns2 0.0.0.0 + +# TAG: timelimit +# Exit after timelimit seconds. +# Setting timelimit to zero will cause the program not to exit. +#timelimit 0 + +# TAG: apn +# Use of this tag is EXPERIMENTAL +# Access point name to connect to when run in client mode. +#apn internet + +# TAG: qos +# Use of this tag is EXPERIMENTAL +# Requested Quality of Service used when run in client mode. +# 3 bytes corresponding to ???? +#qos 0x0b921f diff --git a/recipes-config/openggsn-config/files/sysmobsc/gprs_routing b/recipes-config/openggsn-config/files/sysmobsc/gprs_routing new file mode 100755 index 0000000000..016b425b7b --- /dev/null +++ b/recipes-config/openggsn-config/files/sysmobsc/gprs_routing @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME=gprs_routing + +set -e + +case "$1" in + start) + echo 1 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE + echo "Enabled masquerading" + ;; + stop) + echo 0 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 +esac + +exit 0 diff --git a/recipes-config/openggsn-config/files/sysmobts-v1/ggsn.conf b/recipes-config/openggsn-config/files/sysmobts-v1/ggsn.conf new file mode 100644 index 0000000000..138e7af738 --- /dev/null +++ b/recipes-config/openggsn-config/files/sysmobts-v1/ggsn.conf @@ -0,0 +1,88 @@ +############################################################################## +# +# Sample ggsn configuration file +# +############################################################################## + +# TAG: fg +# Include this flag if process is to run in the foreground +# +#fg + +# TAG: debug +# Include this flag to include debug information. +#debug + + +# TAG: conf +# Configuration file to use. This file is the configuration file, +# so changing this parameter in the configuration file does not make +# sense. Use it on the command line instead. + +# TAG: pidfile +# File to store information about the process id of the program. +# The program must have write access to this file/directory. +#pidfile /var/run/ggsn.pid + +# TAG: statedir +# Directory to use for nonvolatile storage. +# The program must have write access to this directory. +#statedir /var/lib/ggsn/ + + +# TAG: listen +# Specifies the local IP address to listen to +#listen 10.0.0.240 +listen 10.23.123.1 + +# TAG: net +# IP network address of external packet data network +# Used to set up network interface. +net 10.23.42.0/24 + +# TAG: ipup +# Script executed after network interface has been brought up. +# Executed with the following parameters: +#ipup /etc/ggsn/ip-up + +# TAG: ipdown +# Script executed after network interface has been taken down. +# Executed with the following parameters: +#ipdown /etc/ggsn/ip-down + +# TAG: dynip +# Dynamic IP address pool. +# Used for allocation of dynamic IP address when address is not given +# by HLR. +# If this option is not given then the net option is used as a substitute. +#dynip 192.168.0.0/24 + +# TAG: statip +# Use of this tag is currently UNSUPPORTED +# Static IP address pool. +# Used for allocation of static IP address by means of HLR. +#statip 192.168.1.0/24 + +# TAG: pcodns1 +# Protocol configuration option domain name system server 1. +pcodns1 8.8.8.8 + +# TAG: pcodns2 +# Protocol configuration option domain name system server 2. +#pcodns2 0.0.0.0 + +# TAG: timelimit +# Exit after timelimit seconds. +# Setting timelimit to zero will cause the program not to exit. +#timelimit 0 + +# TAG: apn +# Use of this tag is EXPERIMENTAL +# Access point name to connect to when run in client mode. +#apn internet + +# TAG: qos +# Use of this tag is EXPERIMENTAL +# Requested Quality of Service used when run in client mode. +# 3 bytes corresponding to ???? +#qos 0x0b921f diff --git a/recipes-config/openggsn-config/files/sysmobts-v1/gprs_routing b/recipes-config/openggsn-config/files/sysmobts-v1/gprs_routing new file mode 100755 index 0000000000..016b425b7b --- /dev/null +++ b/recipes-config/openggsn-config/files/sysmobts-v1/gprs_routing @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME=gprs_routing + +set -e + +case "$1" in + start) + echo 1 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE + echo "Enabled masquerading" + ;; + stop) + echo 0 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 +esac + +exit 0 diff --git a/recipes-config/openggsn-config/files/sysmobts-v2/ggsn.conf b/recipes-config/openggsn-config/files/sysmobts-v2/ggsn.conf new file mode 100644 index 0000000000..138e7af738 --- /dev/null +++ b/recipes-config/openggsn-config/files/sysmobts-v2/ggsn.conf @@ -0,0 +1,88 @@ +############################################################################## +# +# Sample ggsn configuration file +# +############################################################################## + +# TAG: fg +# Include this flag if process is to run in the foreground +# +#fg + +# TAG: debug +# Include this flag to include debug information. +#debug + + +# TAG: conf +# Configuration file to use. This file is the configuration file, +# so changing this parameter in the configuration file does not make +# sense. Use it on the command line instead. + +# TAG: pidfile +# File to store information about the process id of the program. +# The program must have write access to this file/directory. +#pidfile /var/run/ggsn.pid + +# TAG: statedir +# Directory to use for nonvolatile storage. +# The program must have write access to this directory. +#statedir /var/lib/ggsn/ + + +# TAG: listen +# Specifies the local IP address to listen to +#listen 10.0.0.240 +listen 10.23.123.1 + +# TAG: net +# IP network address of external packet data network +# Used to set up network interface. +net 10.23.42.0/24 + +# TAG: ipup +# Script executed after network interface has been brought up. +# Executed with the following parameters: +#ipup /etc/ggsn/ip-up + +# TAG: ipdown +# Script executed after network interface has been taken down. +# Executed with the following parameters: +#ipdown /etc/ggsn/ip-down + +# TAG: dynip +# Dynamic IP address pool. +# Used for allocation of dynamic IP address when address is not given +# by HLR. +# If this option is not given then the net option is used as a substitute. +#dynip 192.168.0.0/24 + +# TAG: statip +# Use of this tag is currently UNSUPPORTED +# Static IP address pool. +# Used for allocation of static IP address by means of HLR. +#statip 192.168.1.0/24 + +# TAG: pcodns1 +# Protocol configuration option domain name system server 1. +pcodns1 8.8.8.8 + +# TAG: pcodns2 +# Protocol configuration option domain name system server 2. +#pcodns2 0.0.0.0 + +# TAG: timelimit +# Exit after timelimit seconds. +# Setting timelimit to zero will cause the program not to exit. +#timelimit 0 + +# TAG: apn +# Use of this tag is EXPERIMENTAL +# Access point name to connect to when run in client mode. +#apn internet + +# TAG: qos +# Use of this tag is EXPERIMENTAL +# Requested Quality of Service used when run in client mode. +# 3 bytes corresponding to ???? +#qos 0x0b921f diff --git a/recipes-config/openggsn-config/files/sysmobts-v2/gprs_routing b/recipes-config/openggsn-config/files/sysmobts-v2/gprs_routing new file mode 100755 index 0000000000..016b425b7b --- /dev/null +++ b/recipes-config/openggsn-config/files/sysmobts-v2/gprs_routing @@ -0,0 +1,23 @@ +#!/bin/sh + +NAME=gprs_routing + +set -e + +case "$1" in + start) + echo 1 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE + echo "Enabled masquerading" + ;; + stop) + echo 0 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 +esac + +exit 0 diff --git a/recipes-config/openggsn-config/gprs-routing_0.1.bb b/recipes-config/openggsn-config/gprs-routing_0.1.bb new file mode 100644 index 0000000000..c6250b02af --- /dev/null +++ b/recipes-config/openggsn-config/gprs-routing_0.1.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "OpenGGSN GPRS routing to the real world" +RDEPENDS = "iptables kernel-module-ipt-masquerade" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +SRC_URI = "file://gprs_routing" + + +inherit update-rc.d + +INITSCRIPT_PACKAGES = "${PN}" +INITSCRIPT_NAME_${PN} = "gprs_routing" +INITSCRIPT_PARAMS_${PN} = "defaults 28 28" + + +do_install() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/gprs_routing ${D}${sysconfdir}/init.d/gprs_routing +} diff --git a/recipes-config/openggsn-config/sysmocom-ggsn-config_0.1.bb b/recipes-config/openggsn-config/sysmocom-ggsn-config_0.1.bb new file mode 100644 index 0000000000..637719cf3e --- /dev/null +++ b/recipes-config/openggsn-config/sysmocom-ggsn-config_0.1.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "OpenGGSN config by sysmocom" +SRC_URI = "file://ggsn.conf" +LICENSE = "closed" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58" + +do_install() { + install -d ${D}${sysconfdir} + install -m 0660 ${WORKDIR}/ggsn.conf ${D}${sysconfdir}/ +} + +CONFFILES_${PN} = "${sysconfdir}/ggsn.conf" From c35fa18841f78c9a4b2f3c18a64f1a62a278ebcd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 20 Aug 2012 21:25:04 +0200 Subject: [PATCH 12/14] linux-sysmocom.inc: Add quotes around the value for newer versions of bitbake BitBake is finally more picky about variable assignments. Add the necessary quotes. --- recipes-bsp/linux/linux-sysmocom.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/linux/linux-sysmocom.inc b/recipes-bsp/linux/linux-sysmocom.inc index 0aea7c20bd..b60586db2f 100644 --- a/recipes-bsp/linux/linux-sysmocom.inc +++ b/recipes-bsp/linux/linux-sysmocom.inc @@ -5,7 +5,7 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" # Set this to 'preempt_rt' in the local.conf if you want a real time kernel -LINUX_KERNEL_TYPE ?= standard +LINUX_KERNEL_TYPE ?= "standard" module_autoload_mISDN_l1loop = "mISDN_l1loop" module_autoload_mISDN_dsp = "mISDN_dsp" From a4331e9beefdbe542d94969469e78144c51130bd Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 20 Aug 2012 23:41:48 +0200 Subject: [PATCH 13/14] openggsn-config: Fix the name of the ggsn.conf for the sysmocom-bsc --- .../openggsn-config/files/{sysmobsc => sysmocom-bsc}/ggsn.conf | 0 .../openggsn-config/files/{sysmobsc => sysmocom-bsc}/gprs_routing | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename recipes-config/openggsn-config/files/{sysmobsc => sysmocom-bsc}/ggsn.conf (100%) rename recipes-config/openggsn-config/files/{sysmobsc => sysmocom-bsc}/gprs_routing (100%) diff --git a/recipes-config/openggsn-config/files/sysmobsc/ggsn.conf b/recipes-config/openggsn-config/files/sysmocom-bsc/ggsn.conf similarity index 100% rename from recipes-config/openggsn-config/files/sysmobsc/ggsn.conf rename to recipes-config/openggsn-config/files/sysmocom-bsc/ggsn.conf diff --git a/recipes-config/openggsn-config/files/sysmobsc/gprs_routing b/recipes-config/openggsn-config/files/sysmocom-bsc/gprs_routing similarity index 100% rename from recipes-config/openggsn-config/files/sysmobsc/gprs_routing rename to recipes-config/openggsn-config/files/sysmocom-bsc/gprs_routing From d6415c8069714519ab242f7bb1d493d7744529cb Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 21 Aug 2012 15:14:47 +0200 Subject: [PATCH 14/14] sysmocom: Make dvnixload and ubl accessible via public git dvnixload and ubl are available via public git. --- recipes-sysmobts/dvnixload/dvnixload_0.2.6.bb | 2 +- recipes-sysmobts/ubl/ubl_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-sysmobts/dvnixload/dvnixload_0.2.6.bb b/recipes-sysmobts/dvnixload/dvnixload_0.2.6.bb index cd2cfce156..dc2befa98b 100644 --- a/recipes-sysmobts/dvnixload/dvnixload_0.2.6.bb +++ b/recipes-sysmobts/dvnixload/dvnixload_0.2.6.bb @@ -4,7 +4,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=20;md5=f2b40a2eb5162af4c3cb20428e72f921" SRCREV = "354c2e5665e760bf1765a79aa4b83a70954e87e4" -SRC_URI = "git://git@git.sysmocom.de/sysmo-bts/dvnixload;protocol=ssh;branch=master" +SRC_URI = "git://git.sysmocom.de/sysmo-bts/dvnixload;protocol=git;branch=master" PV = "v0.2.6+git${SRCPV}" PR = "r1" S = "${WORKDIR}/git" diff --git a/recipes-sysmobts/ubl/ubl_git.bb b/recipes-sysmobts/ubl/ubl_git.bb index 3b20758605..9a3940e4ec 100644 --- a/recipes-sysmobts/ubl/ubl_git.bb +++ b/recipes-sysmobts/ubl/ubl_git.bb @@ -6,7 +6,7 @@ PRIORITY = "optional" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://ubl.c;beginline=1;endline=22;md5=806283bb3c475d9082e41f09020373ff" -SRC_URI = "git://git@git.sysmocom.de/sysmo-bts/ubl;protocol=ssh;branch=master" +SRC_URI = "git://git.sysmocom.de/sysmo-bts/ubl;protocol=git;branch=master" SRCREV = "d04f24974a5b1e24cb9414ebc2e84a91848982c4" PV = "v0.2.11+git${SRCPV}" PR = "r2"