LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Sonneteer
User Name
Password

Notices


Rate this Entry

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:
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
;;
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"
Posted in Uncategorized
Views 1532 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration