15 releases
new 0.11.8 | Nov 2, 2024 |
---|---|
0.11.7 | Feb 16, 2024 |
0.11.6 | Jan 28, 2024 |
0.11.5 | Dec 28, 2023 |
0.11.0-beta.4 | Nov 27, 2022 |
#207 in Operating systems
791 downloads per month
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
cargo build --profile=stage-1 -Zbuild-std=core --target ../../i386-code16-boot-sector.json -Zbuild-std-features=compiler-builtins-mem
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