Re: [LAU] RME BabyFace question

From: Ralf Mardorf <ralf.mardorf@email-addr-hidden-dsl.net>
Date: Fri May 17 2013 - 11:31:21 EEST

On Fri, 2013-05-17 at 09:57 +0200, dianoux wrote:
> > Your kernel must be new enough.
> Do know how new it has to be?

You can simply build the latest kernel, recommended is to use a full
preempted with threadirqs enabled or a kernel-rt.

This script is a little bit "dirty" and I edited it after copying it to
this email, but it should build 3.6.5-rt14 and easily can be edited to
build another kernel, but you need to edit more than just the variables,
to do that ;), again, it's a "dirty" script.

#!/bin/sh
# sh build-kernel
TODAY=2013-May-17

apt-get update
apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-package kernel-wedge
apt-get install libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev

 GENERIC=3.5.0-17-lowlatency # replace it with the kernel you're running now
 ARCH=x86_64 # replace it with the architecture you're running
 # export CONCURRENCY_LEVEL=2

 # Kernel to build is version
 KMAJOR=3.6
 KMINOR=.5
 KMICRO=-rt14
 KERNEL_UNAME=${KMAJOR}${KMINOR}${KMICRO}

 # Directory where the source codes should be saved
 SRC_DIR=/usr/src

clear
if [ $USER = "root" ] ; then
 if [ $(uname -m) != ${ARCH} ] ; then
  echo "#######################################"
  echo "You're running the wrong architecture"
  echo "Continuing anyway"
  echo "#######################################"
 fi
 if [ $(uname -r) != ${GENERIC} ] ; then
  echo "#######################################"
  echo "You're running the wrong kernel"
  echo "Continuing anyway"
  echo "#######################################"
 fi

 # Backup configuration, delete sources and packages in SRC_DIR
 cd $SRC_DIR
 cp linux-${KERNEL_UNAME}/.config config-${KERNEL_UNAME}_$(date +"%b-%d-%Y_%H-%M-%S")
 rm -r linux-${KERNEL_UNAME}
 rm linux-headers-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
 rm linux-image-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
 rm linux-${KMAJOR}${KMINOR}.tar.bz2 patch-${KERNEL_UNAME}.patch.bz2
 
 # Download all sources to source directory
 wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.6.5.tar.bz2
 # wget http://www.kernel.org/pub/linux/kernel/projects/rt/3.6/patch-3.6.5-rt14.patch.bz2
 wget https://www.kernel.org/pub/linux/kernel/projects/rt/3.6/older/patch-3.6.5-rt14.patch.bz2

 # Extracting and patching
 tar -jxf linux-${KMAJOR}${KMINOR}.tar.bz2
 mv linux-${KMAJOR}${KMINOR} linux-${KERNEL_UNAME}
 cd linux-${KERNEL_UNAME}
 bzip2 -dc ../patch-${KERNEL_UNAME}.patch.bz2 | patch -p1
 rm ../linux-${KMAJOR}${KMINOR}.tar.bz2
 rm ../patch-${KERNEL_UNAME}.patch.bz2

 # Configuration
 cp /boot/config-$(uname -r) .config
 # Optimize to CPU
 # e.g. set to CONFIG_MK8=y (Opteron/Athlon64/Hammer/K8), command out for default
 # echo "CONFIG_MK8=y" >> .config
 
 # 32-bit only
 # HIGHMEM from 4G to 64G
 # echo "CONFIG_HIGHMEM4G is not set" >> .config
 # echo "CONFIG_HIGHMEM64G=y" >> .config
 
 # [...]
 make oldconfig

 # Building the kernel
 make-kpkg clean
 make-kpkg --rootcmd fakeroot --initrd kernel-image kernel-headers

 # Installing new packages
 make-kpkg clean
 dpkg -i ../linux-image-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
 dpkg -i ../linux-headers-${KERNEL_UNAME}_${KERNEL_UNAME}-10.00.Custom_*.deb
else
 echo "Run as \"root\""
fi
exit 0

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Fri May 17 12:15:04 2013

This archive was generated by hypermail 2.1.8 : Fri May 17 2013 - 12:15:04 EEST