Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Pre-built crosvm image for ARM64

278 views
Skip to first unread message

Venkat

unread,
Oct 11, 2023, 3:15:08 PM10/11/23
to crosvm-dev
Hi,

I would like to run crosvm on my ARM64 machine. Would like to know if there are pre-built crosvm binaries available?.  If not, can I cross compile crosvm for Arm64 on my CentOS Linux release 8.3 host.

Thanks
Venkat 

Daniel Verkamp

unread,
Oct 11, 2023, 4:50:43 PM10/11/23
to Venkat, crosvm-dev
On Wed, Oct 11, 2023 at 12:15 PM Venkat <kvm...@gmail.com> wrote:
>
> Hi,
>
> I would like to run crosvm on my ARM64 machine. Would like to know if there are pre-built crosvm binaries available?. If not, can I cross compile crosvm for Arm64 on my CentOS Linux release 8.3 host.

We don't provide any pre-built binaries, but you should be able to
build ARM64 Linux binaries via cross compilation.

The cargo --target option can be used to select the target triplet,
which would be something like this for ARM64:

cargo build --target=aarch64-unknown-linux-gnu --release

You might be able to install the necessary cross toolchain and
libraries via your distribution's package manager; check
tools/install-aarch64-deps for a list of the packages we install on
Debian and see if there are equivalents in CentOS.

Alternatively, you can use the Docker container (tools/dev_container
in the crosvm repository), which already includes cross compilers for
aarch64-unknown-linux-gnu.

Or you should be able to install a Rust toolchain on the ARM64 machine
itself, if there is enough disk space available.

KVMR

unread,
Oct 11, 2023, 7:06:58 PM10/11/23
to Daniel Verkamp, crosvm-dev
Thank you, Daniel. I will build.

Regards
Venkat

KVMR

unread,
Oct 13, 2023, 4:06:27 PM10/13/23
to Daniel Verkamp, crosvm-dev
I've successfully built crosvm for arm64 using the dev_container. However, I've encountered a dependency issue. It seems that crosvm relies on libraries such as libX11, dbus, drm, Xext, and others, which are not part of our custom embedded Linux distribution. I'm wondering if it's possible to build crosvm for an embedded machine without a GUI environment.

Thanks
Venkat 

Daniel Verkamp

unread,
Oct 13, 2023, 4:16:03 PM10/13/23
to KVMR, crosvm-dev
You can try disabling all crosvm features and then only enabling the
ones you want:

cargo build --no-default-features --features=balloon,net

The features are documented here: https://crosvm.dev/doc/crosvm/#feature-flags

Максим Скопич

unread,
Oct 16, 2023, 12:25:27 PM10/16/23
to crosvm-dev, KVMR
Hello,
can you please share instruiction how to build crosvm using the dev_container?

Thanks!

пʼятниця, 13 жовтня 2023 р. о 23:06:27 UTC+3 KVMR пише:

Zihan Chen

unread,
Oct 16, 2023, 12:51:40 PM10/16/23
to Максим Скопич, crosvm-dev, KVMR
Hi,

You can simply run `./tools/dev_container ./tools/build_release` and
the artifact path within the container will be printed on your screen
after building is finished. You can copy the artifact out of the
container using your container runtime's command line or simply copy
the artifact to the source code directory within the container to
allow access to it on host.

Zihan
> --
> You received this message because you are subscribed to the Google Groups "crosvm-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to crosvm-dev+...@chromium.org.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crosvm-dev/18b3d72f-5c40-428b-a9f6-d7d0cb2b522en%40chromium.org.
> For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Максим Скопич

unread,
Oct 16, 2023, 1:50:10 PM10/16/23
to crosvm-dev, Zihan Chen, crosvm-dev, KVMR, Максим Скопич
Hi,

thank you for reply,
i successfully built crosvm, but when i'm trying it on android emulator, i got error:
"/bin/crosvm: No such file or directory"
It seems like linker path is different, i compared with "file" command on emulator:
1. file /bin/crosvm                                                
/bin/crosvm: ELF shared object, 64-bit LSB arm64, dynamic (/lib/ld-linux-aarch64.so.1), BuildID=36b0e375ddd66b6eee5761194d120d21525e7aee, not stripped

2.  file /bin/grep
/bin/grep: ELF shared object, 64-bit LSB arm64, dynamic (/system/bin/linker64), for Android 28, BuildID=405376f41805e17e9ebf33bee5d77579, stripped

Looks like i need build crosvm using android ndk, or how resolve this linker issue?
понеділок, 16 жовтня 2023 р. о 19:51:40 UTC+3 Zihan Chen пише:

KVMR

unread,
Oct 16, 2023, 3:15:28 PM10/16/23
to Максим Скопич, crosvm-dev
--no-default-features flag worked, I am able to launch crosvm on my embedded system without GUI.

I appreciate your assistance.

Thanks & Regards
Venkat

Daniel Verkamp

unread,
Oct 16, 2023, 3:33:50 PM10/16/23
to Максим Скопич, crosvm-dev, Zihan Chen, KVMR
If you are targeting Android, you would need to use a different build
environment - the crosvm dev_container cross toolchains target a
normal Debian Linux environment with glibc, which will definitely not
produce binaries that work on Android with the bionic libc, among
other differences.
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crosvm-dev/ed4e5b3f-2412-41cf-949e-78d82413cb8fn%40chromium.org.
Reply all
Reply to author
Forward
0 new messages