A bootloader written in rust
| bios | ||
| common | ||
| modules | ||
| src | ||
| tools | ||
| .gitignore | ||
| 32bit-module.json | ||
| bits16-bootsector.json | ||
| bochsrc.bxrc | ||
| build.rs | ||
| bx_enh_dbg.ini | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| readme.md | ||
| rust-toolchain.toml | ||
| test.sh | ||
rustboot
A bootloader entirely written in rust.
License
This project is licensed under AGPL3.0-or-later; for more details see the LICENSE file.
How to build
- Install rustup
- Install the rust nightly toolchain
- Run
cargo buildin the repositories root. - ...
- Profit!
How to use
Currently, only the stage1 of the bootloader is implemented; usage is somewhat limited. However, it can be loaded up by both QEMU and bochs and read & execute itself again, demonstrating that it is indeed functional.
To do exactly that, use the test.sh script inside the repo. As first argument supply the emulator you want to use; supported are currently qemu and bochs:
./test.sh qemu, or./test.sh bochs
FAQ (Or simply some infos that might come up all over the place):
- Q: Whats a
kern? A: It's a german word forcoreand was choosen for a number of reasons, including to not be confusing with rust'scorecrate, and because I didn't want to use the wordkernelas this word is commonly assosicated with something like the linux kernel, and would give folks a false impression of what akernin rustboot is. It's just the core of rustboot itself, reponsible for loading modules and actually doing stuff to get towards a bootable system.
Attribution & Thanks
- GRUB for an amazing piece of software that inspired a lot of the features of this project. I learned a lot by reading through their sourcecode!
- num_traits for ispiration how to do casting of primitives via generics & traits.