Ratatui without OS, directly in UEFI

sermuns1 pts0 comments

GitHub - sermuns/ratatuefi: Zero-bloat Ratatui apps in UEFI · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

sermuns

ratatuefi

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star<br>97

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>30 Commits<br>30 Commits

.cargo

.cargo

examples

examples

media

media

src

src

.gitignore

.gitignore

Cargo.lock

Cargo.lock

Cargo.toml

Cargo.toml

README.md

README.md

justfile

justfile

rust-toolchain.toml

rust-toolchain.toml

View all files

Repository files navigation

Zero-bloat Ratatui in UEFI, no OS

qemu-demo.mp4

physical-demo.mp4

Running in QEMU

Install packages:

pacman -S qemu-system-x86_64 edk2-ovmf

(optionally, install some graphics backend, but you can also VNC into the VM)

pacman -S qemu-ui-sdl

Create virtual EFI layout

just create-virtual-uefi-layout

then build and symlink the .efi in:

( is something like ./target/x86_64-unknown-uefi/debug/.efi)

esp/efi/boot/bootx64.efi">ln -sf EFI> esp/efi/boot/bootx64.efi

Start QEMU

just qemu

Running on a physical machine

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<br># partition type to EFI System.<br>sgdisk \<br>--clear \<br>--new=1:1M:10M \<br>--typecode=1:C12A7328-F81F-11D2-BA4B-00A0C93EC93B \<br>/path/to/disk

# Format the partition as FAT.<br>mkfs.fat /path/to/disk_partition

# Mount the partition.<br>mount --mkdir /path/to/disk_partition /mnt/ratatuefi

# Create the boot directory.<br>mkdir -p /mnt/ratatuefi/EFI/BOOT

# Copy in the boot executable.<br>cp $CARGO_TARGET_DIR/x86_64-unknown-uefi/debug/ratatuefi.efi /mnt/ratatuefi/EFI/BOOT/BOOTX64.EFI

# Eject the USB drive<br>eject /path/to/disk

Important<br>disable secure boot on machine before trying to boot

try booting it!

Ideas for improving

it is slow as hell to draw. could possibly be improved by

adding a buffer, and rendering full lines? currently we are rawdoggin character-for-character.

switching to manual VGA graphics (use mousefood?)

was fixed by using -display sdl,gl=on!<br>somehow running without OpenGL makes it really slow!

About

Zero-bloat Ratatui apps in UEFI

Resources

Readme

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

97<br>stars

Watchers

watching

Forks

forks

Report repository

Releases

No releases published

Packages

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

Rust<br>90.5%

Just<br>9.5%

You can’t perform that action at this time.

uefi boot ratatuefi create reload cargo

Related Articles