Linux sources
Introduction
Getting Linux sources for boards used at our department requires these steps:
- Getting vanilla Linux sources
- Applying several patches to these sources
The reason for providing the patches separately is that for many users it is important to know which patches were applied to the kernel they are using. The maintenance of the additional patches is not an easy task as these patches evolve in time. They are either being ported to newer Linux versions or being updated for other readons.
To maintain the patches we have decided to use the tool TopGit. This page describes how this tool is used for our Linux sources.
TopGit overview
TopGit is a tool manage patches as so called topic branches in Git repositories. Every patch is represented by one branch. The history of patch evolution is tracked on that branch. As some patches might depend on other patches, TopGit also manages these dependencies.
For more information check the TopGit README.
Linux repositories
We maintain the following Linux repositories:
Layout
Our Linux repositories have the following branches:
- vanilla
- Tracks vanilla linux sources.
- patch/*
- Topic branches for individual patches. These branches are managed using TopGit.
Managing TopGit patches
Porting patches to -stable linux version
Most patches are based against vanilla branch. Therefore tg update updates the patches against newer vanilla sources. Stable kernels (2.6.x.y) are maintained as separate branches and for that reason TopGit wont do the update for us.
I use the following commands to prepare a version based on 2.6.26.5 assuming that vanilla is at 2.6.26
tg export tmp git rebase v2.6.26.5 tmp git branch -m tmp shark-2.6.26.5