kernel and u-boot build scripts

Werner Almesberger werner at
Thu Jan 10 02:00:01 CET 2008

One of OpenMoko's arcane rituals most veiled by obscurity is certainly
the building of the kernel and u-boot. Our "official" procedure involves
a hefty amount of OpenEmbedded, and some people even use OE as their
main mechanism for building kernels or u-boot.

For those who need quicker turn-around times, also an ancient toolchain
(OABI) is making the rounds. This toolchain has served us well for over
a year, but it's hopelessly out of sync with the rest of our environment.

A little while ago, John Lee has released an experimental EABI toolchain,
complete with a little build environment for applications:

This toolchain is built by our current OpenEmbedded process, so we have
a reasonably good idea what's in there :-)

I've now written a few shell scripts that use this toolchain to build
u-boot and the kernel. They're in and respectively.

They're mainly intended as examples for one's own customized build
scripts or copy & paste templates, but they also work if used "as is".
One thing to bear in mind is that, instead of using the setup-env
script from the toolchain, these script only expect the PATH to be
updated, as described in u-boot/scripts/README.

I've used these scripts in the past few days, and they seem to work
well enough.

One item that I'm a bit uncertain about, and where I'd appreciate the
help of git experts, is how to pin the upstream u-boot revision in git.
The idea is that one can set GIT_HEAD to the version one likes to use,
and things will roll back or forward as desired, similar to "svn update

What I'm doing is "git pull" to update the repository, and then
"git reset --hard $GIT_HEAD" to bring the checked-out tree to the
desired revision.

The use of "git checkout" has been suggested to me, but after I do
this, it seems impossible to "git pull" afterwards. So I'm not sure
this is the right direction. (For simplicity, we can assume that there
are no local changes at all in the tree, i.e., that we've done a
"quilt pop -a".)

- Werner

More information about the openmoko-kernel mailing list