Skip to main content.

Workflow for Custodian git Repositories
The git trees for custodians are hosted here. They can be accessed from the outside as regular git trees. The available trees and the currently assigned custodians are listed on the Custodians page.

Note: Several of the git commands listed on this page require git version 1.5 or later

Intro to Distributed Version Control (Illustrated)
Traditional version control helps you backup, track and synchronize files. Distributed version control makes it easy to share changes. Done right, you can get the best of both worlds: simple merging and centralized releases...
This is a very useful description of a development methodology using the git version control system. This does not exactly match the u-boot methodology, but is very close.
Koha git motto: Every time a patch falls on the floor, a kitten dies.
Andrew Moore explains in extremely lucid detail how to use git to "commit early and commit often" in a local working git repository, then rearrange and squash the incremental changesets into logical changesets and, ultimately, create the right patches at the right level of granularity and in the right sequence. Priceless!
Git cheat sheets in various sizes

Philosophy of custodian trees

My idea of a custodian repository is that it is more than just a working tool for collecting patches and preparing these for merge into mainline. My idea is instead that these are pretty much independent incarnations of U-Boot source trees which users (note: users, not only developers) with specific needs or interests can refer to.

For example, in my set of mind somebody interested in the latest 85xx code would clone the 85xx custodian repository, expecting that he finds there the most current code for this family of processors. Probably he will never sync himself against mainline, but instead continue update (pull) from the 85xx custodian repository.

That means, that my idea is that it is the custodian's responsibility to provide a permanently accessible, consistent view of his repository to users. When he collects patches, he will - after sufficient review and testing - decide that these are good enough to go into his repository. And at certain points we will pull all the stuff that has been collected there into mainline.

Upstream and downstream trees

The u-boot tree holds the mainline code and is the reference for official U-Boot releases. It is the upstream tree of all other trees; custodians of these trees must submit a pull request to u-boot for their new code to become part of the mainline and, eventually, of a release.

... well, almost.

ARM trees also form a hierarchy, with the u-boot-arm tree 'above', and u-boot-atmel, u-boot-imx, u-boot-marvell, u-boot-pxa, u-boot-samsung, and u-boot-ti trees 'below'; their upstream is u-boot-arm, not u-boot.

Therefore, in the instructions below, when upstream is mentioned, it is u-boot-arm if the downstream tree is an ARM subtree, and u-boot otherwise.

How to get a tree

As this process is not automated, the first step is to apply for a tree either on the mailing list or at info {at} directly. All we basically need is the public part of an ssh key, so we can setup authentication for that tree.

For the following example we assume that Dave Bowman takes up custodianship of the U-Boot port for the OpenRISC architecture and provided us with "" after he did an "ssh-keygen -t rsa". According to our conventions, he will get write access to the tree with the account name "gu-or32", where gu is the prefix for U-Boot Git custodians.

Initial checkout

To start out, after the account has been setup, Dave simply clones the publicly available tree as usual:

$ subrepo=or32 # change to your sub-repository name
$ git clone git://${subrepo}.git u-boot-${subrepo}
$ git clone${subrepo}.git u-boot-${subrepo}

Pushing changes

Being the owner of the tree, after having done commits on it, Dave can push the changes upstream via ssh and the ssh public key that he provided in the first step, e.g. doing the following in the repo should Simply Work™ for him.

$ git push ssh://gu-${subrepo}${subrepo}

Note that the accounts do not allow logins on our webserver:

$ ssh
fatal: protocol error: bad line length character

Which is just another way of saying

I'm afraid I cannot do that Dave.

Similar errors result if Dave tries to clone from ssh:// - he should really use the "normal" git repository git:// for cloning or updating his local tree, the ssh (git+ssh) access method can only be used for pushing.

But I am asked for a password...

If pushing fails because you are asked for a password, please verify if you really used the public key, either through ssh-agent or through an explicit statement in your .ssh/config file. With the first form you should have told your ssh-agent about the public key. Usually its enough to do a "ssh-add" as long as you don't have multiple keys; otherwise do an "ssh-add <keyname>" explicitely.

If you get an error-message like "Could not open a connection to your authentication agent." then you don't have an agent running. Just do an "ssh-agent bash" and afterwards the key-adding.

You can always check with "ssh-add -L" what keys can be used by the agent. Be sure that the key you want to use is on the list.

In case this does not help, then please send the output of "ssh -vvv <user>" to wd {at} .

Notifying the maintainer and the mailing-list

After pushing the changes into your repository, please notify the upstream maintainer (Wolfgang Denk <wd {at}> for u-boot, Albert Aribaud <albert {dot] u {dot} boot {at} aribaud {dot} net;&gt for u-boot-arm) and the U-Boot users mailing-list <u-boot {at}> about the changes you recently made. Please use the command git request-pull to generate a summary for this purpose.

Tips for maintaining custodian trees

Applying patches

The easiest way to apply patches requires them to be in the format of an e-mail message with a descriptive subject and <Signed-off-by> entry. Multiple patch files can be concatenated. To apply such a patch:

$ git am --signoff --whitespace=strip < PATCH_FILE

BEFORE Requesting a Pull

Before you request a pull, make sure there are no merge conflicts with the mainline. See above for the recommended way of pulling the u-boot master repository tip and rebase the master branch.


To push changes in a single branch:

$ git push ssh://gu-${subrepo}${subrepo} <branch>
Using git push --all is not recommended. It pushes all of your local branches to the custodian repository and results in branch pollution.

After the upstream custodian merges your changes

Since you cloned the custodian subrepo tree, not the mainline, you need to explicitly fetch from the upstream.

  1. $ git fetch git://${upstream}.git to fetch the latest upstream changes.
  2. $ git checkout master # Go to your master branch to rebase.
  3. $ git rebase ${upstream}/master your master is now right above the upstream master.

Fetching changes from a given branch

$ git fetch git://${subrepo} <branch>

Note: this only copies the branch into your repo. You can then merge, rebase, cherry-pick at your leisure.

Nickname the upstream and frequently fetched repositories

Using git remote add u-boot-${repo} git://${repo}.git allows you to refer to the repo by its nickname ${repo} in all fetch operations. For instance, having done once git remote add u-boot git://, fetching the u-boot tree is done simply by git fetch u-boot.