Learning what goes into making an operating system 🤯
Also, I just wanted to practice rust 🤷🏻
📦 Build
-
Install rust nightly
$ rustup update nightly --force
-
Set nightly as default
$ rustup override set nightly
-
Install bootimage
$ cargo install bootimage
-
Build the project
$ cargo build
💻 Run
-
Run on QEMU
$ cargo run
-
Run on Real Machine
Build the project
$ cargo build
Connect an USB drive, and run
$ dd if=target/x86_64-dv_os/release/bootimage-dv_os.bin of=/dev/sdX && sync
Replace
sdX
with the location of the usb drive. Use this usb as bootable drive in the machine.Note: All the data in the usb drive will be overwritten.
✅ Test
-
Run tests
$ cargo test
Source of Learning: Writing an OS in Rust