diff options
author | Swift Geek | 2015-06-10 01:49:56 +0200 |
---|---|---|
committer | Swift Geek | 2015-06-10 01:49:56 +0200 |
commit | 4020e2c54c8c8b5970eab2f67d1789fab13b400b (patch) | |
tree | 4eea0f8e1e11f899e4ecbddeda5c613b59659b1a | |
download | aur-4020e2c54c8c8b5970eab2f67d1789fab13b400b.tar.gz |
AUR4 import
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | 8a8796802bc497f00b6a27ca14e2be0c9f9ec176.patch | 59 | ||||
-rw-r--r-- | PKGBUILD | 87 |
3 files changed, 174 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4cdebc5c7685 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = osmocombb-git + pkgdesc = An Free Software / Open Source GSM Baseband software implementation. + pkgver = a + pkgrel = 3 + url = http://bb.osmocom.org/ + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = shtool + makedepends = libtool + makedepends = autoconf + makedepends = git + makedepends = make + makedepends = gcc + makedepends = pkg-config + makedepends = patch + depends = libosmocore + depends = python2 + optdepends = gpsd + optdepends = cp210x-program + options = !strip + source = git+http://cgit.osmocom.org/cgit/osmocom-bb + source = 8a8796802bc497f00b6a27ca14e2be0c9f9ec176.patch + md5sums = SKIP + md5sums = 94bb3ff0cdff13d7a8163c7d2ee40a35 + +pkgname = osmocombb-git + diff --git a/8a8796802bc497f00b6a27ca14e2be0c9f9ec176.patch b/8a8796802bc497f00b6a27ca14e2be0c9f9ec176.patch new file mode 100644 index 000000000000..4e13363ddd9a --- /dev/null +++ b/8a8796802bc497f00b6a27ca14e2be0c9f9ec176.patch @@ -0,0 +1,59 @@ +From 8a8796802bc497f00b6a27ca14e2be0c9f9ec176 Mon Sep 17 00:00:00 2001 +From: Andreas Eversberg <jolly@eversberg.eu> +Date: Wed, 19 Jun 2013 07:55:21 +0000 +Subject: osmocon: Improve performance by handling several serial bytes at a time + +--- +diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c +index 1066291..648d416 100644 +--- a/src/host/osmocon/osmocon.c ++++ b/src/host/osmocon/osmocon.c +@@ -655,13 +655,24 @@ static int handle_write_dnload(void) + + static int handle_sercomm_write(void) + { +- uint8_t c; ++ uint8_t buffer[256]; ++ int i, count = 0, end = 0; + +- if (sercomm_drv_pull(&c) != 0) { +- if (write(dnload.serial_fd.fd, &c, 1) != 1) ++ for (i = 0; i < sizeof(buffer); i++) { ++ if (sercomm_drv_pull(&buffer[i]) == 0) { ++ end = 1; ++ break; ++ } ++ count++; ++ } ++ ++ if (count) { ++ if (write(dnload.serial_fd.fd, buffer, count) != count) + perror("short write"); +- } else +- dnload.serial_fd.when &= ~BSC_FD_WRITE; ++ } ++ ++ if (end) ++ dnload.serial_fd.when &= ~BSC_FD_WRITE; + + return 0; + } +@@ -1154,13 +1165,13 @@ static int serial_read(struct osmo_fd *fd, unsigned int flags) + if (flags & BSC_FD_READ) { + switch (dnload.mode) { + case MODE_ROMLOAD: +- rc = handle_read_romload(); ++ while ((rc = handle_read_romload()) > 0); + break; + case MODE_MTK: +- rc = handle_read_mtk(); ++ while ((rc = handle_read_mtk()) > 0); + break; + default: +- rc = handle_read(); ++ while ((rc = handle_read()) > 0); + break; + } + if (rc == 0) +-- +cgit v0.9.1 diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..74a880e73c51 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,87 @@ +# Maintainer: Swift Geek +# Contributor: onny <onny@project-insanity.org> + +#TODO: Clean legacy/ancient lines +#TODO: Delete *.status and *.log file and similar crap +#TODO: Fix "burst_ind" - has bad deps and links against weird paths and libs etc… mostly upstream issues +#TODO: Fix package for good - is there no make install or WTF!?. Also include includes and install in proper dirs… maybe fix this upstream? +#PKGEXT='.pkg.tar.gz' +pkgname=osmocombb-git +pkgver=a +pkgrel=3 +pkgdesc="An Free Software / Open Source GSM Baseband software implementation." +arch=('i686' 'x86_64') +url="http://bb.osmocom.org/" +license="GPL3" +#TODO: test if python2 is makedepend or regular dep +makedepends=('shtool' 'libtool' 'autoconf' 'git' 'make' 'gcc' 'pkg-config' 'patch') +depends=('libosmocore' 'python2') +optdepends=('gpsd' 'cp210x-program') +options=('!strip') #TODO: Not sure about !emptydirs +source=('git+http://cgit.osmocom.org/cgit/osmocom-bb' '8a8796802bc497f00b6a27ca14e2be0c9f9ec176.patch') +# Uncomment line below and comment one above for higher baudrates using the testing burst_ind with the cp210x usb-serial-adapter: +#source=('git+http://cgit.osmocom.org/cgit/osmocom-bb#branch=sylvain/burst_ind') +md5sums=('SKIP' '94bb3ff0cdff13d7a8163c7d2ee40a35') + +pkgver() { + cd "$srcdir/osmocom-bb" + __pkgver="$(git describe --always)" + __pkgver="${__pkgver//-/.}" + echo "${__pkgver#*_v}" +} + +prepare() { + cd "$srcdir/osmocom-bb" + msg2 "Starting to patch..." + # Reverse commit "improving" osmocon + # patch -p1 -R < "$srcdir/8a8796802bc497f00b6a27ca14e2be0c9f9ec176.patch" + echo "patching src/host/layer23/configure.ac ... " && sed -i 's/-D_HAVE_GPSD/-D_HAVE_GPSD -lgps/' src/host/layer23/configure.ac + if [[ "${source[0]}" =~ ^.*burst_ind$ ]] ; then + echo "applying patches for burst_ind branch ..." + echo "patching src/host/osmocon/osmocon.c ... " && sed -i '64i#define I_HAVE_A_CP210x' src/host/osmocon/osmocon.c + fi + msg2 "Starting to patch..." + find . -name "*.py" | xargs sed -i '1s"^#!.\+$"#!/usr/bin/python2"' + + # Uncomment this line if you want to enable Tx (Transmit) Support. + #echo 'CFLAGS += -DCONFIG_TX_ENABLE' >> "${srcdir}/osmocom-bb/src/target/firmware/Makefile" + + # Uncomment this line if you want to write to flash. + #echo 'CFLAGS += -DCONFIG_FLASH_WRITE' >> "${srcdir}/osmocom-bb/src/target/firmware/Makefile" + + # Uncomment this line if you want to write to flash, including the bootloader. + #echo 'CFLAGS += -DCONFIG_FLASH_WRITE_LOADER' >> "${srcdir}/osmocom-bb/src/target/firmware/Makefile" + +} + +build() { + cd "$srcdir/osmocom-bb" + + msg2 "Starting make..." + + cd "$srcdir/osmocom-bb/src" + make +} + +package () { + cd "$srcdir/osmocom-bb" + + find . \( -name "*.log" -name "*.status" -name "*.m4" -name "configure*" -name "COPYING" -name "*.c" -o -name "*.h" -o -name "*.in" -o -name "*.am" -o -name "*.o" -o -name "Makefile*" \) -print | xargs -i rm {} + + mkdir -p $pkgdir/opt/osmocombb/host/osmocon + mkdir -p $pkgdir/opt/osmocombb/host/layer23 + mkdir -p $pkgdir/opt/osmocombb/host/rita_pll + + cp -r $srcdir/osmocom-bb/src/* $pkgdir/opt/osmocombb/ + cp -ar $srcdir/osmocom-bb/doc $pkgdir/opt/osmocombb/ + cp -ar $srcdir/osmocom-bb/include $pkgdir/opt/osmocombb/ + + mkdir -p $pkgdir/usr/bin + + ln -s /opt/osmocombb/host/osmocon/osmocon $pkgdir/usr/bin/ + ln -s /opt/osmocombb/host/osmocon/osmoload $pkgdir/usr/bin/ + ln -s /opt/osmocombb/host/layer23/src/mobile/mobile $pkgdir/usr/bin/ + + +} + |