Skip to content

unefix is a lightweight C++ UEFI library for OS developers, providing easy entry points, system table access, and PE/COFF executables ready to boot in QEMU, without relying on GNU EFI or mingw.

License

Notifications You must be signed in to change notification settings

iDontHaveTime/unefix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unefix (pronounced you-neh-fix)

A minimal, freestanding UEFI library in C++ for OS devs.

unefix is a lightweight and independent UEFI library that allows you to write UEFI applications and OS boot code without relying on GNU EFI or mingw. It works out-of-the-box with Clang + LLD (requirements), and only depends on CMake and Make for building.

Features

  • Pure C++ freestanding library, no external dependencies (besides Clang + LLD).
  • PE/COFF executable ready to boot in QEMU with OVMF.
  • Has minimal exceptions and rtti support
  • Fully supports virtual functions

Quickstart

# Clone
git clone https://github.com/iDontHaveTime/unefix.git
cd unefix

# Build
mkdir build
cmake -S . -B build
cmake --build build
make

Running it

After building, your UEFI executable (BOOTX64.EFI) will be located in build/efi/BOOT/. To run it in QEMU with OVMF:

# Make sure OVMF is installed.

mkdir -p efi_test
# Copy OVMF_VARS to keep UEFI variable changes persistent
cp /usr/share/ovmf/x64/OVMF_VARS.4m.fd efi_test/OVMF_VARS.fd

qemu-system-x86_64 \
    -drive if=pflash,format=raw,readonly=on,file=/usr/share/ovmf/x64/OVMF_CODE.4m.fd \
    -drive if=pflash,format=raw,file=efi_test/OVMF_VARS.fd \
    -drive file=fat:rw:efi,format=raw \
    -m 512M

Documentation

You can find the documentation in the docs folder.


Roadmap

  • Add filesystem support. (half done)
  • Expand into a full UEFI standard library for OS development.
  • Kernel Loader (ELF Loader)

About

unefix is a lightweight C++ UEFI library for OS developers, providing easy entry points, system table access, and PE/COFF executables ready to boot in QEMU, without relying on GNU EFI or mingw.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published