summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2012-11-10 17:32:01 +0200
committerFathi Boudra <fathi.boudra@linaro.org>2012-11-10 17:32:01 +0200
commitbac2a1291b2ade155b55752d1fbabc1bd06d495a (patch)
tree1bace70fbae51e142a484dd0bb3c8e8f5548950a
downloadgrub-bac2a1291b2ade155b55752d1fbabc1bd06d495a.tar.gz
Initial script for GRUB CI
-rwxr-xr-xgrub.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/grub.sh b/grub.sh
new file mode 100755
index 0000000..f532533
--- /dev/null
+++ b/grub.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+# Script used by CI to build GRUB for ARM
+# Requirements: autogen bison flex gcc-arm-linux-gnueabihf packages
+# Optional dependencies: libdevmapper-dev libfreetype6-dev libfuse-dev
+
+set -e
+
+pkg_source=linaro-grub
+base_version=2.00
+pkg_repository=http://bazaar.launchpad.net/~leif-lindholm/linaro-grub/arm-uboot
+
+bzr_commit=`bzr revno ${pkg_repository}`
+if [ -z "${bzr_commit}" ]; then
+ echo "Invalid bzr revision: ${bzr_commit}" >&2
+ exit 1
+fi
+
+pkg_version=${base_version}+bzr${bzr_commit}+`date +%Y%m%d`
+pkg_dir=${pkg_source}-${pkg_version}
+
+if [ -z "${WORKSPACE}" ]; then
+ # Local build
+ export WORKSPACE=`pwd`
+ export BUILD_NUMBER=1
+ # Get the sources
+ bzr branch --use-existing-dir ${pkg_repository} .
+fi
+
+# Create source tarball
+bzr export --root=${pkg_dir} ${pkg_source}_${pkg_version}.orig.tar.bz2
+
+./autogen.sh
+./configure \
+ --build=x86_64-linux-gnu \
+ --host=arm-linux-gnueabihf \
+ --with-platform=uboot
+make -j`getconf _NPROCESSORS_ONLN`