Merge "build script which uses docker" into main
diff --git a/build/debian/build.sh b/build/debian/build.sh
index 170d6ca..c50e5e5 100755
--- a/build/debian/build.sh
+++ b/build/debian/build.sh
@@ -38,13 +38,16 @@
DEBIAN_FRONTEND=noninteractive \
apt install --no-install-recommends --assume-yes \
binfmt-support \
+ build-essential \
ca-certificates \
+ curl \
debsums \
dosfstools \
fai-server \
fai-setup-storage \
fdisk \
gcc-aarch64-linux-gnu \
+ libc6-dev-arm64-cross \
make \
python3 \
python3-libcloud \
@@ -58,11 +61,12 @@
udev \
- which cargo > /dev/null 2>&1 || {
- apt install --no-install-recommends --assume-yes rustup
- rustup default stable
- rustup update
- }
+ if [ ! -f $HOME/.cargo/bin/cargo ]; then
+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
+ fi
+
+ source $HOME/.cargo/env
+ rustup target add aarch64-unknown-linux-gnu
sed -i s/losetup\ -f/losetup\ -P\ -f/g /usr/sbin/fai-diskimage
sed -i 's/wget \$/wget -t 0 \$/g' /usr/share/debootstrap/functions
@@ -97,7 +101,7 @@
wget ${url} -O ${dst}/files/usr/local/bin/ttyd/AVF
chmod 777 ${dst}/files/usr/local/bin/ttyd/AVF
- pushd forwarder_guest > /dev/null
+ pushd $(dirname $0)/forwarder_guest > /dev/null
RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build \
--target aarch64-unknown-linux-gnu \
--target-dir ${workdir}/forwarder_guest
diff --git a/guest/pvmfw/README.md b/guest/pvmfw/README.md
index 58ba10c..3ffa3f0 100644
--- a/guest/pvmfw/README.md
+++ b/guest/pvmfw/README.md
@@ -233,10 +233,10 @@
[header]: src/config.rs
[DTBO]: https://android.googlesource.com/platform/external/dtc/+/refs/heads/main/Documentation/dt-object-internal.txt
-[debug_policy]: ../docs/debug/README.md#debug-policy
-[device_assignment]: ../docs/device_assignment.md
+[debug_policy]: ../../docs/debug/README.md#debug-policy
+[device_assignment]: ../../docs/device_assignment.md
[secretkeeper_key]: https://android.googlesource.com/platform/system/secretkeeper/+/refs/heads/main/README.md#secretkeeper-public-key
-[vendor_hashtree_digest]: ../microdroid/README.md#verification-of-vendor-image
+[vendor_hashtree_digest]: ../../build/microdroid/README.md#verification-of-vendor-image
#### Virtual Platform DICE Chain Handover
@@ -402,7 +402,7 @@
};
```
-[dt.md]: ../docs/device_trees.md#avf_specific-properties-and-nodes
+[dt.md]: ../../docs/device_trees.md#avf_specific-properties-and-nodes
### Guest Image Signing
diff --git a/libs/framework-virtualization/README.md b/libs/framework-virtualization/README.md
index 0dd7e64..a742ccc 100644
--- a/libs/framework-virtualization/README.md
+++ b/libs/framework-virtualization/README.md
@@ -1,12 +1,12 @@
# Android Virtualization Framework API
These Java APIs allow an app to configure and run a Virtual Machine running
-[Microdroid](../build/microdroid/README.md) and execute native code from the app (the
+[Microdroid](../../build/microdroid/README.md) and execute native code from the app (the
payload) within it.
-There is more information on AVF [here](../README.md). To see how to package the
+There is more information on AVF [here](../../README.md). To see how to package the
payload code that is to run inside a VM, and the native API available to it, see
-the [VM Payload API](../libs/libvm_payload/README.md)
+the [VM Payload API](../libvm_payload/README.md)
The API classes are all in the
[`android.system.virtualmachine`](src/android/system/virtualmachine) package.
diff --git a/libs/libvm_payload/README.md b/libs/libvm_payload/README.md
index 8ef1bac..bbcfc61 100644
--- a/libs/libvm_payload/README.md
+++ b/libs/libvm_payload/README.md
@@ -9,7 +9,7 @@
available in the VM, and only 64 bit code is supported.
To create a VM and run the payload from Android see the [AVF Java
-APIs](../libs/framework-virtualization/README.md).
+APIs](../framework-virtualization/README.md).
## Entry point