mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
926 B
926 B
layout, title, related_posts
| layout | title | related_posts |
|---|---|---|
| post | [DRAFT] Rust OS Part 1: Booting |
Fortunately there is a bootloader standard: the Multiboot Specification. So our kernel just needs to indicate that it supports Multiboot and every Multiboot-compliant bootloader can boot it. We will use the GRUB 2 bootloader together with the Multiboot 2 specification. So let's begin!
To indicate our Multiboot 2 support to the bootloader, our kernel must contain a Multiboot Header, which has the following format:
| Field | Size in byte |
|---|---|
| magic number | 4 |
| Offset | Type | Field Name |
|---|---|---|
| 0 | u32 | magic |
| 4 | u32 | architecture |
| 8 | u32 | header_length |
| 12 | u32 | checksum |
| 16-XX | tags |