aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2012-11-28 15:46:38 +0100
committerCarlo Landmeter <clandmeter@gmail.com>2012-11-28 15:46:38 +0100
commitbfb6ba6725eab5a4197a1383c11a56c0297dbcab (patch)
tree2dbed75278c9f89fce193e7756f1e7cbaf65ea94 /testing
parent019f7cab6f96dc19b18f5ea5f5e68e8a9060c178 (diff)
downloadaports-bfb6ba6725eab5a4197a1383c11a56c0297dbcab.tar.bz2
aports-bfb6ba6725eab5a4197a1383c11a56c0297dbcab.tar.xz
testing/crystalhd-git: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/crystalhd-git/APKBUILD108
-rw-r--r--testing/crystalhd-git/crystalhd-use_8_DMA_buffers-0.1.patch11
2 files changed, 119 insertions, 0 deletions
diff --git a/testing/crystalhd-git/APKBUILD b/testing/crystalhd-git/APKBUILD
new file mode 100644
index 0000000000..e685931b0b
--- /dev/null
+++ b/testing/crystalhd-git/APKBUILD
@@ -0,0 +1,108 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+
+_flavor=${FLAVOR:-grsec}
+_realname=crystalhd-git
+_name=$_realname-$_flavor
+
+_kpkg=linux-$_flavor
+_kver=3.6.8
+_kpkgrel=1
+
+_mypkgrel=0
+_date=20121126
+
+# source the kernel version
+if [ -f ../../main/linux-$_flavor/APKBUILD ]; then
+ . ../../main/linux-$_flavor/APKBUILD
+ [ "$_kver" != "$pkgver" ] && die "$_name: Please update _kver to $pkgver"
+ [ "$_kpkgrel" != "$pkgrel" ] && die "$_name: Please update _kpkgrel to $pkgrel"
+fi
+
+_kernelver=$_kver-r$_kpkgrel
+_abi_release=$_kver-${_flavor}
+
+pkgname=$_name
+pkgver=$_kver
+pkgrel=$(($_kpkgrel + $_mypkgrel))
+pkgdesc="Broadcom CrystalHD kernel driver"
+url="http://git.linuxtv.org/jarod/crystalhd.git"
+arch="all"
+license="GPL2"
+depends=""
+depends_dev=""
+makedepends="$depends_dev automake autoconf linux-$_flavor-dev=$_kernelver"
+install=""
+subpackages="$pkgname-dev libcrystalhd"
+source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-${_date}.tar.gz
+ crystalhd-use_8_DMA_buffers-0.1.patch"
+
+_giturl="git://linuxtv.org/jarod/crystalhd.git"
+_upload="dev.alpinelinux.org:/archive/$pkgname/"
+_libdir="$srcdir/$pkgname-$_date/linux_lib/libcrystalhd"
+_kerdir="$srcdir/$pkgname-$_date/driver/linux"
+_builddir="$srcdir/$pkgname-$_date"
+
+snapshot() {
+ _date=$(date +%Y%m%d)
+ local _pkg=$pkgname-$_date.tar.gz
+ mkdir -p "$srcdir"
+ cd "$srcdir"
+ ls -alh
+ rm -rf crystalhd.git
+ git clone --depth=1 --bare $_giturl || return 1
+ git --git-dir ${_giturl##*/} archive -o $_pkg \
+ --prefix=$pkgname-$_date/ HEAD \
+ || return 1
+ msg "New snapshot: $_pkg"
+ msg "Uploading to $_upload"
+ rsync -ave ssh $_pkg $_upload || return 1
+ cd ..
+ sed -i -e "s/^_date=.*/_date=$_date/" APKBUILD || return 1
+}
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_libdir"
+ msg "building library"
+ make || return 1
+ cd "$_kerdir"
+ msg "building module"
+ export GCC_SPECS=/usr/share/gcc/hardenednopie.specs
+ autoconf
+ ./configure --prefix=/usr \
+ --with-kernel-path=/usr/src/linux-headers-${_abi_release}
+ make || return 1
+}
+
+package() {
+ cd "$_kerdir"
+ mkdir -p "$pkgdir"/lib/modules/"$_abi_release"/kernel/drivers/video/broadcom
+ install -m 0644 crystalhd.ko \
+ "$pkgdir"/lib/modules/"$_abi_release"/kernel/drivers/video/broadcom
+ cd "$_libdir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+dev() {
+ default_dev
+}
+
+libcrystalhd() {
+ pkgdesc="Broadcom CrystalHD kernel library"
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/lib \
+ "$subpkgdir"/usr/
+}
+
+md5sums="3459e3b206702cea539f09fb9abbb4f8 crystalhd-git-grsec-20121126.tar.gz
+e617ef3212dd46749d61247b5cbb51bd crystalhd-use_8_DMA_buffers-0.1.patch"
diff --git a/testing/crystalhd-git/crystalhd-use_8_DMA_buffers-0.1.patch b/testing/crystalhd-git/crystalhd-use_8_DMA_buffers-0.1.patch
new file mode 100644
index 0000000000..1b9150ea7b
--- /dev/null
+++ b/testing/crystalhd-git/crystalhd-use_8_DMA_buffers-0.1.patch
@@ -0,0 +1,11 @@
+--- a/include/bc_dts_glob_lnx.h
++++ b/include/bc_dts_glob_lnx.h
+@@ -76,7 +76,7 @@
+ BC_LINK_MAX_OPENS = 3, /* Maximum simultaneous opens*/
+ BC_LINK_MAX_SGLS = 1024, /* Maximum SG elements 4M/4K */
+ BC_TX_LIST_CNT = 2, /* Max Tx DMA Rings */
+- BC_RX_LIST_CNT = 16, /* Max Rx DMA Rings*/
++ BC_RX_LIST_CNT = 8, /* Max Rx DMA Rings*/
+ BC_PROC_OUTPUT_TIMEOUT = 2000, /* Milliseconds */
+ BC_INFIFO_THRESHOLD = 0x10000,
+ };