From 23a40322ee6088dbb4d1eb7c82c4da5737d8e60b Mon Sep 17 00:00:00 2001 From: Advait Jain Date: Thu, 13 Jul 2023 10:22:19 -0700 Subject: [PATCH] Small improvements to documentation about qemu. * pointers to why we are installing from source (including a TODO) * added additional packages to install to the dockerfile Note that the dockerfile changes are only tested by me locally on my machine. BUG=documentation --- ci/Dockerfile.micro | 4 ++++ ci/install_qemu.sh | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/ci/Dockerfile.micro b/ci/Dockerfile.micro index 88d9cae9331..6ce775ee30d 100644 --- a/ci/Dockerfile.micro +++ b/ci/Dockerfile.micro @@ -18,7 +18,11 @@ # CI container unnecessarily large. FROM python:3.10-bullseye AS qemu_builder RUN apt-get update + RUN apt-get install -y ninja-build wget xz-utils +RUN apt-get install -y libglib2.0-dev +RUN apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev + COPY ci/install_qemu.sh ./ # Installs all built files into /qemu_install rather than /usr/local default. RUN ./install_qemu.sh /tmp/qemu_install diff --git a/ci/install_qemu.sh b/ci/install_qemu.sh index 5259978d8db..1888db208fd 100755 --- a/ci/install_qemu.sh +++ b/ci/install_qemu.sh @@ -13,6 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== +# +# We are installing qemu from source because (copied from +# https://github.com/tensorflow/tflite-micro/pull/1892#discussion_r1164316226): +# QEMU 7.1 and above has a blocking bug +# (https://gitlab.com/qemu-project/qemu/-/issues/1528) and that's the only +# version available on our apt repo. +# +# TODO: b/285348856 - Update the version to allow for command line arguments. +# # Parameters: # ${1} Optional. Path to install QEMU. LINUX_PORTABLE_URL="https://download.qemu.org/qemu-6.2.0.tar.xz"