2018-04-26 00:48:41 +08:00
|
|
|
#!/bin/sh
|
2019-06-02 04:58:16 +08:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
# Copyright(c) 2018 Intel Corporation. All rights reserved.
|
2018-04-26 00:48:41 +08:00
|
|
|
|
|
|
|
# Runs a given script in the docker container you can generate from the
|
|
|
|
# docker_build directory.
|
|
|
|
# Example:
|
|
|
|
# To build sof for baytrail:
|
|
|
|
# ./scripts/docker-run.sh ./scripts/xtensa-build-all.sh byt
|
|
|
|
# To build topology:
|
2019-01-03 17:09:12 +08:00
|
|
|
# ./scripts/docker-run.sh ./scripts/build-tools.sh
|
2018-04-26 00:48:41 +08:00
|
|
|
|
2021-01-19 08:45:20 +08:00
|
|
|
# set -x
|
|
|
|
|
|
|
|
if tty --quiet; then
|
|
|
|
SOF_DOCKER_RUN="$SOF_DOCKER_RUN --tty"
|
|
|
|
fi
|
|
|
|
|
|
|
|
docker run -i -v "$(pwd)":/home/sof/work/sof.git \
|
2020-09-15 12:59:17 +08:00
|
|
|
--env CMAKE_BUILD_TYPE \
|
2020-09-25 13:07:07 +08:00
|
|
|
--env PRIVATE_KEY_OPTION \
|
2021-01-19 08:45:20 +08:00
|
|
|
--user "$(id -u)" \
|
|
|
|
$SOF_DOCKER_RUN \
|
|
|
|
sof "$@"
|