H-OS is still at a very early stage of development, the vast majority of things are not yet operational and some that are operational do not work as they should. There is no guarantee that the system will work
The goal is to create a simple well documented operating system that will also serve as a good example for other novice operating system developers
H-OS will provide a friendly environment with easy interaction with the system. Conventions will provide meaningful names with simple syntax for easier understanding of commands, paths and libraries. Command conventions specify a "word" syntax that even a complete novice should understand
H-OS is meant to be very simple multitask operating system with its own filesystem design, core utilities and standards
The project source code should be "simple", segmented into many functions for better readability and well commented
The project will also include a "book" clarifying what is going on under the hood in a relatively clear presentation
The book is not a manual. It is just a companion material to make things easier to understand with links to code examples. The prospective developer is expected to have at least some experience with programming and operating systems.
The whole project with all of its parts is under the GPL v3.0 licence
NOTE: using the ./scritps/test scripts may create an image with different compiler options then used normally. Please use ./scripts/build mkimage command to build the OS
Linux operating system or virtual machine (BSD may be option, but it's not tested)
-
Ubuntu can be a good choice for beginners with linux
-
For more experienced Linux users, I recommend Arch Linux for better accessibility to necessary packages
- Also, here is link to automated installation of Arch Linux for faster installation
Fish (shell)
- Most of the scripts used in the build are written in it
Parted - tool used for disk image creation
- Since the arch wiki has proven to be a good resource here is a link. If you are currently using any other distribution the way of installation may differ
Mtools - tools used for disk image creation (together with parted)
- Mtools is widely used, your distribution should provide a package for it
NASM - assembler (assembly compiler)
-
Nasm is widely used assembler, most distributions should provide a package for it.
-
NOTE: Limine bootloader is not required for building the OS
-
If you are on x86_64 system (run
uname -min terminal to check it), installgccpackage. The gcc package should also containldcommand. Make sure this is the case.- Be aware that the native compiler (gcc) can cause problems. So please consider building cross-compiler (x86_64-elf-gcc)
-
In case you don't have x86_64/amd64 architecture you will most likely have to build cross-compiler called
x86_64-elf-gccwhich should provide everything you need.- For Arch linux users it is available as AUR package. Building of the cross-compiler is long process: it may take more than one hour
- In this case
x86_64-elf-ldcommand should be installed as well. Make sure that this is indeed the case.
Qemu - Quick EMUlator (for testing and emulation) - Optional dependency
- Ubuntu:
sudo apt update && sudo apt install build-essential fish parted mtools nasm- limine and cross-compiler must be installed manually
- Arch Linux:
sudo pacman -Syyu && sudo pacman -S gcc fish parted mtools limine nasm- Alternatively you can install the cross-compiler with this command
yay -S x86_64-elf-gcc. The compiler has to be built, which can take more than an hour on weaker machines
- Alternatively you can install the cross-compiler with this command
- Fedora:
sudo dnf update && sudo dnf install gcc fish parted mtools nasm- limine and cross-compiler must be installed manually
- Please be aware that the script requires administrator (root) privileges
- Any malfunction can drastically damage your system.
- There is no guarantee that the script will always work as intended.
- Please consider reading the script or manually installing limine according to the steps specified by your linux distribution
- To use the script run this command in project root directory
cd ./stuff/limine/build/; chmod +x ./build;./build
This contains just few steps:
- Clone the repository - run
git clone https://github.com/LittleHobbitFrodo/H-OS - Enter project root directory
cd H-OS - Set permissions to scripts
chmod -R +x ./scripts/;chmod -R +r ./scripts/ - Start build
./scripts/build mkimage - If no error was reported disk image (H-OS.hdd file) should be created in project root directory
To build the OS in docker run this command:
docker pull archlinux;
You can upload it to a flash drive, the upload will completely erase the drive so please check if there is any data you could miss on the drive
- Insert the drive, open file manager and copy the disk image (H-OS.hdd) into the disk
- Alternatively you can do that in command line with the "dd" command (not recommended for beginners)
sudo dd if=<project root dir>/H-OS.hdd of=/dev/<drive>
- Keyboard Input: my own goofy implementation (I will fix it later (maybe))
- Hardware Enumeration: gather information about connected hardware
- Paging: I should really make it work
- Hello world! - Create bootable disk that displays simple
hello worldmessage. - Set up environment - Add basic functionalities like printing numbers.
- CPUID - Gather some information about processor.
- Heap implementation
- Find place for kernel heap.
- Create simple allocator.
- Add other functionalities.
- Port the allocator for virtual addresses (HHDM).
- Memory initialization
- Parse and simplify memory map.
- Initialize GDT with TSS.
- Reinitialize paging.
- Interrupts
- Get exception handling to work.
- Initialize other interrupts.
- Time and timer interrupt
- UEFI runtime services
- Power Management
- Shutdown (Emulator specific + UEFI runtime services)
- Hardware discovery
- PCI
- ACPI
- Disks
- AHCI
- Enumerate disks
- Write driver for SSD/NVME ...