patching a kernel

John Heim jheim at math.wisc.edu
Tue Sep 25 20:00:44 UTC 2007


----- Original Message ----- 
From: "Willem van der Walt" <wvdwalt at csir.co.za>
To: "Linux for blind general discussion" <blinux-list at redhat.com>
Sent: Tuesday, September 25, 2007 7:43 AM
Subject: Re: patching a kernel


> That was the way it always used to work, but lately, speakup uses git and
> the checkout script only works up to kernel 2.6.21.x and i am not sure
> what number x may be.


I'm not 100% sure but Ibelieve x=22. 2.I'm not sure it was possible to patch 
a 2.6.21 kernel because the kernel team had inplemented some changes to how 
the kernel uses serial ports which were incompatible with speakup. But these 
changes were backed out for other reasons in the 2.6.22 kernel code.


Below is a Makefile that I use to build a kernel. There's a git-clone 
command in there that will work even if you type it in yourself rather than 
using my Makefile. If you put this file in /usr/src, it will download the 
kernel source, uncompress it, apply the speakup patches, and then crash, I 
think. But that's not bad because at that point you have to configure the 
kernel anyway. After you create a /usr/src/.config file, you can run make 
again and it should build a debian kernel package for you.


# ===
VERSION=2.6
REVISION=22
LINUX=linux-${VERSION}.${REVISION}
TODAY=`date +"%F"`
APPEND=.${TODAY}-fai
KPKG_OPTS='--initrd'

ROOTDIR=/usr/src
LINUXDIR=${ROOTDIR}/${LINUX}
DOWNLOADDIR=${ROOTDIR}/downloads

TARBALL=${LINUX}.tar.bz2
MYTARBALL=${DOWNLOADDIR}/${TARBALL}

CONFIG=${LINUXDIR}/.config
OLDCONFIG=${ROOTDIR}/config/.config

KERNEL=linux-image-${VERSION}${APPEND}__${VERSION}${APPEND}-10.00.Custom_i386.deb

SPK_INSTALLER=${ROOTDIR}/speakup/install

kernel : ${KERNEL}

${KERNEL} : ${LINUXDIR} ${CONFIG}
 cd ${LINUXDIR}; make-kpkg ${KPKG_OPTS} --append-to-version ${APPEND} 
kernel_image modules_image

${MYTARBALL} :
 test -d ${DOWNLOADDIR} || mkdir ${DOWNLOADDIR}
 wget http://kernel.org/pub/linux/kernel/v${VERSION}/${TARBALL} -O 
${MYTARBALL}

${LINUXDIR} : ${MYTARBALL} ${SPK_INSTALLER}
 tar -jxf ${MYTARBALL}
 touch ${LINUXDIR}
 rm -rf ${ROOTDIR}/linux
 ln -s ${LINUXDIR} ${ROOTDIR}/linux
 cd ./speakup; ${SPK_INSTALLER}

${SPK_INSTALLER} :
 git-clone http://linux-speakup.org/speakup.git

${CONFIG} :
 cp ${OLDCONFIG} ${CONFIG}





More information about the Blinux-list mailing list