Skip to content
A Simple Unix-like operating system
C Makefile Assembly C++ M4 TeX Other
Branch: master
Clone or download
Latest commit 742d53e Sep 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
TinyGL TinyGL May 9, 2018
bootdisk-root/boot/grub adding gfx files Mar 29, 2018
font font added Mar 29, 2018
kernel non-blocking read support added to keyboard driver Aug 18, 2019
newlib-2.5.0 newlib Dec 9, 2017
screenshots screenshots Sep 6, 2019
usdk -ptdriver removed Aug 15, 2019
userspace -ptdriver removed Aug 15, 2019
usr/i686-soso -ptdriver removed Aug 15, 2019
.gitignore Update .gitignore Dec 9, 2017
LICENSE Initial commit Dec 9, 2017
Makefile font added Mar 29, 2018
README.md Update README.md Sep 7, 2019
create-cd-image.sh grub config updated and broken fork implementation removed Feb 23, 2018
create-image.sh -ptdriver removed Aug 15, 2019
create-initrd.sh initrd creation script Feb 25, 2018
link.ld kernel Dec 9, 2017
soso.config kernel Dec 9, 2017
soso.creator kernel Dec 9, 2017
soso.files -ptdriver removed Aug 15, 2019
soso.includes kernel Dec 9, 2017

README.md

soso

Soso is a simple unix-like operating system written in Nasm assembly and mostly in C. It supports multiboot, so it is started by Grub. It can be built using Nasm and Clang. You can use GCC instead of Clang, if you want. Tested build environments are Linux, FreeBSD, and Windows 10 (Windows Subsystem for Linux).

Soso is a 32-bit x86 operating system and its features are

  • Multitasking with processes and threads
  • Memory Paging with 4MB pages
  • Kernelspace (runs in ring0) and userspace (runs in ring3) are separated
  • Virtual File System
  • FAT32 filesystem using FatFs
  • System calls
  • Libc (Newlib is ported with only basic calls like open, read,..)
  • Userspace programs as ELF files
  • mmap support
  • Framebuffer graphics (userspace can access with mmap)
  • Shared memory

Paging is written for 4MB page support, since it is easier to implement. In this way, a Page Directory Entry points directly to a 4MB Page Frame. In 4KB mechanism, a Page Directory Entry points to a Page Table Entry which then points to a 4KB Page Frame. Downside of using 4MB pages is, each process has to use at least 4MB memory.

Soso has Libc, so existing applications depending only on a small part of Libc can easly be ported to Soso. I have managed to build and run Lua and Doom on Soso!

running

You can download a CD image (ISO file) from releases and try in a virtualization software like VirtualBox or in a PC emulator like QEMU. When it is started, you can run: "doom", "ls", "lua". Executables are in /initrd.

To try Soso in QEMU, just run:

qemu-system-i386 -cdrom soso.iso

Lua

Soso

Doom

To demonstrate multitasking, two doom processes running at the same time:

Doom on Soso

building

To build kernel just run:

make

this will build only kernel (kernel.bin).

To build userspace binaries (while in userspace directory):

make

this will build userspace binaries in userspace/bin directory.

Now an initrd (initial ramdisk) image is needed to put userspace binaries. To create it, run as root (linux specific):

./create-initrd.sh

This will create initrd.fat file. This is a mountable FAT32 initrd image. Once kernel initialization is complete, initrd contents are copied into /dev/ramdisk1 and it is mounted to /initrd. After that kernel runs the /initrd/shell ELF file.

./create-cd-image.sh

This will create soso.iso cd image.

You can’t perform that action at this time.