aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2015-11-26 13:52:19 +1030
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-26 15:16:37 +1100
commit34901e08da043bf464775292c0c292e52e217121 (patch)
treeebc70ed1ee1e79cfeea9e78e78c4f3e45ab97e15 /external
parentc70529a196e81cecd3a9f9b6e9e867d9c7df640a (diff)
downloadskiboot-34901e08da043bf464775292c0c292e52e217121.zip
skiboot-34901e08da043bf464775292c0c292e52e217121.tar.gz
skiboot-34901e08da043bf464775292c0c292e52e217121.tar.bz2
external/pflash: Add script to build all backends
We need to test all the backends when eg. making changes to libflash, to ensure that something hasn't gone wrong. To encourage developers to do this, add a script to simplify it. Patches welcome to detect the specific cross compilers binaries shipped on your favourite distro. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rwxr-xr-xexternal/pflash/build-all-arch.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/external/pflash/build-all-arch.sh b/external/pflash/build-all-arch.sh
new file mode 100755
index 0000000..5974fbc
--- /dev/null
+++ b/external/pflash/build-all-arch.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+#
+# Script to build all pflash backends
+#
+# Copyright 2015 IBM Corp.
+# Licensed under the Apache License, Version 2.0
+#
+# pflash has three different backends that are used on powerpc, arm (BMC) and
+# x86 (file-backed). In order to test for regressions when touching shared code
+# such as libflash.
+#
+# Defaults to the cross compilers available under Ubuntu. You can set the
+# environment variables arm_cc, amd64_cc, ppc64le_cc for other distributions.
+#
+# installing on x86:
+# apt-get install gcc-arm-linux-gnueabi gcc-powerpc64le-linux-gnu gcc
+#
+
+arm_cc=${arm_cc:-arm-linux-gnueabi-}
+amd64_cc=${amd64_cc:-x86_64-linux-gnu-}
+ppc64le_cc=${ppc64le_cc:-powerpc64le-linux-gnu-}
+
+echo "Building for ARM..."
+make clean && make distclean
+CROSS_COMPILE=${arm_cc} make || { echo "ARM build failed"; exit 1; }
+
+echo "Building for x86..."
+make clean && make distclean
+CROSS_COMPILE=${amd64_cc} make || { echo "x86 build failed"; exit 1; }
+
+echo "Building for ppc64le..."
+make clean && make distclean
+CROSS_COMPILE=${ppc64le_cc} make || { echo "ppc64le build failed"; exit 1; }
+
+make clean && make distclean