x86_64 OS (kernel) made completely from scratch in Assembly & Rust
Requirements:
- Git version control system
- Rust toolchain
Steps:
- Install the nightly toolchain:
rustup toolchain install nightly
- Install required components:
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu && rustup component add llvm-tools-preview --toolchain nightly-x86_64-unknown-linux-gnu && cargo install bootimage
- Create a local clone of the repository:
git clone [email protected]:adamperkowski/highlightos.git && cd highlightos
cd
into thekernel/
directory:
cd kernel
- Build the bootable binary:
cargo bootimage --release
This command will create the
target/target/release
directory in which you'll find thebootimage-hlkernel.bin
binary file.
Requirements:
Steps:
- Create a local clone of the repository:
git clone [email protected]:adamperkowski/highlightos.git && cd highlightos
cd
into theasm/
directory:
cd asm
- Compile the bootable binary:
nasm -f bin boot.asm -o boot.bin
This command will generate & place the
boot.bin
file inside of the current directory.
Requirements:
- QEMU (full package)
- A bootable binary of HighlightOS. You can download one from releases or you can build it yourself.
Steps:
cd
into directory that contains the binary.- Run the following command:
qemu-system-x86_64 -drive format=raw,file=<your_binary_filename>.bin
Important
Replace <your_binary_filename>
with the actual name of the binary you have downloaded/built.
You can also flash the binary image onto a USB stick and boot it on a real machine.
You can flash it by running the following command:
dd if=<your_binary_filename>.bin of=/dev/sdX && sync
Important
Make sure to replace <your_binary_filename>.bin
with your downloaded/compiled binary name and make sure to replace /dev/sdX
with your USB's actual partition number. Any data on it will be lost!
Note
You can choose the device to boot off of from your BIOS boot menu (accessible by pressing F8 or F12).
Double-check that your motherboard is capable of booting legacy media(s), as HighlightOS is not UEFI-compatible yet.
2024-11-09_11-53-04.mp4
Did you know we have a IRC channel? It's #highlightos
on libera.chat.
List of built-in commands and features is available here.
To gain further information on HighlightOS, we invite you to visit the wiki.
Using precompiled binaries from the code section of the repo is not recommended.
HUGE thanks to everyone contributing:
Some parts of the code are inspired by blog_os. Great project!
Copyright Β© 2024 Adam Perkowski
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.