#bootloader #x86 #bios #boot #partition-table #partition #x86-64

app bootloader-x86_64-bios-boot-sector

BIOS boot sector for the bootloader crate

11 releases

0.11.4 Jul 5, 2023
0.11.3 Mar 26, 2023
0.11.0 Dec 1, 2022
0.11.0-beta.4 Nov 27, 2022
0.1.0-beta.1 Nov 13, 2022

#215 in Operating systems

Download history 364/week @ 2023-06-06 313/week @ 2023-06-13 398/week @ 2023-06-20 318/week @ 2023-06-27 303/week @ 2023-07-04 237/week @ 2023-07-11 527/week @ 2023-07-18 371/week @ 2023-07-25 252/week @ 2023-08-01 397/week @ 2023-08-08 401/week @ 2023-08-15 279/week @ 2023-08-22 374/week @ 2023-08-29 235/week @ 2023-09-05 378/week @ 2023-09-12 221/week @ 2023-09-19

1,255 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