#bootloader #x86-64 #bios #boot #sector #elf #elf-binary

app bootloader-x86_64-bios-boot-sector

BIOS boot sector for the bootloader crate

17 releases

new 0.11.10 Feb 10, 2025
0.11.9 Nov 30, 2024
0.11.7 Feb 16, 2024
0.11.5 Dec 28, 2023
0.11.0-beta.4 Nov 27, 2022

#196 in Operating systems

Download history 157/week @ 2024-10-26 350/week @ 2024-11-02 311/week @ 2024-11-09 224/week @ 2024-11-16 248/week @ 2024-11-23 407/week @ 2024-11-30 209/week @ 2024-12-07 176/week @ 2024-12-14 159/week @ 2024-12-21 153/week @ 2024-12-28 262/week @ 2025-01-04 278/week @ 2025-01-11 201/week @ 2025-01-18 218/week @ 2025-01-25 236/week @ 2025-02-01 248/week @ 2025-02-08

926 downloads per month

MIT/Apache

11KB
252 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 --profile=stage-1 -Zbuild-std=core --target ../../i386-code16-boot-sector.json -Zbuild-std-features=compiler-builtins-mem
  2. objcopy -I elf32-i386 -O binary ../../target/i386-code16-boot-sector/stage-1/bootloader-x86_64-bios-boot-sector ../../target/disk_image.img

To run in QEMU:

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

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

  • objdump -xsdS -M i8086,intel ../../target/i386-code16-boot-sector/stage-1/bootloader-x86_64-bios-boot-sector

No runtime deps