Skip to content

NomadArchitect/profanOS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The profan Operating System

publish 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 roadmap in github projet and global mindmap here.

Setup

Note

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

Install dependencies

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

# Arch based
sudo pacman -Syu
sudo pacman -S      make python gcc nasm qemu-full xorriso \
                    grub-common mtools

Compile & Run

# 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 gaddons 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 16MB 128MB
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 modules 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 kernel and modules. 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
  • kernel 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.

If you prefer a bash like rather than Olivine, you can use the dash port which is POSIX compliant and often used as /bin/sh in linux systems.

Major ports - Addons

  • tcc Small and fast C compiler
  • dash POSIX compliant shell
  • lua Lightweight scripting language
  • doom Raycasting first person shooter
  • halfix x86 emulator with provided linux image
  • sulfur Bytecode high-performance language

All the ports are available with the command make addons / make gaddons (graphical menu) or by building them manually.

Libraries

Libraries are loaded from file system and are dynamically linked to executables using deluge (profan dynamic linker). Kernel modules, for their part, are shared between the process and their content are accessible using syscalls.

Here is a list of the main libraries and kernel modules:

  • kernel modules
    • devio, filesys, fmopen, libmmq, panda, profan
  • libc - standard C library
    • dlfcn, profan, setjmp, stdio, stdlib, string, time, unistd
  • libpm - profanOS minimalistic math lib
  • libvgui - optimized graphic lib
  • libm - openlibm port . addons
  • libtcc - tinyCC lib . addons
  • libz - compression lib . addons

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 modules dily no
no KB ? keyboard not working sometimes ? no

Screenshots

halfix lua
windaube doom

Author & Contact

Contact me on my discord server or in PM @pf4

Source & Acknowledgment

be careful with our friend 55

About

The i386 profan Operating System

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 93.9%
  • Python 3.7%
  • Assembly 1.0%
  • Lua 0.6%
  • Shell 0.5%
  • Makefile 0.2%
  • C++ 0.1%