r3769 - in trunk/src/target/u-boot: . scripts

werner at sita.openmoko.org werner at sita.openmoko.org
Sat Jan 5 04:04:18 CET 2008


Author: werner
Date: 2008-01-05 04:04:13 +0100 (Sat, 05 Jan 2008)
New Revision: 3769

Added:
   trunk/src/target/u-boot/scripts/
   trunk/src/target/u-boot/scripts/README
   trunk/src/target/u-boot/scripts/build
   trunk/src/target/u-boot/scripts/update
Log:
Example scripts for the "manual" u-boot build process (i.e., without using
OpenEmbedded or anything similar.)

NOTE: this is still unfinished and largely untested work.

- scripts/README: description of what this is and of toolchain requirements
- scripts/build: build u-boot from scratch
- scripts/update: update one or both (upstream git and OM SVN) repositories



Added: trunk/src/target/u-boot/scripts/README
===================================================================
--- trunk/src/target/u-boot/scripts/README	2008-01-05 02:42:47 UTC (rev 3768)
+++ trunk/src/target/u-boot/scripts/README	2008-01-05 03:04:13 UTC (rev 3769)
@@ -0,0 +1,47 @@
+UNDER DEVELOPMENT - DON'T USE YET
+
+u-boot build scripts
+====================
+
+This is a collection of scripts to build u-boot. This is the "manual" build
+process, which only needs a cross-toolchain, but nothing else from OpenEmbedded
+or any similar environment.
+
+They're mainly intended as examples for how the process works and aren't
+necessarily useful "as is" for daily work:
+
+build
+  Build u-boot from scratch, using either the latest or some specific
+  version from the u-boot upstream sources (git) and the OpenMoko patches
+  (SVN).
+
+update
+  Update the u-boot sources to either the latest or some specific version.
+
+
+Toolchain
+---------
+
+We use the OpenEmbedded EABI toolchain. Below is are instructions for a
+quick minimal setup for the purpose of building u-boot and the kernel.
+More detailed instructions can be found here:
+http://wiki.openmoko.org/wiki/Toolchain
+
+# If the host is 64 bit (x86_64):
+DL=http://downloads.openmoko.org/
+wget $DL/toolchains/openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.bz2
+tar xCfj / openmoko-x86_64-arm-linux-gnueabi-toolchain.tar.bz2 
+
+# If the host is 32 bit (i686):
+DL=http://downloads.openmoko.org/
+wget $DL/toolchains/openmoko-i686-arm-linux-gnueabi-toolchain.tar.bz2
+tar xCfj / openmoko-i686-arm-linux-gnueabi-toolchain.tar.bz2 
+
+# Then set the PATH with:
+PATH=$PATH:/usr/local/openmoko/arm/bin
+
+
+Environment variables
+---------------------
+
+See "build".

Added: trunk/src/target/u-boot/scripts/build
===================================================================
--- trunk/src/target/u-boot/scripts/build	2008-01-05 02:42:47 UTC (rev 3768)
+++ trunk/src/target/u-boot/scripts/build	2008-01-05 03:04:13 UTC (rev 3769)
@@ -0,0 +1,44 @@
+UNDER DEVELOPMENT - DON'T USE YET
+
+#!/bin/sh -e
+#
+# This script illustrates how to build a specific version of u-boot from
+# scratch. This is mainly intended as a template for copy & paste, and as an
+# example for individual scripts.
+#
+# This script uses the gnueabi toolchain, see the file README in this
+# directory.
+#
+#
+# Environment variables:
+#
+# SVN points to the root of the local copy of the OpenMoko SVN tree (the tree
+# must be checked out already), e.g.,
+# SVN=/home/moko/svn.openmoko.org/
+#
+# DEVICE specifies the name of the device we build u-boot for, e.g., one of
+# DEVICE=gta01bv4
+# DEVICE=gta02v3
+# DEVICE=gta02v4
+#
+# GIT_HEAD, if defined, specifies with git head we use, e.g.,
+# GIT_HEAD=5c740711f0ea5b51414b341b71597c4a0751be74
+#
+# SVN_REV, if defined, specifies which SVN revision we use, e.g.,
+# SVN_REV=3768
+#
+
+git clone git://www.denx.de/git/u-boot.git
+cd u-boot
+
+[ ! -z "$GIT_HEAD"] ||
+  git reset --hard $GIT_HEAD
+
+ln -sf $SVN/trunk/src/target/u-boot/patches
+
+[ ! -z "$SVN_REV" ] ||
+  ( cd patches && svn update -r$SVN_REV; )
+
+quilt push -a
+make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- ${DEVICE}_config
+make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- u-boot.udfu

Added: trunk/src/target/u-boot/scripts/update
===================================================================
--- trunk/src/target/u-boot/scripts/update	2008-01-05 02:42:47 UTC (rev 3768)
+++ trunk/src/target/u-boot/scripts/update	2008-01-05 03:04:13 UTC (rev 3769)
@@ -0,0 +1,29 @@
+UNDER DEVELOPMENT - DON'T USE YET
+
+#!/bin/sh -e
+#
+# This script illustrates how to update u-boot to either the latest or some
+# specific upstream and OpenMoko version. This is mainly intended as a template
+# for copy & paste, and as an example for individual scripts.
+#
+# See README for the toolchain and "build" for environment variables.
+#
+
+cd u-boot
+
+# If there are uncommitted changes, "quilt refresh" them first.
+# If any of the repositories has been updated before running this script,
+# "quilt pop -a" may fail, and you have to use "quilt pop -f" or
+# "quilt pop -a -f".
+#
+quilt pop -a
+
+git reset --hard ${GIT_HEAD:-HEAD}
+
+ln -sf $SVN/trunk/src/target/u-boot/patches
+
+( cd patches && svn update -r${SVN_REV:-HEAD}; )
+
+quilt push -a
+make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- clean
+make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- u-boot.udfu





More information about the commitlog mailing list