If you compile your own kernel for Ubuntu Jaunty and you follow my git instructions you need to know the Ubuntu developers have changed the way they set up the kernel sources starting with kernel version Ubuntu-2.6.28-50.
One of the things that this change causes is you can’t really easily use git to merge the source of Ubuntu-2.6.28-50 or higher.
I will be explaining which steps to take so you can easily merge again and compile your own Ubuntu Jaunty kernel.
What the developers did is a new setup of the debian directory.
They have created a way so the can easily setup the kernel to be compiled and maintained for different git branches.
This is not what we want, we just want the default kernel branch from Ubuntu and make changes.
In this example I’m using the same structure as my tutorial on my how to compile your own Ubuntu kernel using git
Go to the git directory where you pulled your kernel and follow the following commands:
git checkout master git pull
We now have the latest source code.
Now go to the branch we use for compiling the kernel.
git checkout core2 git reset HEAD --hard git clean -xdf
If we would do a merge from the master branch it would fail. By using the following commands we’ll be able to merge:
git merge 1e883f5e425309689a5d1b203f1989602ee83783 git mv debian debian.master mkdir debian git mv debian.master/commit-templates debian git mv debian.master/stamps debian git commit -m 'Core2: split out debian directory ready for abstraction' git cherry-pick 3ebd3729ce35b784056239131408b9a72b0288ef
This will result in an error message
This will show you the problems. In my case and my guess is that this will also be the case for most of you is that there are two files that need to be removed from git.
git rm debian.master/control git rm debian.master/control.stub
We now can commit the cherry-pick.
git commit -c 3ebd372
You’ll be shown the commit message, save this and it will be committed.
git cherry-pick e5d19d20cc0d369ce7ca961e75c16a5280c9337b git cherry-pick 8673ad671207459cf782e71b8a6f85cc696f9802 git merge 5fe51e63d6e4f4be0203f83abf3d6a1f57210c5f
This merge will result in a few conflicts as we have more files in the repository, Again in my case it’s my config files and for a reason I don’t quite know, it also seems to think the original config files should be present.
git add debian.master/config/i386/config git add debian.master/config/i386/config.core2 git rm debian/config/i386/config git commit -m 'Core2: updated'
Now we can merge without problems again
git merge Ubuntu-2.6.28-51
Tomorrow I’ll write up the new how to compile a kernel article.