Fix "virtio_block_test_util" build on GNU/Linux systems. libc::ioctl has a "c_ulong" type on native GNU/Linux x86_64 systems, but a "c_int" type on Fuchsia systems. We can avoid specifying the type and allow Rust to infer it to allow the tool to build in both environments. Change-Id: Iddff2ef4549f6c0bf6c6b1532ca785eb452204d0
This repository contains utilities for running integration tests for Linux guests under Machina.
First install rust (follow the instructions of the rustup tool):
$ curl https://sh.rustup.rs -sSf | sh $ source ~/.cargo/env
Next we add some new targets for cross-compiling and static linking. Rust supports statically linking libc by replacing the usual gnu libc with musl (see The Rust Book: Advanced Linking).
$ rustup target add x86_64-unknown-linux-musl $ rustup target add aarch64-unknown-linux-musl
Lastly, run the build script for your desired architecture. This will invoke cargo for you as well as create an ext2 image in out/.
$ ./build.sh {arm64|x64}