Skip to content
/ Leo Public

Leo Hypervisor. ARM64 Hypervisor on Raspberry Pi 4 machine.

License

Notifications You must be signed in to change notification settings

SikkiLadho/Leo

Repository files navigation

Generic badge C/C++ CI

Leo Hypervisor

Leo is a Type 1 Hypervisor for the Raspberry Pi 4.

Set Up

This setup was tested on Debian.

  1. Install the required dependencies and toolchain,
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
  1. Install the 64-bit toolchain for a 64-bit kernel,
sudo apt install crossbuild-essential-arm64
  1. Compile ARM-trusted-Firmware for Raspiberry Pi,
git clone https://github.com/ARM-software/arm-trusted-firmware.git
cd arm-trusted-firmware/
CROSS_COMPILE=aarch64-linux-gnu- make PLAT=rpi4 DEBUG=1
  1. Copy the bl31.bin from Trusted Firmware-A (TF-A) to the /boot/ directory on the Raspberry Pi 4B's SD card,
cp build/rpi4/debug/bl31.bin /media/me/boot/
  1. Rename kerne8.img to el1-kernel.img in the SD Card's boot directory,
mv /media/boot/kernel8.img el1-kernel8.img
  1. Compile Leo ARM64 Hypervisor
git clone https://github.com/sikkiladho/leo.git leo
cd leo
make

You will get the kernel8.img binary, which is the hypervisor binary. Copy it to you SD Card.

  1. Add following to /boot/config.txt in Raspberry Pi Model 4B
enable_uart=1
arm_64bit=1
enable_gic=1
armstub=bl31.bin
initramfs el1-kernel.img 0x400000