The Linux kernel 3.6 was released on on Saturday, November 30 2012 by Linus and currently I’m running the new kernel on my Ubuntu 12.04 machine. I used my post Compile the mainline Linux kernel for Ubuntu to make it happen.
As I already was running a vanilla kernel, I had to make some minor adjustments to the way we setup the environment to compile the vanilla kernel. All code and references in this article assume you have the setup as described in the article Compile the mainline Linux kernel for Ubuntu. I’ve written this article from memory so there is a small chance that I missed a small piece.
Getting the source
The mainline repository is big, so cloning the repository will take a while, depending on your Internet speed.
cd /d1/development/kernel/vanilla/source git checkout master git pull
We now have the updated kernel source.
Updating the branch
We need to update our i7 branch to reflect the Linux 3.6 kernel.
First we’ll make sure we have the 3.6 source in our branch.
git checkout i7 git rebase v3.6
Update the changelog
To recreate the changelog
rm debian.master/changelog DEBEMAIL="peter@avh.int"; DEBFULLNAME="Peter van der Does"; dch -v 3.6.0-999.201210040933 --distribution precise --package linux --create -c debian.master/changelog Mainline build: v3.3.0
This will create the changelog in debian.master as follows
linux (3.6.0-999.201210040933) precise; urgency=low * Mainline build: v3.3.0 -- Peter van der DoesFri, 23 Mar 2012 19:44:07 -0400
Update the config files
As we already have our own flavor setup, all we need to do is update the configurations with the new options given to us by the Linux 3.6 kernel.
fakeroot debian/rules clean fakeroot debian/rules updateconfigs
I generally just accept all the default values and if I want to make configuration changes, I’ll do those separately. Remember that your previous configuration changes are not overwritten.
If you want you to make changes to your configuration you can
debian/rules editconfigs
The script will ask us if we want to edit the particular configuration. We should not make changes to any of the configurations until we see the i7 configuration.
Do you want to edit config: amd64/config.flavour.i7? [Y/n]
We make our changes, save the configuration and then keep answering no to any other questions until the script ends.
Commit new updates
We want to keep the changes we just made for when we’re going to upgrade to Linux kernel 3.7 in the future.
git add debian.master/config/ git commit --amend
Now we need to clean up the git tree in order to get ready for compilation.
git reset --hard git clean -df
Compilation
It’s finally time for compiling, to keep our newly created branch in pristine condition we will do the compilation in a separate branch. We keep our branch clean as this will help later on when we want to update our new branch to a newer kernel.
git branch -D work git checkout -b work fakeroot debian/rules clean
All the packages will be created in the directory /d1/development/kernel/vanilla
Create independent packages:
fakeroot debian/rules binary-indep fakeroot debian/rules binary-perarch fakeroot debian/rules binary-i7
After the compilation is finished we’ll have all the packages in the parent directory.
