kernel patching
Posted 10-13-2007 at 03:03 PM by Sonneteer
So the concept of patching the kernel to update to the next release is something I haven't delved into too much before. I've had previous experiences of trying to use the patch command that didn't go over too well. The syntax of the patch command is something that is simple when understood. Yet being slightly different from other commands, it can look a bit scary to a newbie. For instance, what number am I supposed to put with the p? But when I actually sat down to try it, it was actually quite easy to figure out. So here's the new section that I have now added to my kernel script:
So for the p, I guess just stick with 1, unless you know what you're doing otherwise?
the patch command uses a "<" where other commands would use something such as "-i"
Code:
patch)
if [ ! -e patch-$NEWVERSION ]; then
wget http://www.rafal.lkams.kernel.org/pub/linux/kernel/v2.6/patch-$NEWVERSION.gz
gunzip patch-$NEWVERSION.gz
cd linux-$VERSION
patch -p1 <../patch-$NEWVERSION
make silentoldconfig
cd $ROOTSRC
mv linux-$VERSION linux-$NEWVERSION
sed -i -e s/^VERSION\=.*/VERSION=$NEWVERSION/ josh.kernel
fi
if [ ! -d $DAZUKODIR ]; then
cd $ROOTSRC
wget http://www.dazuko.de/files/dazuko-$DAZUKO.tar.gz
tar -zxpf dazuko-$DAZUKO.tar.gz && rm dazuko-$DAZUKO.tar.gz
fi
;;
the patch command uses a "<" where other commands would use something such as "-i"



