You are here

Installing sasc-ng on a Debian system with kernel 2.6.38

1. Introduction

Here's how I've been able to compile and install sasc-ng on my Debian Squeeze system with kernel 2.6.38, to use with MythTV. The sasc-ng source is from the vdr-sasc-ng project, with patches taken from ArchLinux. The kernel also needs to be patched, so this howto starts with patching and building a custom kernel. The drivers for the DVB adapters I use are (now) included in the 2.6.38 kernel, so I had no need to build custom drivers.

2. Installing dependencies

The following packages are needed to compile sasc-ng. As root, run

# apt-get install build-essential devscripts mercurial
# apt-get build-dep linux-image-2.6.38-2-amd64

Note: for the next step, you'll need to add a deb-src line like the following to /etc/apt/sources.list (if you haven't already):

deb-src wheezy main

3. Patching and building the kernel

First, not as root, create and cd to your working directory:

$ mkdir -p ~/src
$ cd ~/src

Next, get the kernel source and move into the kernel source directory:

$ apt-get source linux-image-2.6.38-2-amd64
$ cd linux-2.6-2.6.38

Then patch the kernel source:

$ patch -p1 < linux-2.6.38-dvb-mutex.patch

Update the Debian changelog:

$ dch

Make sure the first entry in the changelog looks something like the following. Note the distribution ('UNRELEASED', if you set this to something like 'unstable' debuild will complain later on) and the version number, so that you can later see that you are running a kernel with the proper patch applied.

linux-2.6 (2.6.38-5.sasc1) UNRELEASED; urgency=low

  * Non-maintainer upload.
  * Applied dvb mutex patch for sasc-ng

 -- Jan-Pascal van Best <>  Mon, 30 May 2011 23:09:02 +0200

Now build and (as root) install the kernel, next reboot into your new kernel (fingers crossed!):

$ debuild -i -us -uc
$ debuild -i -us -uc

# cd /home/user/src
# dpkg -i linux-image-2.6.38-2-amd64_2.6.38-5.sasc1_amd64.deb \
  linux-headers-2.6.38-2-amd64_2.6.38-5.sasc1_amd64.deb \
  linux-headers-2.6.38-2-common_2.6.38-5.sasc1_amd64.deb \
  linux-headers-2.6.38-2-all-amd64_2.6.38-5.sasc1_amd64.deb \
# reboot

3. Patching and building sasc-ng

Note: The following procedure doesn't work for kernel 3.7. See a more recent post for more information.

First, get the source and patch it:

$ cd ~/src
$ hg clone vdr-sasc-ng
$ cd vdr-sasc-ng
$ patch -p1 < vdr-sasc-ng-2.6.38.patch

Next, configure and build the dvbloopback module and userland stuff:

$ cd contrib/sasc-ng
$ ./configure --dvb-dir=/home/user/src/linux-2.6-2.6.38
$ make
$ make module

Then, as root, install the module, binary and libraries:

# cp sasc-ng /usr/local/bin/
# cp sc/PLUGINS/lib/* /usr/local/lib/
# mkdir -p /lib/modules/`uname -r`/misc/
# cp dvbloopback.ko /lib/modules/`uname -r`/misc/
# depmod -av

4. Configuring and testing sasc-ng


<todo>testing using mplayer</todo>


5. Starting sasc-ng automatically

<todo>/etc/sasc-ng/*; /etc/init.d/sasc-ng</todo>


6. Links

<todo>link to source for patches, initscript</todo>