#x86-64 #bootloader #bios #boot #sector #qemu #stage

app bootloader-x86_64-bios-boot-sector

BIOS boot sector for the bootloader crate

14 releases

0.11.7 Feb 16, 2024
0.11.6 Jan 28, 2024
0.11.5 Dec 28, 2023
0.11.4 Jul 5, 2023
0.1.0-beta.1 Nov 13, 2022

#590 in Operating systems

Download history 115/week @ 2023-12-23 108/week @ 2023-12-30 147/week @ 2024-01-06 200/week @ 2024-01-13 222/week @ 2024-01-20 282/week @ 2024-01-27 252/week @ 2024-02-03 288/week @ 2024-02-10 283/week @ 2024-02-17 226/week @ 2024-02-24 206/week @ 2024-03-02 295/week @ 2024-03-09 290/week @ 2024-03-16 231/week @ 2024-03-23 307/week @ 2024-03-30 249/week @ 2024-04-06

1,148 downloads per month

MIT/Apache

10KB
245 lines

First Stage: Bootsector

This executable needs to fit into the 512-byte boot sector, so we need to use all kinds of tricks to keep the size down.

Build Commands

  1. cargo build --release -Zbuild-std=core --target x86-16bit.json -Zbuild-std-features=compiler-builtins-mem
  2. `objcopy -I elf32-i386 -O binary target/x86-16bit/release/first_stage target/disk_image.bin

To run in QEMU:

  • qemu-system-x86_64 -drive format=raw,file=target/disk_image.bin

To print the contents of the ELF file, e.g. for trying to bring the size down:

  • objdump -xsdS -M i8086,intel target/x86-16bit/release/first_stage

No runtime deps