Enhance script to support ppc64le

Change-Id: Iec45fd05e02522b5753eac2ec6d6c348ddd92a75
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
diff --git a/build-setup.sh b/build-setup.sh
index 2230f66..745fe68 100755
--- a/build-setup.sh
+++ b/build-setup.sh
@@ -6,7 +6,7 @@
 #   target = barreleye|palmetto|qemu
 #   distro = fedora|ubuntu
 #   obmcdir = <name of openbmc src dir> (default openbmc)
-#   WORKSPACE =
+#   WORKSPACE = <location of base openbmc/openbmc repo>
 
 # Trace bash processing. Set -e so when a step fails, we fail the build
 set -xeo pipefail
@@ -19,6 +19,13 @@
 http_proxy=${http_proxy:-}
 PROXY=""
 
+# Determine our architecture, ppc64le or the other one
+if [ $(uname -m) == "ppc64le" ]; then
+    DOCKER_BASE="ppc64le/"
+else
+    DOCKER_BASE=""
+fi
+
 # Timestamp for job
 echo "Build started, $(date)"
 
@@ -64,7 +71,7 @@
   fi
 
   Dockerfile=$(cat << EOF
-FROM fedora:latest
+FROM ${DOCKER_BASE}fedora:latest
 
 ${PROXY}
 
@@ -106,7 +113,7 @@
   fi
 
   Dockerfile=$(cat << EOF
-FROM ubuntu:latest
+FROM ${DOCKER_BASE}ubuntu:latest
 
 ${PROXY}
 
@@ -125,6 +132,7 @@
 	socat \
 	subversion \
 	texinfo \
+	cpio \
 	wget
 
 RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER}