Previously we discussed how to compile a custom kernel for Ubuntu Intrepid. What if a new version is released? Do we really need to go through all these steps again? Luckily we don’t, if you used git to get the source code.
The article you are reading now explains an update where only the last ABI number has changed. This usually isn’t the case and on December 1st, 2008 I wrote an newer article about updating your custom compiled kernel. I suggest you follow the newer guide.
Go to the directory holding the git repository, if you followed my how to this would intrepid.
On October 31st I have a made a few changes in article about Compiling a custom kernel for Ubuntu Intrepid using git to help compiling an upgrade of the kernel a bit easier. If you compiled a kernel prior to this you need to follow the steps in Preparing manual upgrade otherwise you can skip this step and go straight to Upgrading the source.
Preparing manual upgrade
We need to work in our created branch
git checkout core2
We’re going to copy all the files we needed to change, restore the branch to it’s original starting point and copy all of our files back again. To keep remember this state we’ll do a commit.
cp debian/abi/2.6.27-7.13/i386/core2 .. cp debian/abi/2.6.27-7.13/i386/core2.modules .. cp debian/scripts/misc/getabis .. cp debian/rules.d/i386.mk .. cp debian/control.stub .. cp debian/control .. git reset --hard git git clean -xdf cp ../core2 debian/abi/2.6.27-7.13/i386/ cp ../core2.modules debian/abi/2.6.27-7.13/i386/ cp ../getabis debian/scripts/misc/ cp ../i386.mk debian/rules.d/ cp ../control.stub debian/ cp ../control debian/ git commit -a -m "Core2 modifications"
Upgrading the source
It’s time to get the new kernel source.
We’re going to update our master branch and use the master branch to update our own core2 branch.
git checkout master git pull
We now have the latest kernel source, we need to apply that to our core 2 branch
git checkout core2 git reset --hard git clean -xdf git merge master
Because we added files to the directory
we need to move these files ourselves to the new abi directory
mv debian/abi/2.6.27-7.13/i386/core2* debian/abi/2.6.27-7-14/
We are all set for compilation and installation.
I advise to use this method of compiling a new release of your kernel only when the last digits change, so in this case it’s a kernel upgrade from 2.6.27-7.13 to 2.6.27-7.14. For any other upgrade of the kernel read my new article