feat: fix ramdisk file copies being incorrectly marked as directories, update man pages

This commit is contained in:
2026-07-09 11:19:06 +02:00
parent 4f2bc72dc9
commit 51bab1e62e
9 changed files with 793 additions and 117 deletions
+40 -17
View File
@@ -3,49 +3,68 @@
intro - introduction to MontaukOS userspace
.SH DESCRIPTION
MontaukOS is a hobbyist 64-bit operating system written in C++20.
Userspace programs run in Ring 3, are loaded as static ELF64
binaries, and communicate with the kernel through the x86-64
SYSCALL/SYSRET mechanism.
MontaukOS is a hobbyist 64-bit operating system written in C++20,
currently at version 0.1.7 (API version 8). Userspace programs
run in Ring 3, are loaded as static ELF64 binaries, and
communicate with the kernel through the x86-64 SYSCALL/SYSRET
mechanism (150 syscalls -- see syscalls(2)).
Programs are compiled with a freestanding cross-compiler and
linked at virtual address 0x400000. There is no standard C
library for C++ programs -- all system interaction goes through
the montauk:: syscall wrappers.
the montauk:: syscall wrappers. A desktop environment with a
window server, GUI apps, and Bluetooth/audio/networking stacks
runs on top of the same syscall API.
.SH GETTING STARTED
To write a new program, create a directory under programs/src/
with a main.cpp file. The entry point is:
To write a new system/CLI program, create a directory under
programs/src/ with a main.cpp file. The entry point is:
extern "C" void _start() { ... }
There is no argc/argv. Use montauk::getargs() to retrieve any
arguments passed by the parent process. Include <montauk/syscall.h>
for the full typed syscall API.
for the full typed syscall API. GUI apps additionally use
win_create()/win_poll()/win_present() from montauk/Window.hpp
(see framebuffer(2)).
Build with:
cd programs && make
The resulting ELF binary appears in programs/bin/os/.
System/CLI binaries appear in programs/bin/os/; GUI app bundles
(ELF + manifest.toml + icon) appear under programs/bin/apps/<name>/.
.SH RAMDISK LAYOUT
The boot ramdisk is mounted as drive 0 with the following
directory structure:
0:/os/ System binaries (shell, init, man, etc.)
0:/games/ Games (doom)
0:/os/ System/CLI binaries (shell, init, man, etc.),
plus os-owned data: certs/, firmware/,
licenses/, wallpapers/
0:/apps/ GUI app bundles, one directory per app
(<app>.elf + manifest.toml + icon)
0:/config/ System-wide config TOMLs
0:/users/<name>/ Per-user home directories (created at
login), with Music/, Videos/, Pictures/,
config/ subdirectories
0:/fonts/ Shared fonts
0:/icons/ Shared icons
0:/man/ Manual pages
0:/www/ Web server content
0:/common/ Shared assets (wallpapers, etc.)
0:/users/ Per-user home directories
0:/lib/ Lua and TinyCC toolchain payloads
0:/boot/ Kernel, bootloader, ramdisk image
There is no 0:/games/, 0:/common/, 0:/home/, or 0:/etc/ --
these were used by earlier single-user releases and no longer
exist. Games and other GUI programs (including doom) ship as
bundles under 0:/apps/.
.SH SHELL
The interactive shell is the primary way to interact with
MontaukOS. Commands are resolved by searching the PATH
directories (0:/os/, 0:/games/) for matching .elf binaries.
Type 'help' at the shell prompt for a list of commands.
Use 'man shell' for detailed shell documentation.
MontaukOS. Commands are resolved against the current directory
first, then 0:/os/. Type 'help' at the shell prompt for a list
of commands. Use 'man shell' for detailed shell documentation.
.SH MAN PAGES
The following man pages are available:
@@ -60,7 +79,11 @@
fontscale(1) Terminal font scaling
edit(1) Text editor
man(1) The man command itself
printctl(1) Printer control
printd(1) Print spooler daemon
wiki(1) Wikipedia article viewer
legal(7) Copyright and legal information
tls-errors(5) TLS/BearSSL error reference
syscalls(2) Overview of all syscalls
spawn(2) Process spawning
file(2) File I/O syscalls