uefi-graphics-driver

Crates.iouefi-graphics-driver
lib.rsuefi-graphics-driver
version0.1.1
sourcesrc
created_at2023-04-11 15:22:17.517101
updated_at2023-04-11 15:31:11.251778
descriptionAn embedded-graphics display driver for UEFI environments
homepage
repositoryhttps://github.com/GengYage/uefi-graphics-driver
max_upload_size
id836121
size13,129
Geng (GengYage)

documentation

README

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
Commit count: 11

cargo fmt