GIT Based Installation
How to clone and manage the tree with GIT.
Background
Why GIT?
+ Easy updating in 1 command
+ Easy debugging
+ More up to date than the patches.
Cloning the tree with GIT
1. The first step is to make sure that you have all of the required packages installed to compile and clone the git repository. This varies by distribution to distribution on the exact terminology of the package within package management. (gitcore, git, git-dev, etc.)
2. Now you must make a decision between zen-stable.git/zen.git for the base tree - later on you may choose you want both on any given time. The good news is, if you want both trees you do not need to clone 2 trees! Yes, if you want both git trees you can do what is called adding a remote. First off, please read the differences between Zen.git and Zen-stable.git. If you are interested in possibly using both zen.git and zen-stable.git at any given time, please see how to switch between zen-stable.git and zen.git.
2. That's it! The source is now located in linux-2.6-zen. The great advantage of using git is also that you can switch to a previous kernel version, you can view all applicable tags with the "git tagcd /usr/src git clone git://zen-kernel.org/kernel/zen-stable.git linux-2.6-zen # alternatively zen.git ln -s linux-2.6-zen linux
" command. This even includes switching to vanilla kernels (so basically you never need to download a kernel source as you can always switch to it using this tree).
Checking out a tag instead of running master is recommended and a safe choice, although for Zen-stable it is generally easier to run master as the only commits are generally tested or simple bug fixes/updates.
cd /usr/src/linux-2.6-zen git checkout v2.6.30-zen8 # To checkout the 2.6.30-zen8 kernel release git checkout v2.6.31.3 # To checkout the 2.6.31.3 stable upstream kernel release
Now you can simply build/install your kernel source from within the linux-2.6-zen directory as you would if you extracted a kernel tarball from kernel.org
Managing/Updating the GIT tree.
Managing and updating the git tree is simple. You already know that you can switch between any tagged version of the kernel with one simple command, the same applies for updating the git tree!
1.Lets say i have a cloned kernel from 10/20, but it's more than a month later at 11/35 and I have not updated my kernel since, but I think there is plenty good reason to. GIT can be easily updated by using the following commands, read their descriptions as well
2. Now you will be fully up to date, or atleast see any available updated tags, for example if you saw# Invoking this command will result in GIT retrieving all of the current branches and tags into your tree. # But this command will NOT update your local branches, this is useful for seeing what new versions/tags are available. git fetch # Invoking this command will automatically perform a "git fetch", and it will update ALL of the local branches with the # changes retrieved from the remote. git pull # Invoking this command does everything that a "git pull" will do, except only for a specified branch located on the remote. git pull origin master # will only update the "master" branch
:
* [new tag] v2.6.31-zen5
But you are currently checked out to the "v2.6.31-zen1" tag, you may want to read release notes or git logs to discover what has changed since your version - and to see if it is worth upgrading for you.
That is all for cloning and updating the GIT tree!








