Leo
is a Type 1 Hypervisor
for the Raspberry Pi 4
.
This setup was tested on Debian.
- Install the required dependencies and toolchain,
sudo apt install git bc bison flex libssl-dev make libc6-dev libncurses5-dev
- Install the 64-bit toolchain for a 64-bit kernel,
sudo apt install crossbuild-essential-arm64
- 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
- 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/
- Rename
kerne8.img
toel1-kernel.img
in the SD Card's boot directory,
mv /media/boot/kernel8.img el1-kernel8.img
- 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.
- 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