All Projects → ajxs → uefi-elf-bootloader

ajxs / uefi-elf-bootloader

Licence: GPL-3.0 license
UEFI ELF Bootloader example

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to uefi-elf-bootloader

Hackintosh-ASUS-A455LF-Notebook
EFI Folder for ASUS A455LF-WX039D Notebook Series with Clover/OpenCore Legacy or UEFI
Stars: ✭ 27 (-32.5%)
Mutual labels:  uefi, bootloader, efi
SnowFlake
Technology is free, SnowFlakeOS
Stars: ✭ 38 (-5%)
Mutual labels:  osdev, uefi, uefi-boot
sicherboot
Unmaintained systemd-boot integration with secure boot support; consider https://github.com/Foxboron/sbctl instead.
Stars: ✭ 31 (-22.5%)
Mutual labels:  uefi, bootloader, efi
Veracrypt Dcs
VeraCrypt EFI Bootloader for EFI Windows system encryption (LGPL)
Stars: ✭ 81 (+102.5%)
Mutual labels:  uefi, bootloader, efi
efi
Ergonomic Rust framework for writing UEFI applications.
Stars: ✭ 44 (+10%)
Mutual labels:  uefi, bootloader, efi
biefircate
Running x86-16 or x86-32 code from x86-64 UEFI; _very experimental_ • mirror of https://gitlab.com/tkchia/biefircate • developer notes at https://gitlab.com/tkchia/biefircate/-/blob/main/doc/NOTES.asciidoc
Stars: ✭ 47 (+17.5%)
Mutual labels:  osdev, uefi, gnu-efi
Uefi Rs
Rust wrapper for UEFI.
Stars: ✭ 582 (+1355%)
Mutual labels:  osdev, uefi
Toaru Nih
NOTICE: The ToaruOS-NIH Project has been MERGED UPSTREAM. This repository is now archived.
Stars: ✭ 66 (+65%)
Mutual labels:  osdev, bootloader
Monkos
an experimental 64-bit operating system
Stars: ✭ 100 (+150%)
Mutual labels:  osdev, bootloader
Cyjon
A simple, clean code, multi-tasking operating system written in pure assembly language for 64-bit processors from the AMD64 family.
Stars: ✭ 184 (+360%)
Mutual labels:  osdev, bootloader
Tofita
🍬 All-new kernel for @GreenteaOS
Stars: ✭ 112 (+180%)
Mutual labels:  osdev, uefi
meta-secure-core
OpenEmbedded layer for the use cases on secure boot, integrity and encryption
Stars: ✭ 80 (+100%)
Mutual labels:  uefi, efi
Krabs
An x86 bootloader written in Rust.
Stars: ✭ 413 (+932.5%)
Mutual labels:  osdev, bootloader
Toaruos
A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
Stars: ✭ 4,687 (+11617.5%)
Mutual labels:  osdev, bootloader
Dgos
Operating System
Stars: ✭ 90 (+125%)
Mutual labels:  osdev, bootloader
stoomboot
An x86 real mode multiboot-ish ELF bootloader
Stars: ✭ 19 (-52.5%)
Mutual labels:  osdev, bootloader
MetalOS
Homebrew x64 OS written in C++ that runs Doom!
Stars: ✭ 33 (-17.5%)
Mutual labels:  uefi, bootloader
Hekate
hekate - A GUI based Nintendo Switch Bootloader
Stars: ✭ 3,286 (+8115%)
Mutual labels:  uefi, bootloader
CloverEFI-4MU
Manually install Clover EFI Bootloader via Linux System on Legacy BIOS or UEFI Firmware.
Stars: ✭ 93 (+132.5%)
Mutual labels:  uefi, bootloader
MultiOS-USB
Boot operating systems directly from ISO files
Stars: ✭ 106 (+165%)
Mutual labels:  uefi, uefi-boot

uefi-elf-bootloader

This repository contains a simple UEFI ELF bootloader which loads a simple demonstration kernel. It provides an extremely basic example implementation of a UEFI bootloader for a bare-metal x86-64 system, though this example should be portable to other architectures.

The aim of this repository is to serve as a basic teachable example of how to implement a UEFI bootloader.

Build instructions

This bootloader assumes a GCC cross-compiler toolchain targeting the bare-metal x86_64-elf architecture. Instructions for building and obtaining a valid cross-compiler toolchain can be found here.

This bootloader can be built simply by running make within the src directory. This will create the build/kernel.img file, which is a bootable disk image containing the bootloader loading a demonstration kernel. There is a run script within the root directory containing a script for testing the bootloader/kernel combination using QEMU.

Build dependencies

  • GNU Make
  • GNU EFI
  • An x86_64-elf-gcc cross-compiler toolchain present in PATH

Project structure

This project is broken down into two distinct components: The bootloader, and the example kernel. These can be found in the src/bootloder and src/kernel directories respectively. These can be built and tested individually using the makefiles within their individual directories. Running the makefile within the top level src directory will build the entire project.

Bootloader

The bootloader component of this repository, contained within the src/bootloader directory, contains the basic implementation of a UEFI ELF bootloader for the x86-64 platform. The bootloader is hardcoded to load and execute a bare-metal x86-64 application located at /kernel.elf on the boot media. This path can be modifid from within the src/bootloader/src/include/bootloader.h file by modifying the KERNEL_INCLUDE_PATH preprocessor directive.

The bootloader will output debugging information over the system's serial port, if present. Otherwise VGA output will be used.

The bootloader passes a Kernel_Boot_Info struct to the loaded kernel containing basic system information, such as the memory map. This struct is defined within the src/bootloader/src/include/bootloader.h header file. This implementation is not tied to any specific architecture.

The bootloader will open the Graphics Output Protocol and Serial Protocol. A routine has been provided for drawing a test screen to demonstrate that the graphics output protocol has been loaded correctly. This can be toggled by setting the DRAW_TEST_SCREEN preprocessor directive at the top of the src/bootloader/src/main.c file.

Kernel

This repository contains a minimal x86-64 kernel for testing purposes. This is located within the src/kernel directory. It contains a basic UART implementation suitable for testing that the kernel has been correctly loaded.

Feedback

Feel free to direct any questions or feedback to me directly at ajxs [at] panoptic.online

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].