blob: 283dffa4b921a6768eea715311f9e8eeb56cb576 [file] [log] [blame]
Alanny Lopez56fc36a2017-07-27 13:55:44 -05001#!/bin/bash
Alanny Lopezb0a12dd2017-04-24 16:21:47 -05002###############################################################################
Chris Smart02651712015-11-11 11:09:00 +11003#
Michael Shepos3939e952019-01-16 16:00:35 -06004# This build script is for running the OpenBMC builds as Docker containers.
Alanny Lopez3fbaa512017-04-24 15:46:52 -05005#
Alanny Lopezb0a12dd2017-04-24 16:21:47 -05006###############################################################################
7#
Alanny Lopeze08e8702018-02-24 18:07:13 -06008# Script Variables:
9# build_scripts_dir The path of the openbmc-build-scripts directory.
10# Default: The directory containing this script
11# http_proxy The HTTP address of the proxy server to connect to.
12# Default: "", proxy is not setup if this is not set
13# WORKSPACE Path of the workspace directory where some intermediate
14# files and the images will be saved to.
15# Default: "~/{RandomNumber}"
Andrew Geisslerdc1e7022018-03-26 07:54:48 -070016# num_cpu Number of cpu's to give bitbake, default is total amount
17# in system
Alanny Lopezb0a12dd2017-04-24 16:21:47 -050018#
Alanny Lopeze08e8702018-02-24 18:07:13 -060019# Docker Image Build Variables:
Alanny Lopez1246b032018-02-24 23:34:55 -060020# BITBAKE_OPTS Set to "-c populate_sdk" or whatever other BitBake options
Alanny Lopeze08e8702018-02-24 18:07:13 -060021# you'd like to pass into the build.
22# Default: "", no options set
Alanny Lopez1246b032018-02-24 23:34:55 -060023# build_dir Path where the actual BitBake build occurs inside the
Alanny Lopeze08e8702018-02-24 18:07:13 -060024# container, path cannot be located on network storage.
25# Default: "/tmp/openbmc"
26# distro The distro used as the base image for the build image:
27# fedora|ubuntu
28# Default: "ubuntu"
Alanny Lopez1246b032018-02-24 23:34:55 -060029# img_name The name given to the target build's docker image.
Alanny Lopeze08e8702018-02-24 18:07:13 -060030# Default: "openbmc/${distro}:${imgtag}-${target}-${ARCH}"
Alanny Lopez1246b032018-02-24 23:34:55 -060031# img_tag The base docker image distro tag:
Alanny Lopeze08e8702018-02-24 18:07:13 -060032# ubuntu: latest|16.04|14.04|trusty|xenial
33# fedora: 23|24|25
34# Default: "latest"
35# target The target we aim to build:
Andrew Geisslerdd820722018-02-20 13:42:58 -060036# evb-ast2500|palmetto|qemu|qemux86-64
Andrew Geissler9eef7282019-05-10 13:28:09 -050037# romulus|s2600wf|witherspoon|zaius|tiogapass|gsj
Alanny Lopeze08e8702018-02-24 18:07:13 -060038# Default: "qemu"
Andrew Geissler215e43c2019-04-23 10:57:48 -050039# no_tar Set to true if you do not want the debug tar built
40# Default: "false"
Alanny Lopez723fea62017-09-12 11:22:17 -050041#
Alanny Lopeze08e8702018-02-24 18:07:13 -060042# Deployment Variables:
Alanny Lopez1246b032018-02-24 23:34:55 -060043# obmc_dir Path of the OpenBMC repo directory used as a reference
Alanny Lopeze08e8702018-02-24 18:07:13 -060044# for the build inside the container.
45# Default: "${WORKSPACE}/openbmc"
Michael Shepos10afbb22019-02-06 13:33:07 -060046# xtrct_small_copy_dir
47# Directory within build_dir that should be copied to
48# xtrct_path. The directory and all parents up to, but not
49# including, build_dir will be copied. For example, if
50# build_dir is set to "/tmp/openbmc" and this is set to
51# "build/tmp", the directory at xtrct_path will have the
52# following directory structure:
53# xtrct_path
54# | - build
55# | - tmp
56# ...
57# Can also be set to the empty string to copy the entire
58# contents of build_dir to xtrct_path.
59# Default: "deploy/images".
Alanny Lopezb0a12dd2017-04-24 16:21:47 -050060#
61###############################################################################
Joel Stanley4b8b2392016-02-12 15:44:57 +103062# Trace bash processing. Set -e so when a step fails, we fail the build
Joel Stanley38c9d142016-02-16 12:31:55 +103063set -xeo pipefail
Chris Smart02651712015-11-11 11:09:00 +110064
Alanny Lopez46967702018-02-25 00:29:14 -060065# Script Variables:
66build_scripts_dir=${build_scripts_dir:-"$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"}
67http_proxy=${http_proxy:-}
68WORKSPACE=${WORKSPACE:-${HOME}/${RANDOM}${RANDOM}}
Andrew Geisslerdc1e7022018-03-26 07:54:48 -070069num_cpu=${num_cpu:-$(nproc)}
Alanny Lopez46967702018-02-25 00:29:14 -060070
71# Docker Image Build Variables:
72build_dir=${build_dir:-/tmp/openbmc}
Chris Smart02651712015-11-11 11:09:00 +110073distro=${distro:-ubuntu}
Alanny Lopez1246b032018-02-24 23:34:55 -060074img_tag=${img_tag:-latest}
Alanny Lopez46967702018-02-25 00:29:14 -060075target=${target:-qemu}
Andrew Geissler215e43c2019-04-23 10:57:48 -050076no_tar=${no_tar:-false}
Alanny Lopez46967702018-02-25 00:29:14 -060077
78# Deployment variables
Alanny Lopez46967702018-02-25 00:29:14 -060079obmc_dir=${obmc_dir:-${WORKSPACE}/openbmc}
Michael Shepos3939e952019-01-16 16:00:35 -060080ssc_dir=${HOME}
Michael Shepos10afbb22019-02-06 13:33:07 -060081xtrct_small_copy_dir=${xtrct_small_copy_dir:-deploy/images}
Michael Shepos3939e952019-01-16 16:00:35 -060082xtrct_path="${obmc_dir}/build/tmp"
83xtrct_copy_timeout="300"
Alanny Lopez46967702018-02-25 00:29:14 -060084
Chris Smartc3522542016-02-16 11:59:36 +110085PROXY=""
Chris Smart02651712015-11-11 11:09:00 +110086
Alanny Lopezccc650e2017-04-24 15:14:20 -050087# Determine the architecture
88ARCH=$(uname -m)
89
90# Determine the prefix of the Dockerfile's base image
91case ${ARCH} in
92 "ppc64le")
93 DOCKER_BASE="ppc64le/"
94 ;;
95 "x86_64")
96 DOCKER_BASE=""
97 ;;
98 *)
99 echo "Unsupported system architecture(${ARCH}) found for docker image"
100 exit 1
101esac
Andrew Geissler11abbbe2016-08-14 19:39:47 -0500102
Chris Smart02651712015-11-11 11:09:00 +1100103# Timestamp for job
104echo "Build started, $(date)"
105
Alanny Lopez1246b032018-02-24 23:34:55 -0600106# If the obmc_dir directory doesn't exist clone it in
107if [ ! -d ${obmc_dir} ]; then
108 echo "Clone in openbmc master to ${obmc_dir}"
109 git clone https://github.com/openbmc/openbmc ${obmc_dir}
Andrew Geisslerc3c35202016-08-16 08:47:50 -0500110fi
111
Alanny Lopez1246b032018-02-24 23:34:55 -0600112# Make and chown the xtrct_path directory to avoid permission errors
113if [ ! -d ${xtrct_path} ]; then
114 mkdir -p ${xtrct_path}
Alanny Lopez723fea62017-09-12 11:22:17 -0500115fi
Alanny Lopez1246b032018-02-24 23:34:55 -0600116chown ${UID}:${GROUPS} ${xtrct_path}
Alanny Lopez723fea62017-09-12 11:22:17 -0500117
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500118# Work out what build target we should be running and set BitBake command
Michael Shepos2de03e92018-11-07 15:54:56 -0600119MACHINE=""
Chris Smart02651712015-11-11 11:09:00 +1100120case ${target} in
Chris Smart02651712015-11-11 11:09:00 +1100121 palmetto)
Brad Bishop7161a172018-10-05 16:48:06 -0400122 LAYER_DIR="meta-ibm/meta-palmetto"
Chris Smart02651712015-11-11 11:09:00 +1100123 ;;
Adriana Kobylak4ec7db02019-05-07 12:44:30 -0500124 swift)
125 LAYER_DIR="meta-ibm/meta-witherspoon"
126 MACHINE="swift"
127 ;;
Joel Stanley0e077202016-06-28 16:42:45 +0930128 witherspoon)
Brad Bishop7161a172018-10-05 16:48:06 -0400129 LAYER_DIR="meta-ibm/meta-witherspoon"
Joel Stanley0e077202016-06-28 16:42:45 +0930130 ;;
Adriana Kobylakfcba1c32019-05-10 11:33:37 -0500131 witherspoon-128)
132 LAYER_DIR="meta-ibm/meta-witherspoon"
133 MACHINE="witherspoon-128"
134 ;;
Joel Stanley0e077202016-06-28 16:42:45 +0930135 evb-ast2500)
Brad Bishop7161a172018-10-05 16:48:06 -0400136 LAYER_DIR="meta-evb/meta-evb-aspeed/meta-evb-ast2500"
Joel Stanley0e077202016-06-28 16:42:45 +0930137 ;;
Ed Tanous6dc40d92018-07-30 11:13:36 -0700138 s2600wf)
Brad Bishop7161a172018-10-05 16:48:06 -0400139 LAYER_DIR="meta-intel/meta-s2600wf"
Ed Tanous6dc40d92018-07-30 11:13:36 -0700140 ;;
Joel Stanley915381f2016-11-01 16:58:59 +1030141 zaius)
Brad Bishop7161a172018-10-05 16:48:06 -0400142 LAYER_DIR="meta-ingrasys/meta-zaius"
Joel Stanley915381f2016-11-01 16:58:59 +1030143 ;;
144 romulus)
Brad Bishop7161a172018-10-05 16:48:06 -0400145 LAYER_DIR="meta-ibm/meta-romulus"
Joel Stanley915381f2016-11-01 16:58:59 +1030146 ;;
Chris Smart02651712015-11-11 11:09:00 +1100147 qemu)
Brad Bishop7161a172018-10-05 16:48:06 -0400148 LAYER_DIR="meta-phosphor"
Michael Shepos2de03e92018-11-07 15:54:56 -0600149 # MACHINE defaults to `qemuarm` in this layer, no change necessary
Chris Smart02651712015-11-11 11:09:00 +1100150 ;;
Andrew Geisslerdd820722018-02-20 13:42:58 -0600151 qemux86-64)
Michael Shepos2de03e92018-11-07 15:54:56 -0600152 LAYER_DIR="meta-phosphor"
153 # MACHINE defaults to `qemuarm` in this layer, change to `qemux86-64`
154 MACHINE="qemux86-64"
Andrew Geisslerdd820722018-02-20 13:42:58 -0600155 ;;
Vijay Khemka4c5b12e2019-01-23 14:50:09 -0800156 tiogapass)
157 LAYER_DIR="meta-facebook/meta-tiogapass"
158 ;;
Andrew Geissler9eef7282019-05-10 13:28:09 -0500159 gsj)
160 LAYER_DIR="meta-quanta/meta-gsj"
161 ;;
Chris Smart02651712015-11-11 11:09:00 +1100162 *)
163 exit 1
164 ;;
165esac
166
Brad Bishop7161a172018-10-05 16:48:06 -0400167BITBAKE_CMD="TEMPLATECONF=${LAYER_DIR}/conf source oe-init-build-env"
168
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500169# Configure Docker build
Chris Smart02651712015-11-11 11:09:00 +1100170if [[ "${distro}" == fedora ]];then
171
172 if [[ -n "${http_proxy}" ]]; then
173 PROXY="RUN echo \"proxy=${http_proxy}\" >> /etc/dnf/dnf.conf"
174 fi
175
176 Dockerfile=$(cat << EOF
Alanny Lopez1246b032018-02-24 23:34:55 -0600177 FROM ${DOCKER_BASE}${distro}:${img_tag}
Chris Smart02651712015-11-11 11:09:00 +1100178
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500179 ${PROXY}
Chris Smart02651712015-11-11 11:09:00 +1100180
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500181 # Set the locale
182 RUN locale-gen en_US.UTF-8
183 ENV LANG en_US.UTF-8
184 ENV LANGUAGE en_US:en
185 ENV LC_ALL en_US.UTF-8
Saqib Khan75635122017-03-23 10:57:34 -0500186
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500187 RUN dnf --refresh install -y \
188 bzip2 \
189 chrpath \
190 cpio \
191 diffstat \
192 findutils \
193 gcc \
194 gcc-c++ \
195 git \
196 make \
197 patch \
198 perl-bignum \
199 perl-Data-Dumper \
200 perl-Thread-Queue \
201 python-devel \
202 python3-devel \
203 SDL-devel \
204 socat \
205 subversion \
206 tar \
207 texinfo \
208 wget \
Saqib Khan5158a322017-10-23 11:31:24 -0500209 which \
210 iputils-ping
Chris Smart02651712015-11-11 11:09:00 +1100211
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500212 RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER}
213 RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
Chris Smart02651712015-11-11 11:09:00 +1100214
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500215 USER ${USER}
216 ENV HOME ${HOME}
217 RUN /bin/bash
Chris Smart02651712015-11-11 11:09:00 +1100218EOF
219)
220
Alanny Lopezccc650e2017-04-24 15:14:20 -0500221elif [[ "${distro}" == ubuntu ]]; then
222
Chris Smart02651712015-11-11 11:09:00 +1100223 if [[ -n "${http_proxy}" ]]; then
224 PROXY="RUN echo \"Acquire::http::Proxy \\"\"${http_proxy}/\\"\";\" > /etc/apt/apt.conf.d/000apt-cacher-ng-proxy"
225 fi
226
227 Dockerfile=$(cat << EOF
Alanny Lopez1246b032018-02-24 23:34:55 -0600228 FROM ${DOCKER_BASE}${distro}:${img_tag}
Chris Smart02651712015-11-11 11:09:00 +1100229
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500230 ${PROXY}
Chris Smart02651712015-11-11 11:09:00 +1100231
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500232 ENV DEBIAN_FRONTEND noninteractive
Saqib Khan75635122017-03-23 10:57:34 -0500233
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500234 RUN apt-get update && apt-get install -yy \
235 build-essential \
236 chrpath \
237 debianutils \
238 diffstat \
239 gawk \
240 git \
241 libdata-dumper-simple-perl \
242 libsdl1.2-dev \
243 libthread-queue-any-perl \
Alanny Lopez27af3a02017-05-26 10:49:06 -0500244 locales \
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500245 python \
246 python3 \
247 socat \
248 subversion \
249 texinfo \
250 cpio \
Saqib Khan5158a322017-10-23 11:31:24 -0500251 wget \
252 iputils-ping
Chris Smart02651712015-11-11 11:09:00 +1100253
Alanny Lopez27af3a02017-05-26 10:49:06 -0500254 # Set the locale
255 RUN locale-gen en_US.UTF-8
256 ENV LANG en_US.UTF-8
257 ENV LANGUAGE en_US:en
258 ENV LC_ALL en_US.UTF-8
259
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500260 RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER}
261 RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
Chris Smartd30c5902016-03-01 15:00:54 +1100262
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500263 USER ${USER}
264 ENV HOME ${HOME}
265 RUN /bin/bash
Chris Smart02651712015-11-11 11:09:00 +1100266EOF
267)
268fi
269
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500270# Create the Docker run script
Chris Smart02651712015-11-11 11:09:00 +1100271export PROXY_HOST=${http_proxy/#http*:\/\/}
272export PROXY_HOST=${PROXY_HOST/%:[0-9]*}
273export PROXY_PORT=${http_proxy/#http*:\/\/*:}
274
Chris Smart01d2b962015-11-11 18:05:30 +1100275mkdir -p ${WORKSPACE}
Chris Smart02651712015-11-11 11:09:00 +1100276
Andrew Geissler215e43c2019-04-23 10:57:48 -0500277# Determine command for bitbake image build
278bitbake_image="obmc-phosphor-image"
279if [ $no_tar = "false" ]; then
280 bitbake_image="${bitbake_image} obmc-phosphor-debug-tarball"
281fi
282
Chris Smart01d2b962015-11-11 18:05:30 +1100283cat > "${WORKSPACE}"/build.sh << EOF_SCRIPT
Chris Smart02651712015-11-11 11:09:00 +1100284#!/bin/bash
285
Joel Stanley38c9d142016-02-16 12:31:55 +1030286set -xeo pipefail
Chris Smart02651712015-11-11 11:09:00 +1100287
Alanny Lopez723fea62017-09-12 11:22:17 -0500288# Go into the OpenBMC directory, the build will handle changing directories
Alanny Lopez1246b032018-02-24 23:34:55 -0600289cd ${obmc_dir}
Chris Smart02651712015-11-11 11:09:00 +1100290
291# Set up proxies
292export ftp_proxy=${http_proxy}
293export http_proxy=${http_proxy}
294export https_proxy=${http_proxy}
295
Chris Smart01d2b962015-11-11 18:05:30 +1100296mkdir -p ${WORKSPACE}/bin
Chris Smart02651712015-11-11 11:09:00 +1100297
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500298# Configure proxies for BitBake
Chris Smart02651712015-11-11 11:09:00 +1100299if [[ -n "${http_proxy}" ]]; then
300
Chris Smartd30c5902016-03-01 15:00:54 +1100301 cat > ${WORKSPACE}/bin/git-proxy << \EOF_GIT
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500302 #!/bin/bash
303 # \$1 = hostname, \$2 = port
304 PROXY=${PROXY_HOST}
305 PROXY_PORT=${PROXY_PORT}
306 exec socat STDIO PROXY:\${PROXY}:\${1}:\${2},proxyport=\${PROXY_PORT}
Chris Smart02651712015-11-11 11:09:00 +1100307EOF_GIT
308
Chris Smart01d2b962015-11-11 18:05:30 +1100309 chmod a+x ${WORKSPACE}/bin/git-proxy
310 export PATH=${WORKSPACE}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH}
Chris Smart02651712015-11-11 11:09:00 +1100311 git config core.gitProxy git-proxy
312
313 mkdir -p ~/.subversion
314
315 cat > ~/.subversion/servers << EOF_SVN
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500316 [global]
317 http-proxy-host = ${PROXY_HOST}
318 http-proxy-port = ${PROXY_PORT}
Chris Smart02651712015-11-11 11:09:00 +1100319EOF_SVN
320fi
321
322# Source our build env
323${BITBAKE_CMD}
324
Adriana Kobylak62a1b102019-05-07 12:14:45 -0500325# Export MACHINE name when given for build target
Michael Shepos2de03e92018-11-07 15:54:56 -0600326if [[ -n "${MACHINE}" ]]; then
Adriana Kobylak62a1b102019-05-07 12:14:45 -0500327 export MACHINE="${MACHINE}"; export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE MACHINE"
Michael Shepos2de03e92018-11-07 15:54:56 -0600328fi
329
Alanny Lopezeaa2eae2017-04-24 14:55:07 -0500330# Custom BitBake config settings
Chris Smart02651712015-11-11 11:09:00 +1100331cat >> conf/local.conf << EOF_CONF
Chris Smartc650c202015-11-25 15:58:53 +1100332BB_NUMBER_THREADS = "$(nproc)"
333PARALLEL_MAKE = "-j$(nproc)"
Chris Smart02651712015-11-11 11:09:00 +1100334INHERIT += "rm_work"
335BB_GENERATE_MIRROR_TARBALLS = "1"
Alanny Lopez1246b032018-02-24 23:34:55 -0600336DL_DIR="${ssc_dir}/bitbake_downloads"
337SSTATE_DIR="${ssc_dir}/bitbake_sharedstatecache"
Chris Smart02651712015-11-11 11:09:00 +1100338USER_CLASSES += "buildstats"
Andrew Geissler931ec672016-08-11 13:10:05 -0500339INHERIT_remove = "uninative"
Alanny Lopez1246b032018-02-24 23:34:55 -0600340TMPDIR="${build_dir}"
Chris Smart02651712015-11-11 11:09:00 +1100341EOF_CONF
342
343# Kick off a build
Andrew Geissler215e43c2019-04-23 10:57:48 -0500344bitbake ${BITBAKE_OPTS} ${bitbake_image}
Chris Smart02651712015-11-11 11:09:00 +1100345
Alanny Lopez1246b032018-02-24 23:34:55 -0600346# Copy internal build directory into xtrct_path directory
Charles Paul Hoferb249c2c2018-09-12 12:15:13 -0500347if [[ ${xtrct_small_copy_dir} ]]; then
348 mkdir -p ${xtrct_path}/${xtrct_small_copy_dir}
349 timeout ${xtrct_copy_timeout} cp -r ${build_dir}/${xtrct_small_copy_dir}/* ${xtrct_path}/${xtrct_small_copy_dir}
350else
351 timeout ${xtrct_copy_timeout} cp -r ${build_dir}/* ${xtrct_path}
352fi
Charles Paul Hoferbe8700e2018-09-05 09:28:08 -0500353
354if [[ 0 -ne $? ]]; then
355 echo "Received a non-zero exit code from timeout"
356 exit 1
357fi
358
Chris Smart02651712015-11-11 11:09:00 +1100359EOF_SCRIPT
360
361chmod a+x ${WORKSPACE}/build.sh
362
Alanny Lopez51186882017-08-01 16:14:41 -0500363# Give the Docker image a name based on the distro,tag,arch,and target
Alanny Lopez1246b032018-02-24 23:34:55 -0600364img_name=${img_name:-openbmc/${distro}:${img_tag}-${target}-${ARCH}}
Alanny Lopez51186882017-08-01 16:14:41 -0500365
366# Build the Docker image
Alanny Lopez1246b032018-02-24 23:34:55 -0600367docker build -t ${img_name} - <<< "${Dockerfile}"
Alanny Lopez51186882017-08-01 16:14:41 -0500368
Michael Shepos3939e952019-01-16 16:00:35 -0600369# If obmc_dir or ssc_dir are ${HOME} or a subdirectory they will not be mounted
370mount_obmc_dir="-v ""${obmc_dir}"":""${obmc_dir}"" "
371mount_ssc_dir="-v ""${ssc_dir}"":""${ssc_dir}"" "
372if [[ "${obmc_dir}" = "${HOME}/"* || "${obmc_dir}" = "${HOME}" ]];then
373mount_obmc_dir=""
Alanny Lopez3fbaa512017-04-24 15:46:52 -0500374fi
Michael Shepos3939e952019-01-16 16:00:35 -0600375if [[ "${ssc_dir}" = "${HOME}/"* || "${ssc_dir}" = "${HOME}" ]];then
376mount_ssc_dir=""
377fi
378
379# Run the Docker container, execute the build.sh script
380docker run \
381--cap-add=sys_admin \
382--net=host \
383--rm=true \
384-e WORKSPACE=${WORKSPACE} \
385-w "${HOME}" \
386-v "${HOME}":"${HOME}" \
387${mount_obmc_dir} \
388${mount_ssc_dir} \
389--cpus="$num_cpu" \
390-t ${img_name} \
391${WORKSPACE}/build.sh
Chris Smart02651712015-11-11 11:09:00 +1100392
Alanny Lopezd32d3322017-07-18 15:21:39 -0500393# To maintain function of resources that used an older path, add a link
Alanny Lopez1246b032018-02-24 23:34:55 -0600394ln -sf ${xtrct_path}/deploy ${WORKSPACE}/deploy
Alanny Lopezd32d3322017-07-18 15:21:39 -0500395
Chris Smart02651712015-11-11 11:09:00 +1100396# Timestamp for build
Alanny Lopez0e8ad992017-06-19 15:45:23 -0500397echo "Build completed, $(date)"