Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions scripts/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fi
docker run -i -v "$(pwd)":/home/sof/work/sof.git \
--env CMAKE_BUILD_TYPE \
--env PRIVATE_KEY_OPTION \
--user "$(id -u)" \
--env http_proxy="$http_proxy" \
--env https_proxy="$https_proxy" \
--user "$(id -u)" \
$SOF_DOCKER_RUN \
sof "$@"
sof "$@"
19 changes: 14 additions & 5 deletions scripts/docker_build/sof_builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,24 @@
# docker run -it -v <insert sof dir here>:/home/sof/work/sof.git --user `id -u` sof ./incremental.sh
#

FROM ubuntu:18.04
FROM ubuntu:20.04
ARG UID=1000

# Set up proxy from host
COPY apt.conf /etc/apt/
ARG host_http_proxy
ARG host_https_proxy
ENV http_proxy $host_http_proxy
ENV https_proxy $host_https_proxy

# for non-interactive package install
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update && \
apt-get install -y \
autoconf \
dialog \
apt-utils \
vim \
jed \
autoconf \
bison \
build-essential \
python3-pyelftools \
Expand Down Expand Up @@ -60,10 +65,14 @@ echo "sof:test0000" | chpasswd && adduser sof sudo
ENV HOME /home/sof

# Use ToT alsa utils for the latest topology patches.
# Note: For alsa-lib, set default library directory to /usr/lib/x86_64-linux-gnu.
# By default it goes to /usr/lib64, but Ubuntu 20.04's default shared library
# path does not have this. Typical build error is like,
# alsatplg: error while loading shared libraries: libatopology.so.2: cannot open shared object file: No such file or directory
RUN mkdir -p /home/sof/work/alsa && cd /home/sof/work/alsa && \
git clone $CLONE_DEFAULTS https://github.com/thesofproject/alsa-lib.git && \
git clone $CLONE_DEFAULTS https://github.com/thesofproject/alsa-utils.git && \
cd /home/sof/work/alsa/alsa-lib && ./gitcompile && make install && \
cd /home/sof/work/alsa/alsa-lib && ./gitcompile --prefix=/usr --libdir=/usr/lib/x86_64-linux-gnu/ && make install && \
cd /home/sof/work/alsa/alsa-utils && ./gitcompile && make install &&\
chown -R sof:sof /home/sof

Expand Down
8 changes: 2 additions & 6 deletions scripts/docker_build/sof_builder/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation. All rights reserved.

if [ -f "/etc/apt/apt.conf" ]; then
cp /etc/apt/apt.conf ./
else
touch apt.conf
fi
docker build --build-arg UID=$(id -u) --build-arg host_http_proxy=$http_proxy --build-arg host_https_proxy=$https_proxy -t sof .
docker build --build-arg UID=$(id -u) --build-arg host_http_proxy="$http_proxy" \
--build-arg host_https_proxy="$https_proxy" -t sof .
11 changes: 8 additions & 3 deletions scripts/docker_build/sof_qemu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,23 @@
# ./scripts/docker-qemu.sh scrpits-or-command-you-want-run
#

FROM ubuntu:18.04
FROM ubuntu:20.04
ARG UID=1000

# Set up proxy from host
COPY apt.conf /etc/apt/
ARG host_http_proxy
ARG host_https_proxy
ENV http_proxy $host_http_proxy
ENV https_proxy $host_https_proxy

# for non-interactive package install
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update && \
apt-get install -y \
vim \
jed \
dialog \
apt-utils \
autoconf \
build-essential \
git \
Expand Down
8 changes: 2 additions & 6 deletions scripts/docker_build/sof_qemu/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation. All rights reserved.

if [ -f "/etc/apt/apt.conf" ]; then
cp /etc/apt/apt.conf ./
else
touch apt.conf
fi
docker build --build-arg UID=$(id -u) --build-arg host_http_proxy=$http_proxy --build-arg host_https_proxy=$https_proxy -t sofqemu .
docker build --build-arg UID=$(id -u) --build-arg host_http_proxy="$http_proxy" \
--build-arg host_https_proxy="$https_proxy" -t sofqemu .