summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--system/rtirq/README38
-rw-r--r--system/rtirq/doinst.sh14
-rw-r--r--system/rtirq/rtirq.SlackBuild73
-rw-r--r--system/rtirq/rtirq.info10
-rw-r--r--system/rtirq/slack-desc19
5 files changed, 154 insertions, 0 deletions
diff --git a/system/rtirq/README b/system/rtirq/README
new file mode 100644
index 0000000000..17f6b1cd99
--- /dev/null
+++ b/system/rtirq/README
@@ -0,0 +1,38 @@
+rtirq (set priorities on kernel IRQ threads)
+
+The rtirq script is a bash script written by Rui Nuno Capela which works
+in conjunction with the IRQ threading facility of the Linux kernel. The
+script takes advantage of the fact that the kernel can use threads for
+IRQs management, and as such these threads (like any other thread running
+on your system) can be given maximum priority in an effort to minimize
+the latency of audio peripherals.
+
+Modern kernels (3.0 and newer) incorporate IRQ threads, so there's no
+need for a patched kernel on Slackware 14.0 or newer. Older systems
+would need the realtime kernel patch.
+
+The script is installed as /etc/rc.d/rc.rtirq. To actually run it at
+boot time, add code like this to /etc/rc.d/rc.local:
+
+if [ -x /etc/rc.d/rc.rtirq ]; then
+ /etc/rc.d/rc.rtirq start
+fi
+
+The script can be disabled with "chmod -x /etc/rc.d/rc.rtirq".
+
+To enable IRQ threads, the option 'append="threadirqs"' needs to be
+added to the kernel section in /etc/lilo.conf. Example:
+
+# Linux bootable partition config begins
+image = /boot/vmlinuz-huge-3.10.17
+ root = /dev/sda1
+ label = Linux
+ append = "threadirqs"
+ read-only
+# Linux bootable partition config ends
+
+If there's already an 'append', add a space and 'threadirqs', like so:
+ append = "noapic acpi=off threadirqs"
+
+Don't forget to run lilo after editing lilo.conf. The threadirqs option
+will take effect on the next reboot.
diff --git a/system/rtirq/doinst.sh b/system/rtirq/doinst.sh
new file mode 100644
index 0000000000..2fdb8dddd1
--- /dev/null
+++ b/system/rtirq/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/rtirq.conf.new
diff --git a/system/rtirq/rtirq.SlackBuild b/system/rtirq/rtirq.SlackBuild
new file mode 100644
index 0000000000..75b39e20f4
--- /dev/null
+++ b/system/rtirq/rtirq.SlackBuild
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Slackware build script for rtirq
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=rtirq
+VERSION=${VERSION:-20130909}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+mkdir -p $PKG/etc/rc.d
+install -m0644 $PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
+install -m0755 $PRGNAM.sh $PKG/etc/rc.d/rc.$PRGNAM
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+
+# get rid of DOS line endings on LICENSE
+sed 's/\r//' LICENSE > $PKG/usr/doc/$PRGNAM-$VERSION/LICENSE
+
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/rtirq/rtirq.info b/system/rtirq/rtirq.info
new file mode 100644
index 0000000000..b8b8f32ec7
--- /dev/null
+++ b/system/rtirq/rtirq.info
@@ -0,0 +1,10 @@
+PRGNAM="rtirq"
+VERSION="20130909"
+HOMEPAGE="http://alsa.opensrc.org/Rtirq"
+DOWNLOAD="http://www.rncbc.org/jack/rtirq-20130909.tar.gz"
+MD5SUM="5e455383e5dc508d4bd0a50d752946ab"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/system/rtirq/slack-desc b/system/rtirq/slack-desc
new file mode 100644
index 0000000000..f2b598cef9
--- /dev/null
+++ b/system/rtirq/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+rtirq: rtirq (set priorities on kernel IRQ threads)
+rtirq:
+rtirq: The rtirq script is a bash script written by Rui Nuno Capela which
+rtirq: works in conjunction with the IRQ threading facility of the Linux
+rtirq: kernel. The script takes advantage of the fact that the kernel can
+rtirq: use threads for IRQs management, and as such these threads (like any
+rtirq: other thread running on your system) can be given maximum priority
+rtirq: in an effort to minimize the latency of audio peripherals.
+rtirq:
+rtirq:
+rtirq: