#bootloader #x86-64-bootloader #x86-64-bios

app bootloader-x86_64-bios-boot-sector

BIOS boot sector for the bootloader crate

17 releases

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

#519 in Operating systems

Download history 216/week @ 2024-12-06 186/week @ 2024-12-13 67/week @ 2024-12-20 241/week @ 2024-12-27 242/week @ 2025-01-03 297/week @ 2025-01-10 176/week @ 2025-01-17 248/week @ 2025-01-24 233/week @ 2025-01-31 269/week @ 2025-02-07 204/week @ 2025-02-14 246/week @ 2025-02-21 205/week @ 2025-02-28 148/week @ 2025-03-07 233/week @ 2025-03-14 144/week @ 2025-03-21

761 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