1# Setup Instructions 2 3## Development Environment 4 5We recommend using a Docker container with the required compilers and tools for 6convenience. 7 8A separate _Gunyah Support Scripts_ repository is maintained with reference 9Docker based environment instructions and scripts. 10 11See: 12[Gunyah Support Scripts](https://github.com/quic/gunyah-support-scripts/tree/develop) 13 14```bash 15git clone https://github.com/quic/gunyah-support-scripts.git 16``` 17 18## Custom Dev Environment 19 20If you intend to setup your own development environment, you can follow the 21reference Docker setup on your development host. This process is not 22documented. 23 24### Toolchain 25 26The Gunyah Hypervisor projects use the LLVM v15 toolchain, cross-compiled for 27AArch64 and musl libc. This is due to standalone application VMs (Resource 28Manager) are built with a runtime supporting the musl libc library. 29 30### Set up environment variables 31 32You must set the following environment variables: 33```bash 34export LLVM=/path/to/llvm15/ 35``` 36> Note, when using the toolchain built with the provided script, point to the "llvm-musl-install" generated folder. 37> `export LLVM=/path/to/llvm-musl-install` 38 39- To point to the C application sysroot: 40```bash 41export LOCAL_SYSROOT=/path/to/c-application-sysroot 42``` 43 44### Install the Python dependencies 45 46Create a virtual environment, activate it, and install the modules used by the auto-generation code: 47 48```bash 49python3 -m venv gunyah-venv 50. gunyah-venv/bin/activate 51pip install -r <path-to-gunyah-src>/tools/requirements.txt 52``` 53 54We recommend installing the Python environment _outside_ the Gunyah source 55directory. This is so the automatic dependency detection in the Python scripts 56ignores modules imported from the virtual environment. 57