/profanOS

The i386 profan Operating System

Primary LanguageCGNU General Public License v3.0GPL-3.0

The profan Operating System

Makefile CI nbr lines latest

wave

The profan Operating System is an independent OS developed from scratch. It is not intended to be used massively or to have broad hardware support.

profanOS is characterized by its ring0-only preemptive modular multitasking minimalist kernel and colorful-looking command line-based user interface.

You can find a progress map here

Setup

Note

Compilation is guaranteed only on ubuntu 22.04 with gcc 11, it is also possible in windows with virtualization solutions like wsl (on windows 11) or hyperV.

Install dependencies

sudo apt update

sudo apt install -y make python3 gcc g++ nasm qemu-system-i386 \
                    grub-common xorriso grub-pc-bin mtools

Compile & Run

# Simple compilation
make iso

# Compile and run
make run

# Show all commands
make

Each time the disk is modified you must force its reconstruction with make disk. The main ports (more information in the ports section) are not included in the repo source code but are easily downloadable with make addons disk.

Automated build

You can download the build images from the repo profanOS-build or the latest release

# Run the iso image in qemu
qemu-system-i386 -cdrom profanOS.iso

# With KVM acceleration
qemu-system-i386 -cdrom profanOS.iso -enable-kvm

profanOS can also be tested online with two clicks with the v86 copy emulator here.

For information about real hardware boot and instalation see the dedicated section

Hardware requirements

profanOS is a 32-bit operating system, it is therefore necessary to have a 32-bit processor to run it. There is no exact RAM value to have, but without disk the entire file system is loaded into memory, however a few megabytes are enough.

Component Minimum Recommended
CPU (x86) 1@100Mhz 1@2Ghz
RAM 2MB 16MB
screen text 1024x768

First look

When starting profanOS, you will be greeted by the Olivine shell, a language similar to bash. You can then run the help command to see a list of useful commands.

banner

Tip

To switch the keyboard layout use the kb <layout> command, such as kb qwerty.

The kernel

The profanOS kernel (generally called generic kernel or profan kernel) is at the heart of the OS, it is extremely minimalist and can be completed by adding libraries loaded from disk such as drivers or file system extensions.

profanOS is not a SASOS - single address space operating system, but part of the memory is shared, like the kernel and the libraries. Processes can therefore freely access kernel functions.

Here is a list of the main kernel features:

  • multiboot support
  • 32 bits protected mode
  • PS/2 mouse and keyboard
  • ATA hard disk
  • custom filesystem
  • preemptive multi-tasking
  • memory allocation
  • virtual memory management
  • librarys and modules
  • ring0 only

The userspace

Programing languages

The kernel and userspace are developed mainly in C. The Olivine Shell (see the language documentation) is the main shell language. You can also use the lua, sulfur, C and C++ languages to create your own programs.

Major ports

  • lua programming language, with custom library
  • doom engine, playable with keyboard
  • sulfur programming language, a project of a friend
  • tcc compiler, a small and fast c compiler
  • vlink linker with multi-format support
  • halfix x86 emulator, with 32-bit support

All the ports are available with the command make addons / make waddons (all ports) or by building them manually.

Libraries

Libraries are loaded from disk. Currently the libraries are not dynamically linked, they are loaded only once and are shared between all processes.

  • Internal libraries: devio, filesys, fmopen, panda, profan, vgui
  • Standard libraries: math, setjmp, stdio, stdlib, string, time, unistd

Real-Hardware

profanOS works on pc with legacy bios but not with uefi. However profanOS can work on recent pc by activating bios compatibility.

To install profanOS on a USB key or an internal disk, it is possible to use the installation script tools/install.sh or any other image flasher.

Warning

Installing an OS on a real machine can be risky and must be done with knowledge of the possible risks!

Install on USB key

  • Download ISO or build it in linux
  • Flash the ISO on the USB key with dd or any other image flasher
  • Activate the legacy bios in the bios settings (if not already done)
  • Boot on the USB key from the bios boot menu
  • select the graphical mode

Install on internal disk

This method is dangerous and will cause the complete erasure of your machine's disk. Please make a backup of your data and be sure of what you are doing.

  • Activate the legacy bios in the bios settings (if not already done)
  • Boot on a live linux
  • Download ISO or build it in linux
  • Flash the ISO with tools/install.sh or any other image flasher
# replace sdX with the disk to flash
sudo sh install.sh /dev/sdX profanOS.iso
  • Reboot on the internal disk

About

Known major bugs

bug name since description cause fixed ?
lagged lag ? all profanOS is getting very slow ? maybe
BOBCAT 0.4.2 some C compiler build broken zlibs dily no
no KB ? keyboard not working sometimes ? no

Screenshots

shell doom
windaube lua

Author & Contact

Contact me on my discord server or in PM @pf4

Source & Acknowledgment

be careful with our friend 55