Benix is a small 32-bit hobby operating system for x86 I made for fun and learning. It is written in Assembly (Intel syntax) and C. Every part of the OS has been made from scratch, from the bootloader to the user space.
- Multiboot 2 protocol compatibility
- Limine bootloader compatibility
- Useful tools for building
- Minimalist userspace libc
- Userspace
- Flat binary loader
- VGA text mode support
- FAT12 filesystem support
- ATA PIO disk support
- PS/2 keyboard support
- PIC support
First, you need to clone the git repository. If you don't have git, you can install it from your distribution packages.
git clone https://github.com/wither16x/benixBenix does not use BASH, ZSH or any other standard shell scripting language for its build scripts. Instead, it uses the Amber programming language. Make sure it is installed on your system and run the following command:
tools/mkimage/run -- buildYou can also build the system on an existing FAT12 image, so it will not be reformated:
tools/mkimage/run -- build image path/to/your/image.imgIt is recommended to build Benix with the Limine bootloader (you would get a warning if you build it with the Benix bootloader).
tools/mkimage/run -- build bootloader limine # or benixNote: you need to download and compile Limine before building the OS. To do so, you can use getdeps:
tools/getdeps/run -- limineNote: you should verify the version of the OS you are building first:
tools/mkimage/run -- versionNow, a floppy image should be available as images/benix.img.
An ISO file and a floppy image should be available in images/ as benix.iso and benix.img (or the name you specified for the floppy).
If you have qemu and you want to try Benix on it, execute the command below:
tools/mkimage/run -- emulate qemuNote: if you need more informations about the Benix image builder, run this command:
tools/mkimage/run -- helpBenix has not been tried on real hardware yet!
Several programs are provided within the Benix disk image. Their source code is located inside the programs/ directory, but they will be moved in separated repositories soon.
cash(Certainly Amazing SHell): the default shell for Benixls <dir>: displays a list of the filesshow <file>: displays the content of a file in ASCIIinfo [options]: displays informations about the system (these informations are located inosinfo.txt)echo [text]: displays the given text followed by a newline in the consoletouch <file>: creates a new empty filewrite <file>: writes text in a filemkdir <dir>: creates a new directoryrm [options] <file>: removes a file or an empty directory
There is no real documentation. Some of the code has comments, but you still need Assembly and C knowledge to understand what it does if it is not clearly explained or not explained at all...
To contribute to Benix:
- Fork the git repository
- Apply your changes
- Test them carefully
- Describe them in CHANGELOG.md
- Make a detailed pull request
