- Alex Brandt
- Date: August 2006
- Version 1.0
Introduction
I've had for a while a bash script that updates Linux kernels, but it has never worked that well. I decided one day that I would make something Gentoo specific, and write a python version from the ground up. I have a rough version coming up on my subversion repository. If you have comments, suggestions, or other well thought guidance please leave a comment. Recently, I have decided to migrate the utility to C++ as it seems more appropriate in that language. The C++ version is available on my subversion repository.
I know that upkern isn't near ready for production, but it is to a point that it needs to start being used, and having the bugs reported. For now, report bugs via comments to this post, but in the future (once the ebuild has been created) I will hopefully have a bug report through Gentoo's bug reporting system.
The utility as it stands will build the kernel, and do pretty much everything it says it will in conjunction with that, but I've noticed a couple of issues and have tried rooting them out. The configuration for your bootloader is going to have an extra instance of your kernel in it, but the installation of the kernel into /boot should work beautifully. I'll finish up the functionality with it this summer (assuming I have the time), and hopefully we can start using this utility to help us keep our kernel up to date and clean.
I have an idea for a helper application (a simple ncurses kernel source cleaner), but that will be put on the back burner for now.
Download
To download the source code it is easiest to use subversion. Simply use subversion to check out the trunk of the repository for the python build:
svn co http://svn.alunduil.com/svn/upkern/trunk upkern
If you wish to checkout the C++ build then the following would get the source:
svn co http://svn.alunduil.com/svn/upkern/branches/c++_conversion upkern
The code is also browse-able online at my subversion repository.
Install
This program was created using Gentoo Linux with a 2.6.20 kernel revision 8 on an x86_64 architecture. The compiler used for building and testing is gcc version 4.1.2 provided by portage.
The C++ version does not build at this time, and won't until I understand boost::filesystem a bit better.
The python version is simple to install on your system, and I recommend doing it in the following way:
su
svn co http://svn.alunduil.com/svn/upkern/trunk /usr/local/upkern
cd /usr/local/upkern
python upkern --help
Description
This program utilizes the following algorithms and data types:
python
- getopt
- os
- sys
- time
- re
- datetime
- operator
- shutil
C++
Input and Output
Input
CLI utility for updating the Linux kernel.
Output
Outputs different verbosities of messaging from the kernel as well as errors (if found) by the script.
Example
upkern -rvvm oldconfig
Rebuilds the kernel with all messages and errors using the oldconfig configurator, and then rebuilds all modules from portage using the module-rebuild utility.
Program Testing
I have been using this script to compile the last 5 revisions of my kernel, and have tried to push it through the rigors that might be seen in daily use. I simply can't foresee every single situation which might occur during a kernel build, and would like assistance finding bugs in this utility.
Bugs
As I mentioned before the C++ version will not compile, and the python version doesn't know when the bootloader already has the kernel in its configuration file.
If bugs are found please report them to the project's bugzilla page.