google / alioth

Experimental KVM-based type-2 hypervisor in Rust implemented from scratch.
Apache License 2.0
164 stars 10 forks source link

Support boot from oak/stage0 firmware #17

Closed Lencerf closed 6 months ago

Lencerf commented 6 months ago

Alioth is able to boot a Linux ELF kernel along with the oak/stage0[1] firmware by

target/x86_64-unknown-linux-gnu/release/alioth \
    --log-to-file \
    run \
    --num-cpu 2 \
    --mem-size 1G \
    -f $HOME/data/oak_stage0.bin \
    --fw-cfg opt/stage0/elf_kernel,file=$HOME/data/vmlinuz-6.6.17.bin \
    --fw-cfg opt/stage0/initramfs,file=$HOME/data/initramfs.linux_amd64.cpio \
    --fw-cfg opt/stage0/cmdline,string="console=ttyS0"

[1] https://github.com/project-oak/oak/tree/main/stage0_bin