diff options
author | Jianxun Zhang <jianxun.zhang@intel.com> | 2019-10-04 13:53:44 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-10-10 18:33:45 +0000 |
commit | 34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222 (patch) | |
tree | f6f9521f09c76b81962b6bd38026cb952a24adff | |
parent | a8adff0ff14f66570a3aa86f6106b55081526be1 (diff) | |
download | crosvm-34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222.tar crosvm-34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222.tar.gz crosvm-34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222.tar.bz2 crosvm-34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222.tar.lz crosvm-34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222.tar.xz crosvm-34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222.tar.zst crosvm-34533fe3ee2a0e0c6100c1fda43c9f29ff8f2222.zip |
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>
-rw-r--r-- | docker/Dockerfile | 25 | ||||
-rw-r--r-- | docker/checkout_commits.env | 1 |
2 files changed, 18 insertions, 8 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index b934a24..7a52ac4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -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 \ diff --git a/docker/checkout_commits.env b/docker/checkout_commits.env index 6d77478..312b62a 100644 --- a/docker/checkout_commits.env +++ b/docker/checkout_commits.env @@ -3,3 +3,4 @@ LIBEPOXY_COMMIT=d536f78db81853b18ffc733af8a1474e9ca08950 TPM2_COMMIT=1dba349a7b272071d613869adaaef7bd576ae0c2 PLATFORM2_COMMIT=c08db1d4dc6d91230fe3820a736b7ebd2c6e901d ADHD_COMMIT=40a296cfff7b88f2c14701627cff4c233d94a975 +DRM_COMMIT=0c427545cd931490c760d51cc3c50be75615b26d |