Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Blogs > Sonneteer
User Name


Rate this Entry

kernel patching

Posted 10-13-2007 at 04: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:
if [ ! -e patch-$NEWVERSION ]; then
        gunzip patch-$NEWVERSION.gz
cd linux-$VERSION
        patch -p1 <../patch-$NEWVERSION
                make silentoldconfig
        mv linux-$VERSION linux-$NEWVERSION
        sed -i -e s/^VERSION\=.*/VERSION=$NEWVERSION/ josh.kernel

if [ ! -d $DAZUKODIR ]; then
        cd $ROOTSRC
                        tar -zxpf dazuko-$DAZUKO.tar.gz && rm dazuko-$DAZUKO.tar.gz
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 1010 Comments 0
« Prev     Main     Next »


All times are GMT -5. The time now is 11:26 AM.

Main Menu

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