diff --git a/docs/arm64.md b/docs/arm64.md index 7e451a8cc..44b059d9a 100644 --- a/docs/arm64.md +++ b/docs/arm64.md @@ -7,39 +7,6 @@ booting and direct-kernel booting. The document covers both methods. All the steps are based on Ubuntu. We use the Ubuntu cloud image for guest VM disk. -## Getting started - -We create a folder to build and run Cloud Hypervisor at `$HOME/cloud-hypervisor` - -```shell -$ export CLOUDH=$HOME/cloud-hypervisor -$ mkdir $CLOUDH -``` - -## Prerequisites - -You need to install some prerequisite packages to build and test Cloud Hypervisor. - -### Tools - -```bash -# Install rust tool chain -$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -# Install the tools used for building guest kernel, EDK2 and converting guest disk -$ sudo apt-get update -$ sudo apt-get install git build-essential m4 bison flex uuid-dev qemu-utils -``` - -### Building Cloud Hypervisor - -```bash -$ pushd $CLOUDH -$ git clone https://github.com/cloud-hypervisor/cloud-hypervisor.git -$ cd cloud-hypervisor -$ cargo build -$ popd -``` - ### Disk image Download the Ubuntu cloud image and convert the image type. diff --git a/docs/building.md b/docs/building.md index 419b0f75f..847ac6c9b 100644 --- a/docs/building.md +++ b/docs/building.md @@ -24,12 +24,15 @@ Hypervisor. Here, all the steps are based on Ubuntu, for other Linux distributions please replace the package manager and package name. ```shell -# Install build-essential, git, and qemu-utils -$ sudo apt install git build-essential qemu-utils +# Install basic packages needed. For a package list targeting for more +# functionalities for example the test, please see resources/Dockerfile. +$ sudo apt-get update +$ sudo apt install git build-essential m4 bison flex uuid-dev qemu-utils # Install rust tool chain $ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh # If you want to build statically linked binary please add musl target -$ rustup target add x86_64-unknown-linux-musl +$ rustup target add x86_64-unknown-linux-musl # x86-64 +$ rustup target add aarch64-unknown-linux-musl # AArch64 ``` ## Clone and build @@ -46,7 +49,8 @@ $ cargo build --release $ sudo setcap cap_net_admin+ep ./target/release/cloud-hypervisor # If you want to build statically linked binary -$ cargo build --release --target=x86_64-unknown-linux-musl --all +$ cargo build --release --target=x86_64-unknown-linux-musl --all # x86-64 +$ cargo build --release --target=aarch64-unknown-linux-musl --all # AArch64 $ popd ```