mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
docker: fix minigbm failure when building base image
Running ./build_crosvm_base.sh failed with the below error: ... /scratch/minigbm/helpers.c: In function 'layout_from_format': /scratch/minigbm/helpers.c:156:7: error: \ 'DRM_FORMAT_ABGR16161616F' undeclared (first use in this function) case DRM_FORMAT_ABGR16161616F: ... The header file in the libdrm-dev package from debian distro hasn't included the missed macro. This change builds libdrm from the upstream source to fix the issue. BUG=None TEST=./build_crosvm_base.sh echo $? Change-Id: Ifaae4313781ea02ebac9658ab8be9d990a3d5d25 Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1841890 Reviewed-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
a8adff0ff1
commit
34533fe3ee
2 changed files with 18 additions and 8 deletions
|
@ -16,12 +16,12 @@ RUN apt-get update && apt-get install -y \
|
|||
kmod \
|
||||
libcap-dev \
|
||||
libdbus-1-dev \
|
||||
libdrm-dev \
|
||||
libegl1-mesa-dev \
|
||||
libfdt-dev \
|
||||
libgl1-mesa-dev \
|
||||
libgles1-mesa-dev \
|
||||
libgles2-mesa-dev \
|
||||
libpciaccess-dev \
|
||||
libssl1.0-dev \
|
||||
libtool \
|
||||
libusb-1.0-0-dev \
|
||||
|
@ -65,6 +65,22 @@ RUN git clone https://android.googlesource.com/platform/external/minijail \
|
|||
&& make -j$(nproc) \
|
||||
&& cp libminijail.so /usr/lib/x86_64-linux-gnu/
|
||||
|
||||
# New libepoxy and libdrm-dev requires newer meson than is in Debian stretch.
|
||||
ARG MESON_COMMIT=master
|
||||
RUN git clone https://github.com/mesonbuild/meson \
|
||||
&& cd meson \
|
||||
&& git checkout $MESON_COMMIT \
|
||||
&& ln -s $PWD/meson.py /usr/bin/meson
|
||||
|
||||
# The libdrm-dev in distro can be too old to build minigbm,
|
||||
# so we build it from upstream.
|
||||
ARG DRM_COMMIT=master
|
||||
RUN git clone https://gitlab.freedesktop.org/mesa/drm \
|
||||
&& cd drm \
|
||||
&& git checkout $DRM_COMMIT \
|
||||
&& meson build \
|
||||
&& ninja -C build/ install
|
||||
|
||||
# The gbm used by upstream linux distros is not compatible with crosvm, which must use Chrome OS's
|
||||
# minigbm.
|
||||
RUN dpkg --force-depends -r libgbm1
|
||||
|
@ -73,13 +89,6 @@ RUN git clone https://chromium.googlesource.com/chromiumos/platform/minigbm \
|
|||
&& sed 's/-Wall/-Wno-maybe-uninitialized/g' -i Makefile \
|
||||
&& make install -j$(nproc)
|
||||
|
||||
# New libepoxy requires newer meson than is in Debian stretch.
|
||||
ARG MESON_COMMIT=master
|
||||
RUN git clone https://github.com/mesonbuild/meson \
|
||||
&& cd meson \
|
||||
&& git checkout $MESON_COMMIT \
|
||||
&& ln -s $PWD/meson.py /usr/bin/meson
|
||||
|
||||
# New libepoxy has EGL_KHR_DEBUG entry points needed by crosvm.
|
||||
ARG LIBEPOXY_COMMIT=master
|
||||
RUN git clone https://github.com/anholt/libepoxy.git \
|
||||
|
|
|
@ -3,3 +3,4 @@ LIBEPOXY_COMMIT=d536f78db81853b18ffc733af8a1474e9ca08950
|
|||
TPM2_COMMIT=1dba349a7b272071d613869adaaef7bd576ae0c2
|
||||
PLATFORM2_COMMIT=c08db1d4dc6d91230fe3820a736b7ebd2c6e901d
|
||||
ADHD_COMMIT=40a296cfff7b88f2c14701627cff4c233d94a975
|
||||
DRM_COMMIT=0c427545cd931490c760d51cc3c50be75615b26d
|
||||
|
|
Loading…
Reference in a new issue