The Boot Process

Patch for bootloader_api crate

bootloader_api를 이용하려 하였으나, x86 dependent한 요소가 많아 더 이상 이용하지 않음

Bootable Disk Image

  • Update: abandon creating disk image since our os will boot on uefi-app
  • Update: abandon uefi since there were some compatibility issue when using asm
mkdir kernel
mv src kernel/
mv Cargo.toml kernel/
cargo init --new cosmos
# top-level Cargo.toml
[workspace]
members = ["kernel"]

UEFI APP

rustup install nightly
# rust-toolchain.toml
[toolchain]
channel = "nightly"
rustup target add aarch64-unknown-uefi
cargo build --target aarch64-unknown-uefi

BIOS vs UEFI

BIOS

Basic Input Output System

  • Stored in EPROM (Erasable Programmable Read Only Memory)
  • Uses MBR Partitioning Scheme
  • Legacy Way
  • Requires 16bit-32bit-64bit transition since it starts on 16bit mode

UEFI

Unified Extensible Firmware Interface

  • Requires EFI System Partition (ESP) to store .efi file
  • .efi file includes all device initialization & startup codes.. (could be kernel itself)
  • Uses GPT Partitioning scheme

An example of the UEFI graphical UI.

Reference