scratchpad

Building -lowlatency Kernel from Abogani's git tree

Notes and step-by-step instructions for building -lowlatency kernel based on Alessio Igor Bogani's Ubuntu kernel git tree [1] for Natty.

Development Environment

The first thing required is to make sure the development environment is established.

The following are required:

  • install devscripts [2]
  • install dput [2]
  • install git [3]
  • install package 'kernel-wedge' [4]
  • setup a GPG environment [2]
  • create dedicated PPA (e.g. broken) [2]

Clone git Kernel

We will need to clone Alessio's kernel from Ubuntu's git repository. We will be cloning two branches: ubuntu-oneiric-lowlatency and ubuntu-oneiric-meta-lowlatency.

This is done simply in a terminal as thus:

git clone git://kernel.ubuntu.com/abogani/ubuntu-oneiric-lowlatency.git aboganis-lowlatency [5] git clone git://kernel.ubuntu.com/abogani/ubuntu-oneiric-meta-lowlatency.git aboganis-meta-lowlatency [5]

The first command will clone Alessio's ubuntu-natty-lowlatency git branch and places it in a directory called aboganis-lowlatency under the current directory. The second command similarly clones the ubuntu-natty-meta-lowlatency git branch and places it in a directory called aboganis-meta-lowlatency under the current directory.

or

apt-get source linux-image-3.2.0-8-lowlatency

to pull from his ppa for 3.2.0-8.16 version.

Build -lowlatency kernel

In order to build the -lowlatency kernel we will need to perform the following generalized steps:

  • copy the debian* directories to a new directory
  • update the changelog
  • run /debian/rules clean
  • debuild
  • dput

Copy debian* Directories

For this part we will need to create a new directory in which to perform our work. I'm not sure why.

However, the presumption is that we cloned Alessio's kernels to aboganis-lowlatency and aboganis-meta-lowlatency under the /home directory. Likewise, we will create our new directory, aboganis-build, in the same location.

In a terminal:

cd ~/aboganis-lowlatency
mkdir ~/aboganis-build -p
cp -a debian* ~/aboganis-build [6]

First we move to the ~/aboganis-lowlatency directory. Then we create a directory called /aboganis-build under the /home directory. Then we copy several /debian directories from ~/aboganis-lowlatency to ~/aboganis-build including various symlinks.

Update changelog

Now we will need to udpate the changelog. This part is a little indirect because of the various symlinks mentioned previously. The actual changelog is not under the /debian directory but actually under the /debian.lowlatency directory.

Therefore in a terminal we need to:

cd ~/aboganis-build
dch -c debian.lowlatency/changelog -i [7]

Make sure the following are attended:

  • remove "ubuntu1" [8]
  • make sure release is 'natty'
  • correct email address
  • add a comment [10]
  • save the changelog [10]
  • quit [10]

First, we move the correct directory (you may skip that part if already there) then we use dch to update the changelog file.

I find that choosing the vim editor under dch to be the easiest. Watch that vim doesn't rename the file with a .vim extension.

/debian/rules clean

This is a bit of a "black-box" to me. I'm not really sure what it does, although I could delve into the rules file to suss it out.

One of the things it apparently does is to copy the /debian.lowlatency/changelog file to the /debian directory.

In a terminal:

cd ~/aboganis-build
fakeroot debian/rules clean [9]

The first part makes sure we are in the correct directory (you may skip that part if already there). The second runs 'clean' from the debian/rules file.

debuild

Generate the .changes file by running debuild.

In terminal:

cd ~/abogannis-build
debuild -S -sa [6][10]

There will probably be some warnings about .tar.gz files and some lintian warnings as well. Answer 'yes' or ignore as appropriate.

dput

Upload the package to your PPA and let it build.

In terminal:

cd ..
ls (verify .changes name)
dput ppa:<username>/<ppaname> <packagename.changes> [6][10]

Build -meta-lowlatency Source

In order to build the -meta-lowlatency source we will need to perform the following generalized steps:

  • update the changelog
  • debuild
  • dput

Update changelog

Now we will need to udpate the changelog.

Therefore in a terminal we need to:

cd ~/abogannis-meta-lowlatency/meta-source [10]
dch -i [10]

Make sure the following are attended:

  • remove "ubuntu1" [10]
  • make sure release is 'natty'
  • correct email address
  • add a comment [10]
  • save the changelog [10]
  • quit [10]

First, we move the correct directory then we use dch to update the changelog file.

I find that choosing the vim editor under dch to be the easiest. Watch that vim doesn't rename the file with a .vim extension.

debuild

Generate the .changes file by running debuild.

In terminal:

cd ~/abogannis-meta-lowlatency/meta-source
debuild -S -sa [10]

The first command may be ignored if you are already in this directory.

There will probably be some warnings about .tar.gz files and some lintian warnings as well. Answer 'yes' or ignore as appropriate.

dput

Upload the package to your PPA and let it build.

In terminal:

cd ..
ls (to find .changes name)
dput ppa:<username>/<ppaname> <packagename.changes> [6][10]

Update from git

If Alessio has made updates to his git tree, you can get them by doing one of the following:

  • remove _everything_ but the "original" directories from the git clone [11]
  • in each git tree directory "git remote update --prune && git reset --hard origin" [11]

References

[1] http://kernel.ubuntu.com/git
[2] http://irclogs.ubuntu.com/2011/02/16/%23ubuntustudio-devel.html
[3] this is inferred by the use of git to clone Alessio's kernel, however, the package is called git-core is some older releases
[4] http://irclogs.ubuntu.com/2011/02/24/%23ubuntustudio-devel.html
[5] http://irclogs.ubuntu.com/2011/02/14/%23ubuntustudio-devel.html
[6] http://irclogs.ubuntu.com/2011/02/17/%23ubuntustudio-devel.html
[7] http://irclogs.ubuntu.com/2011/02/23/%23ubuntustudio-devel.html
[8] http://irclogs.ubuntu.com/2011/02/16/%23ubuntustudio-devel.html
[9] http://irclogs.ubuntu.com/2011/02/24/%23ubuntustudio-devel.html
[10] http://irclogs.ubuntu.com/2011/02/16/%23ubuntustudio-devel.html
[11] http://irclogs.ubuntu.com/2011/02/25/%23ubuntustudio-devel.html

ScottLavender/scratchpad (last edited 2012-01-19 01:19:15 by slavender)