#uefi #graphics #no-std

no-std uefi-graphics-driver

An embedded-graphics display driver for UEFI environments

1 unstable release

0.1.1 Apr 11, 2023
0.1.0 Apr 11, 2023

#50 in #uefi

28 downloads per month

MIT/Apache

5KB
71 lines

uefi code run

  1. install qemu and edk2-ovmf
sudo pacman -S qemu-full
sudo pacman -S edk2-ovmf --needed
  1. install uefi toolchain
rustup target add x86_64-unknown-uefi
  1. build
cargo build --target x86_64-unknown-uefi --example uefi_emvedded
  1. copy and mkdir
cp /usr/share/edk2/x64/OVMF_CODE.fd .
cp /usr/share/edk2/x64/OVMF_VARS.fd .

mkdir -p esp/efi/boot
cp target/x86_64-unknown-uefi/debug/examples/uefi_emvedded.efi esp/efi/boot/bootx64.efi
  1. run qemu
qemu-system-x86_64 -nodefaults \
    -device virtio-rng-pci \
    -machine q35 \
    -smp 4 \
    -m 256M -vga std \
    --enable-kvm \
    -device isa-debug-exit,iobase=0xf4,iosize=0x04 \
    -drive if=pflash,format=raw,readonly=on,file=OVMF_CODE.fd \
    -drive if=pflash,format=raw,readonly=on,file=OVMF_VARS.fd \
    -drive format=raw,file=fat:rw:esp

Dependencies

~3MB
~63K SLoC