From 14e024ae4ecf661dd8977214efeb22cb59ea0027 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 8 Dec 2021 22:02:43 +0000 Subject: [PATCH] Make aarch64 vm usable for running armhf binaries. BUG: b/203152778 TEST: ./tools/run_tests --target vm:aarch64; ./tools/run_tests vm:aarch64 --arch armhf Change-Id: I5b774ebf66f1a0a71e025dc364a6e85d43d3b6cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3324410 Reviewed-by: Dennis Kempin Tested-by: kokoro Commit-Queue: Anton Romanov --- tools/impl/testvm/cloud_init.yaml | 19 +++++++++++++++++++ tools/impl/testvm/version | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tools/impl/testvm/cloud_init.yaml b/tools/impl/testvm/cloud_init.yaml index 85c6b1411c..e01f95760a 100644 --- a/tools/impl/testvm/cloud_init.yaml +++ b/tools/impl/testvm/cloud_init.yaml @@ -1,3 +1,4 @@ +## template: jinja #cloud-config # # This file is responsible for setting up the test VM when it is first booted. @@ -19,6 +20,13 @@ users: preserve_hostname: true +{% if v1.machine == 'aarch64' -%} +# This needs to run as bootcmd to preceed processing `packages` section +bootcmd: + - dpkg --add-architecture armhf +{%- endif %} + + # Runtime dependencies of crosvm binaries. # Note: Keep in sync with ./install-[aarch64-]deps.sh packages: @@ -31,6 +39,17 @@ packages: - libx11-6 - libxext6 - rsync +{% if v1.machine == 'aarch64' %} +# Note: Keep in sync with the above + - libcap2:armhf + - libdbus-1-3:armhf + - libdrm2:armhf + - libepoxy0:armhf + - libssl1.1:armhf + - libwayland-client0:armhf + - libx11-6:armhf + - libxext6:armhf +{%- endif %} # Commands to run once during setup runcmd: diff --git a/tools/impl/testvm/version b/tools/impl/testvm/version index 75d30fb532..9742708e66 100644 --- a/tools/impl/testvm/version +++ b/tools/impl/testvm/version @@ -1 +1 @@ -r0001 +r0002