Please note this is a work in progress.
A crosvm build environment targeting the Pixel 8, using the AOSP build tools and Rust.
As per the AOSP Documentation, you'll need to install these packages.
sudo apt install git-core gnupg flex bison build-essential zip curl zlib1g-dev libc6-dev-i386 libncurses5 x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig
sudo apt install repo
Then you'll need to install rust.
Also install the android target for rust:
rustup target add aarch64-linux-android
Note this (old-ish) tutorial for reference. Though bear in mind this is NDK oriented, we are building with the AOSP toolchain.
Hypothetically:
cd platform
# This only clones the build tools needed from AOSP, not the entire source tree.
# However it will still take up alot of space.
./fetch-aosp-repo.sh
# Once the AOSP projects are done syncing, activate the toolchain.
source build/envsetup.sh
# Set the lunch menu to target 'aosp_shiba', from 'trunk_staging' and with 'userdebug' build mode.
lunch aosp_shiba-trunk_staging-userdebug
# Build crosvm
mm external/crosvm