I wrote a script to do this for me, thought I would post it since its a pretty good idea, however kind of obvious, it could be of use to people who are new to linux and not very confident in there shell scripting skills.
- Code: Select all
#!/bin/sh
#my quick and easy kernel source tree patching/unpacking script
SOURCESPATH=/stuff/software/Unix/Linux/kernel/
SPECPATCH=$1
#unpack 2.6.8 kernel sources
echo "Unpacking 2.6.8 sources"
tar -zxf `echo $SOURCESPATH`linux-2.6.8.tar.gz
cd linux-2.6.8
VERSION=2.6.8
#patch em up to 2.6.9
echo "Patching $VERSION > 2.6.9"
bzip2 -dc `echo $SOURCESPATH`patch-2.6.9.bz2 | patch -p1
cd ..
VERSION=2.6.9
#apply specified patch
if [ $SPECPATCH ]; then
echo "Patching $VERSION > $SPECPATCH"
bzip2 -dc 'echo $SOURCESPATH'patch-'echo $SPECPATCH'.bz2 | patch -p1
VERSION=$SPECPATCH
fi
mv linux-2.6.8 linux-$VERSION
echo "Kernel Sources for $VERSION available in linux-$VERSION"
Of course you will probably need to modify this, like what it does automatically (in this scripts case, unpacking 2.6.8, patching to 2.6.9).
Then I can just do a
- Code: Select all
[root@exeleven src]# ./dokernel 2.6.10-rc1


