commit | 6b3b8c9e60d122f61d7d5ecefcd0cea3203a5ea1 | [log] [tgz] |
---|---|---|
author | David Greenaway <dgreenaway@google.com> | Fri May 24 09:58:04 2019 +1000 |
committer | David Greenaway <dgreenaway@google.com> | Fri May 24 09:58:04 2019 +1000 |
tree | a472b424f09b1b2d78736f42de7be8ac00d60009 | |
parent | e03cc08e366d9424a87ea3895f39731f21b1a351 [diff] |
Better error messages for "build.sh" without an ARM toolchain. When running "build.sh" targeting ARM64, but no toolchain is installed, give a more useful error message about how to install it. Change-Id: I94b3fe3390fb6c27bcafafdf0662f58afd0bd4e8
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
To compile to ARM targets, you will also need to have an appropriate cross-compiler in your path. For Debian-based systems, this can be installed by running the following command:
$ sudo apt install gcc-aarch64-linux-gnu
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}