commit | 1082a095c8523740e76d1630ee544228e3273204 | [log] [tgz] |
---|---|---|
author | David Greenaway <dgreenaway@google.com> | Thu May 23 15:14:06 2019 +1000 |
committer | David Greenaway <dgreenaway@google.com> | Fri May 24 09:46:07 2019 +1000 |
tree | 2ede9ed4f8eca09379b47945ff724f31db4d5397 | |
parent | 945d718f9936133c3ae43be2f1dfade77bedf482 [diff] |
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}