DepthOS Terminal
user@depthos:~$ cat overview.txt

DepthOS - AArch64 Educational Operating System

DepthOS is a minimalist operating system designed for the AArch64 architecture. Built from the ground up as an educational project, it demonstrates fundamental OS concepts including bootloading, kernel initialization, and basic system services.

[BOOT] DepthOS <1.2>
[BOOT] DepthOS kernel_main() starting...
[BOOT] Initializing UART...
[BOOT] UART ready.
[BOOT] Launching shell...
πŸš€ DepthOS Kernel Started by DepthBOOT!
user@depthos:~$ ls -la features/

Current Features

πŸš€ Two-Stage Bootloader

Custom bootloader with Stage 1 (4KB) and Stage 2 (8KB) for system initialization

πŸ’» Interactive Shell

Command-line interface with basic commands: help, about, clear, echo, panic

πŸ“Ί UART Communication

Full UART support with colored output and terminal control sequences

πŸ”§ System Monitor

Built-in system health monitoring and panic handling

user@depthos:~$ cat architecture.md

System Architecture

Memory Layout:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” 0x40200000
β”‚     Kernel Space    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ 0x40100000  
β”‚   Bootloader S2     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ 0x40080000
β”‚   Bootloader S1     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Target: AArch64 (ARM64)
Platform: QEMU virt machine
CPU: Cortex-A57
user@depthos:~$ cat bootloader/README.md

Bootloader Implementation

DepthOS uses a two-stage bootloader design to initialize the system and prepare the environment for the kernel.

Stage 1 Bootloader

Size: 4KB

Location: 0x40080000

File: bootloader/stage1/boot1.s

Functions:

  • Minimal bootstrap code
  • Stack initialization
  • Basic UART output
  • Jump to Stage 2

Stage 2 Bootloader

Size: 8KB

Location: 0x40100000

File: bootloader/stage2/boot2.s

Functions:

  • Extended initialization
  • System environment setup
  • Kernel loading preparation
  • Transfer control to kernel

Boot Sequence

1. Power-on/Reset
2. Stage 1 loads at 0x40080000
3. Initialize minimal stack
4. Print boot messages via UART
5. Jump to Stage 2 at 0x40100000
6. Stage 2 system initialization
7. Transfer control to kernel at 0x40200000
user@depthos:~$ cat kernel/README.md

Kernel Implementation

The DepthOS kernel provides core system functionality including memory management, device drivers, and system services.

Core Components

boot.s - Kernel entry point and bootstrap
kernel.c - Main kernel logic and initialization
uart.c - UART communication driver
monitor.c - System health monitoring
shell.c - Interactive command shell

Memory Layout

Entry: 0x40200000
Stack: 16KB
BSS: Auto-cleared on boot
Heap: Not implemented yet

Kernel Functions

Initialization:
  • β€’ BSS section clearing
  • β€’ Stack setup
  • β€’ UART initialization
  • β€’ System banner display
Services:
  • β€’ Panic handling
  • β€’ System monitoring
  • β€’ Shell launch
  • β€’ Color terminal output
user@depthos:~$ cat shell/README.md

Interactive Shell

The DepthOS shell provides a command-line interface for interacting with the operating system.

Available Commands

helpDisplay available commands
aboutShow system information
clearClear the terminal screen
echoPrint text to terminal
panicTrigger kernel panic (debug)

Shell Features

Input Handling:
  • β€’ Command line editing
  • β€’ Backspace support
  • β€’ Enter key processing
  • β€’ Buffer overflow protection
Output Features:
  • β€’ Color-coded messages
  • β€’ System banner display
  • β€’ Error reporting
  • β€’ Command prompt

Example Session

DepthOS> help
ДоступныС ΠΊΠΎΠΌΠ°Π½Π΄Ρ‹:
  help   - ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΡŒ это сообщСниС
  about  - Π˜Π½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΡ ΠΎ систСмС
  clear  - ΠžΡ‡ΠΈΡΡ‚ΠΈΡ‚ΡŒ экран
  echo <text> - ВывСсти тСкст

DepthOS> about
DepthOS: AArch64 ΡƒΡ‡Π΅Π±Π½ΠΎΠ΅ ядро

DepthOS> echo Hello World!
Hello World!

DepthOS> _
user@depthos:~$ git status

Development Status

βœ“Two-stage bootloader implementation
βœ“Kernel initialization and memory management
βœ“UART driver with color support
βœ“Basic shell with command processing
⚠Filesystem support (disabled)
βœ—Timer and interrupt handling
βœ—Process management
user@depthos:~$ cat README.md

Build & Run

# Build the complete OS
make all

# Run in QEMU
make run

# Debug mode
make debug

# Clean build
make clean

Requires: aarch64-elf-gcc toolchain, QEMU system emulation