Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexander-akhmetov/mos
small operating system
https://github.com/alexander-akhmetov/mos
kernel os osdev rust
Last synced: about 1 month ago
JSON representation
small operating system
- Host: GitHub
- URL: https://github.com/alexander-akhmetov/mos
- Owner: alexander-akhmetov
- Created: 2019-01-27T13:48:22.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-04-30T10:03:51.000Z (over 3 years ago)
- Last Synced: 2023-07-31T17:02:52.358Z (over 1 year ago)
- Topics: kernel, os, osdev, rust
- Language: Rust
- Homepage:
- Size: 1.93 MB
- Stars: 9
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mos
My attempt to write a small operating system (and to try Rust :) ).
**mos**
![mos: msh](https://github.com/alexander-akhmetov/mos/blob/readme-pics/screenshots/msh.png?raw=true)
**mOS boot log**
![mos: start-up logs](https://github.com/alexander-akhmetov/mos/blob/readme-pics/screenshots/start.png?raw=true)
## Development
Start QEMU with mOS inside:
```shell
make run
```Run tests:
```shell
make tests
```### Folders structure
* `./initrd`: all files in this directory will be placed into a single archive and mounted as a TarFS to `/initrd`
* `./src`: kernel source code
* `./lib`: Contains userspace programs and `librust`: Rust library to write programs for mOS.**OS Entrypoint**: `/src/lib.rs`.
## Requirements
* Cross compiled binutils (actually only `ld`): `docs/binutils.md`
* NASM
* Rust nightly (I use `nightly-2019-11-04`)
* Docker to build iso with GRUB bootloader
* QEMU
* gnu-tar on MacOS (`brew install gnu-tar`)## librust
You can build userspace programs for mOS. To communicate with OS from Rust code you need to use `librust`.
It is a library which provides interface to use all implemented system calls.# What can it do?
* [x] Load! :-)
* [x] Print to VGA buffer
* [x] Mount ramdisk
* [x] Built-in support for TarFS
* [x] Interrupts
* [x] System clock
* [x] Syscalls ABI
* [x] Processes support, context switching
* [x] Start init process
* [x] Shell for user's commands: `msh`## ToDo
* Fix paging. It does not work properly, and because of that it's not possible to start separate processes. Now programs are being running as threads inside the OS.
* After paging mmap call in the `librust` must be completed, so it will be possible to request memory from userspace.
* Higher Half Kernel
* `fork` syscall
...