MCPcopy Create free account
hub / github.com/croakexciting/forfun-os

github.com/croakexciting/forfun-os @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
498 symbols 1,118 edges 83 files 21 documented · 4% updated 22mo ago★ 137

Browse by type

Functions 443 Types & classes 55
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Forfun OS

中文

1 Introduction

Forfun OS is a unix-like kernel, written by rust. Now support riscv64 and aarch64 CPU architectures. It is an simple OS just for os learning, only complete basic functions.

kernel architecture

1.1 Design Docs (ongoing)

2 Features and TODOs

2.1 Features

  • [x] Syscall
  • [x] Task schedule (Round Robin)
  • [x] Memory and MMU manager
  • [x] Process manager and IPCs
  • [x] Simple filesystem
  • [x] CPUs (riscv64, aarch64)
  • [x] Boards (qemu virt)
  • [x] Virtio blk driver

2.2 TODOs

  • [ ] Board support (k210, rpi4)
  • [ ] Thread
  • [ ] Network driver and TCP/UDP stack
  • [ ] Multi-core
  • [ ] Driver Interrupt
  • [ ] Linux app adaptation

3 Quick Start

Install the dev environment ref to installation guide

You can also use docker for quick start

make docker_start

make docker_into

Build and run forfun os ref to Build and run

# default run on riscv64 qemu virt
make build

make createfs

make run

# use BOARD arg change target board
make BOARD=aarch64_qemu build

make BOARD=aarch64_qemu createfs

make BOARD=aarch64_qemu run

Run some app on the very simple shell

# run hello_world
>> hello_world
hello world!

# run sleep_test
>> sleep_test

# use crtl-c to stop unterminated app

Contact me

Forfun os is just a toy project and not tested, if you find any bug or have any idea and comment, please create a issue or pull request.

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Method 222
Function 221
Class 48
Enum 5
Interface 2

Languages

Rust100%

Modules by API surface

os/src/process/app.rs57 symbols
os/src/process/mod.rs34 symbols
os/src/arch/memory/page.rs31 symbols
user/src/syscall.rs30 symbols
os/src/mm/pt.rs19 symbols
os/src/mm/mod.rs17 symbols
os/src/driver/ic/plic.rs17 symbols
os/src/mm/area.rs16 symbols
os/src/syscall/process.rs12 symbols
os/src/driver/block/qemu_blk.rs12 symbols
os/src/mm/allocator.rs11 symbols
os/src/ipc/server.rs11 symbols

For agents

$ claude mcp add forfun-os \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page