Simple OS
Go to file
Mathieu Maret 758017a8e7 mmap fix
Keep region list sorted on heap grow
Fix checking region overlap
Assert that mmap appends at loaded address for init
2024-02-12 18:25:35 +01:00
arch/x86 Fix MMU context on ressource checking 2024-02-08 23:15:29 +01:00
core mmap fix 2024-02-12 18:25:35 +01:00
docs Add diagram to doc 2022-07-30 15:59:50 +02:00
drivers zero: less verbose 2024-02-11 19:00:17 +01:00
tests Rename Yolo syscall to Helo 2023-11-11 00:07:26 +01:00
userspace Add missing errno.h 2024-02-11 18:50:04 +01:00
.clang-format vim and clang-format configuration file 2020-04-27 00:13:43 +02:00
.gitignore Put back kernel sym in debug.gdb 2024-02-08 23:05:54 +01:00
custom_gdb_extension.py gdb: print_list can take the next element name in param 2024-02-08 23:15:29 +01:00
debug.gdb debug symbols are expected in .debug file 2023-11-09 23:44:04 +01:00
disk.sfdisk mmap syscall declaration 2024-02-08 23:08:14 +01:00
linker.ld backtrace: print function name instead of addr 2023-11-20 00:12:58 +01:00
Makefile Add calloc, realloc, memmove. Sync klibc and libc 2024-01-31 12:57:35 +01:00
README.md Update gcc deps 2024-01-26 22:23:10 +01:00
screenshot_1.png update screenshot 2021-11-08 22:53:49 +01:00

Introduction

Matos is a simple OS.

It's targetting x86 and inspirated by http://sos.enix.org/fr/PagePrincipale

screenshot

Dependencies

To generate iso image

  • mtools xorriso (which is libisoburn on ArchLinux)
  • gcc for 32bits (e.g. gcc-multilib for ubuntu) >= 11
  • sfdisk (util-linux)

Run it

make run

or

make fd.iso && qemu-system-x86_64 -cdrom fd.iso

you can also test it

make test

Debug

gdb could be launch with debug symbols using :

make debug

Serial log will be saved in the serialOut file.

Then you can check some matos specific commands or pretty printing with

help user-defined info pretty-printer (Should contains matos_pretty_printers)

Change Disk partitions

You can either modify the disk.sfdisk file

or

modify the disk image with your favorit tool (e.g. gparted) and re-generate disk.sfdisk

sfdisk -d > disk.sfdisk

Multiboot

In arch/x86/boot, you can choose the assembly used to start the C part by removing the .opt extension

  • boot.asm: intel syntax with multiboot support
  • boot.S: GNU As syntax with multiboot support
  • boot_multiboot2.S: GNU As syntax with multiboot2 support

/!\ multiboot2 is not supported by qemu for -kernel option (https://gitlab.com/qemu-project/qemu/-/issues/389). So you may have to use the fd.iso image and modify the grub configuration from multiboot /boot/kernel to multiboot2 /boot/kernel

Features

  • VGA Driver
  • keyboard Driver
  • Serial Driver
  • Timer
  • Virtual memory
  • Allocator
  • Multithread (Full preempt)
  • Mutex
  • ATA
  • basic userspace with syscall

TODO

  • ringbuffer protected by mutex
  • blocking read