Zero-bloat Ratatui in UEFI, no OS
https://github.com/user-attachments/assets/338462fb-39e2-458e-b789-f591abd682b3
https://github.com/user-attachments/assets/9c12cd86-6aef-4f9b-9006-e8e9d527dcc2
This library provides a (no_std) UEFI backend for Ratatui that is based on the uefi crate.
Together with uefi, you can create rich TUI's that run as EFI applications.
efimux is an EFI application for booting other EFI applications, built on ratatuefi.Also check examples/.
Install packages:
pacman -S qemu-system-x86_64 edk2-ovmf
(optionally, install some graphics backend (recommend sdl+opengl), but you can also VNC into the VM)
pacman -S qemu-ui-sdl qemu-ui-opengl
Create virtual EFI layout
just create-virtual-uefi-layout
then build and symlink the .efi in:
(<EFI> is something like ./target/x86_64-unknown-uefi/debug/<PACKAGE-NAME>.efi)
ln -sf <EFI> esp/efi/boot/bootx64.efi
Start QEMU
just qemu
from https://rust-osdev.github.io/uefi-rs/tutorial/hardware.html
Connect a USB drive. Follow steps below.
# Create the GPT, create a 9MB partition starting at 1MB, and set the
# partition type to EFI System.
sgdisk \
--clear \
--new=1:1M:10M \
--typecode=1:C12A7328-F81F-11D2-BA4B-00A0C93EC93B \
/path/to/disk
# Format the partition as FAT.
mkfs.fat /path/to/disk_partition
# Mount the partition.
mount --mkdir /path/to/disk_partition /mnt/ratatuefi
# Copy in the boot executable.
cp -rL esp/efi /mnt/ratatuefi/
# Eject the USB drive
eject /path/to/disk
[!IMPORTANT] disable secure boot on machine before trying to boot
Now try booting the USB drive!
59 commits
Rust
90.1%
Just
9.9%
Zero-bloat Ratatui in UEFI, no OS
https://github.com/user-attachments/assets/338462fb-39e2-458e-b789-f591abd682b3
https://github.com/user-attachments/assets/9c12cd86-6aef-4f9b-9006-e8e9d527dcc2
This library provides a (no_std) UEFI backend for Ratatui that is based on the uefi crate.
Together with uefi, you can create rich TUI's that run as EFI applications.
efimux is an EFI application for booting other EFI applications, built on ratatuefi.Also check examples/.
Install packages:
pacman -S qemu-system-x86_64 edk2-ovmf
(optionally, install some graphics backend (recommend sdl+opengl), but you can also VNC into the VM)
pacman -S qemu-ui-sdl qemu-ui-opengl
Create virtual EFI layout
just create-virtual-uefi-layout
then build and symlink the .efi in:
(<EFI> is something like ./target/x86_64-unknown-uefi/debug/<PACKAGE-NAME>.efi)
ln -sf <EFI> esp/efi/boot/bootx64.efi
Start QEMU
just qemu
from https://rust-osdev.github.io/uefi-rs/tutorial/hardware.html
Connect a USB drive. Follow steps below.
# Create the GPT, create a 9MB partition starting at 1MB, and set the
# partition type to EFI System.
sgdisk \
--clear \
--new=1:1M:10M \
--typecode=1:C12A7328-F81F-11D2-BA4B-00A0C93EC93B \
/path/to/disk
# Format the partition as FAT.
mkfs.fat /path/to/disk_partition
# Mount the partition.
mount --mkdir /path/to/disk_partition /mnt/ratatuefi
# Copy in the boot executable.
cp -rL esp/efi /mnt/ratatuefi/
# Eject the USB drive
eject /path/to/disk
[!IMPORTANT] disable secure boot on machine before trying to boot
Now try booting the USB drive!
59 commits
Rust
90.1%
Just
9.9%