Skip to content

Commit 03bfb88

Browse files
committed
docker: upgrade base ubuntu image to 20.04
Catching up latest LTS Ubuntu image, 20.04. It is supposed to be minor upgrade but alsa-lib need to be set default library path, /usr/lib/x86_64-linux-gnu/. Otherwise topology library loading error is found for SOF tool build. This is typical error message, alsatplg: error while loading shared libraries: libatopology.so.2: cannot open shared object file: No such file or directory. Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
1 parent 2aaed67 commit 03bfb88

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

scripts/docker_build/sof_builder/Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,21 @@
1414
# docker run -it -v <insert sof dir here>:/home/sof/work/sof.git --user `id -u` sof ./incremental.sh
1515
#
1616

17-
FROM ubuntu:18.04
17+
FROM ubuntu:20.04
1818
ARG UID=1000
1919

2020
ARG host_http_proxy
2121
ARG host_https_proxy
2222
ENV http_proxy $host_http_proxy
2323
ENV https_proxy $host_https_proxy
2424

25+
# for non-interactive package install
26+
ARG DEBIAN_FRONTEND=noninteractive
27+
2528
RUN apt-get -y update && \
2629
apt-get install -y \
30+
dialog \
31+
apt-utils \
2732
vim \
2833
jed \
2934
autoconf \
@@ -60,10 +65,14 @@ echo "sof:test0000" | chpasswd && adduser sof sudo
6065
ENV HOME /home/sof
6166

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

scripts/docker_build/sof_qemu/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,23 @@
1212
# ./scripts/docker-qemu.sh scrpits-or-command-you-want-run
1313
#
1414

15-
FROM ubuntu:18.04
15+
FROM ubuntu:20.04
1616
ARG UID=1000
1717

1818
ARG host_http_proxy
1919
ARG host_https_proxy
2020
ENV http_proxy $host_http_proxy
2121
ENV https_proxy $host_https_proxy
2222

23+
# for non-interactive package install
24+
ARG DEBIAN_FRONTEND=noninteractive
25+
2326
RUN apt-get -y update && \
2427
apt-get install -y \
2528
vim \
2629
jed \
30+
dialog \
31+
apt-utils \
2732
autoconf \
2833
build-essential \
2934
git \

0 commit comments

Comments
 (0)