Automate the building of a working environment (Target Platform + Backend Hypervisor) for testing and running RunPHI.
This repository provides a unified framework to build the full software stack required to run RunPHI, both in emulated and real hardware environments.
Each environment consists of:
- Pre-Built Components: Board-specific firmware and dependencies that are not intended for modification (e.g., board-specific firmware).
- To-Build Components: Customizable software built using this repository (e.g., kernels, hypervisors, and RunPHI itself).
A dedicated configuration script (<target>-<backend>.sh) defines the set of components, Git repositories, commits, and compilation flags for each environment.
- QEMU
- Kria KV260 / KR260
- Xilinx Ultrascale+ (ZCU102, ZCU104, TEBF0808)
- ...
- Jailhouse (with Omnivisor)
- Xen (Work in Progress)
- ...
Warning
Recommended: Use Docker to avoid inconsistencies caused by different toolchain versions.
Be sure to add the username to the docker group
sudo usermod -aG docker <username>
newgrp dockerTo open a shell in the Docker image with all the needed dependencies, just run:
cd ~/environment_builder
docker build -t env_builder .
docker run -it --rm --user $(id -u):$(id -g) -v /etc/passwd:/etc/passwd:ro --net=host --name env_builder_container -v ${PWD}:/home -w="/home" env_builder /bin/bashapt-get update && apt-get install -y \
git make sed binutils diffutils python3 ninja-build build-essential \
bzip2 tar findutils unzip cmake rsync u-boot-tools \
gcc-arm-none-eabi gcc-aarch64-linux-gnu libglib2.0-dev \
libpixman-1-dev wget cpio rsync bc libncurses5 flex bison \
openssl libssl-dev kmod python3-pip file pkg-config
pip3 install MakoThe environments configurations, including GitHub repositories, commits, patches, and more, can be found in the following file:
environment_cfgs/<target>-<backend>.sh
More details about configurations are documented here.
Launch the following script to download, configure, and compile all the "To-Build Components" for the chosen <target> (e.g. qemu) and <backend> (e.g. jailhouse):
./scripts/build_environment.sh -t <target> -b <backend>The previous script set the default environment. To switch the default environment:
./scripts/change_environment.sh -t <target> -b <backend>You can override the default environment in any script using -t and -b flags.
Different environemnts have different setup steps (e.g., load the SD card with the produced artifacts).
Refer to the SETUP.md file specific for each target-backend in:
environment/<target>/<backend>/SETUP.md
Note
All the scripts in ./scripts/remote/* can be launched outside the docker container.
Allow password-less access to the running target (only once).
While the target is running:
./scripts/remote/set_remote_ssh.shSync the install directory (overlay directory specific to the enviornment) to the target.
While the target is running:
./scripts/remote/load_install_dir_to_remote.shLoad/update components (e.g., RunPHI and Jailhouse) on the target
While the target is running:
./scripts/remote/load_components_to_remote.sh -r -j -p <path_to_runphi_manager>Follow the DEMO.md in the relevant environment folder.
environment/<target>/<backend>/DEMO.md
Inside the Docker container:
./scripts/clean/destroy_build.shOn QEMU if you modify the overlay filesystem (
installdirectory), you must recompile Buildroot to apply changes.
Avoid bloating the root filesystem with unnecessary modifications.
For more information or contributions, please open an issue or contact the RunPHI maintainers.