Skip to content

santosr2/rexos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

RexOS - Retro Experience Operating System

A modern, lightweight operating system for handheld retro gaming devices, inspired by ArkOS but built with Rust for performance, safety, and maintainability.

RexOS = Retro Experience OS - Delivering the ultimate retro gaming experience on handheld devices.

๐ŸŽฎ Project Vision

RexOS aims to provide a streamlined, performant, and user-friendly operating system for handheld gaming devices like Anbernic RG series, with a focus on:

  • Fast boot times (< 10 seconds)
  • Efficient resource management
  • Easy game library management
  • Seamless emulator integration
  • Modern development practices

๐Ÿ—๏ธ Architecture

Core Components

Language Distribution:

  • Rust (60%): Core system, hardware abstraction, game library manager
  • Shell (30%): System scripts, updates, maintenance tools
  • C (10%): Emulator bridges, hardware-specific optimizations

Technology Stack

  • Build System: Buildroot (minimal, purpose-built)
  • Bootloader: U-Boot (optimized)
  • Kernel: Linux 5.10 (Rockchip BSP, custom config)
  • C Library: glibc (for emulator compatibility)
  • Init: Custom rexos-init (fast boot, no systemd)
  • Core Utilities: BusyBox (~1MB vs 50MB for coreutils)
  • Core System: Rust-based system services
  • Frontend: Custom Rust TUI launcher
  • Emulators: RetroArch + standalone emulators
  • Root FS: SquashFS (read-only, ~50MB compressed)

Target Specifications

Metric Target
Root filesystem < 100MB
Boot time < 5 seconds
RAM usage (idle) < 100MB
Power consumption Optimized for battery

โœจ Key Features

Phase 1 (MVP) - Completed

  • Project structure
  • Boot system (< 10 second boot)
  • Hardware abstraction layer (HAL) in Rust
  • Basic input handling (buttons, analog sticks)
  • Display/framebuffer management
  • Audio system integration
  • Game library scanner with SQLite database
  • RetroArch core management
  • Save state management
  • Init system and TUI launcher

Phase 2 (Enhanced Features) - Completed

  • WiFi/Bluetooth management
  • Over-the-air (OTA) updates with signature verification
  • C emulator bridge for RetroArch integration
  • Performance profiles (battery/performance modes)
  • Hotkey system
  • Storage management (mount, partition, watch)
  • Cloud save sync
  • Scrapers (game metadata/artwork)
  • Theme engine
  • Screenshot/video recording
  • Achievement system (RetroAchievements)

Phase 3 (Advanced Features)

  • Port management system (similar to PortMaster)
  • Shader management
  • Netplay support
  • Remote play
  • Custom overlay system
  • Multi-language support
  • Accessibility features
  • Advanced power management
  • BIOS/firmware manager
  • Automatic ROM organization

๐Ÿ“ Project Structure

rexos/
โ”œโ”€โ”€ core/                 # Rust core system components
โ”‚   โ”œโ”€โ”€ hal/             # Hardware Abstraction Layer
โ”‚   โ”œโ”€โ”€ input/           # Input management
โ”‚   โ”œโ”€โ”€ display/         # Display/GPU management
โ”‚   โ”œโ”€โ”€ audio/           # Audio system
โ”‚   โ”œโ”€โ”€ storage/         # Storage & filesystem
โ”‚   โ””โ”€โ”€ power/           # Power management
โ”œโ”€โ”€ services/            # System services (Rust)
โ”‚   โ”œโ”€โ”€ library/         # Game library manager
โ”‚   โ”œโ”€โ”€ emulator/        # Emulator launcher/manager
โ”‚   โ”œโ”€โ”€ update/          # Update system
โ”‚   โ””โ”€โ”€ network/         # Network services
โ”œโ”€โ”€ ui/                  # User interface
โ”‚   โ”œโ”€โ”€ frontend/        # Main UI (EmulationStation or custom)
โ”‚   โ””โ”€โ”€ themes/          # Theme support
โ”œโ”€โ”€ scripts/             # Shell scripts
โ”‚   โ”œโ”€โ”€ install/         # Installation scripts
โ”‚   โ”œโ”€โ”€ update/          # Update scripts
โ”‚   โ””โ”€โ”€ maintenance/     # System maintenance
โ”œโ”€โ”€ emulators/           # Emulator integration
โ”‚   โ”œโ”€โ”€ retroarch/       # RetroArch integration
โ”‚   โ””โ”€โ”€ standalone/      # Standalone emulators
โ”œโ”€โ”€ tools/               # Development & build tools
โ”‚   โ”œโ”€โ”€ buildroot/       # Buildroot configuration
โ”‚   โ””โ”€โ”€ deploy/          # Deployment tools
โ”œโ”€โ”€ docs/                # Documentation
โ”‚   โ”œโ”€โ”€ dev/             # Developer guides
โ”‚   โ”œโ”€โ”€ user/            # User manuals
โ”‚   โ””โ”€โ”€ api/             # API documentation
โ””โ”€โ”€ tests/               # Test suites
    โ”œโ”€โ”€ unit/            # Unit tests
    โ”œโ”€โ”€ integration/     # Integration tests
    โ””โ”€โ”€ hardware/        # Hardware-specific tests

๐ŸŽฏ Supported Devices (Planned)

Initial Target

  • Anbernic RG353M/V/VS: RK3566 chipset
  • Anbernic RG35XX series: ARM-based devices

Future Support

  • Anbernic RG351 series
  • Anbernic RG552
  • Other similar ARM-based handhelds

๐Ÿš€ Getting Started

Prerequisites

# Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Cross-compilation tools
rustup target add aarch64-unknown-linux-gnu
rustup target add armv7-unknown-linux-gnueabihf

# Build dependencies
# (Will be documented as project develops)

Building

# Clone repository
git clone https://github.com/santosr2/rexos.git
cd rexos

# Build all components (native)
./scripts/build/build.sh all

# Build for ARM64 (RG353 series)
TARGET=aarch64-unknown-linux-gnu ./scripts/build/build.sh all

# Build for ARM32 (RG35XX series)
TARGET=armv7-unknown-linux-gnueabihf ./scripts/build/build.sh all

# Build C emulator bridge only
make -C c/emulator-bridge

# Run tests
cargo test --all

# Create distribution package
./scripts/build/build.sh package

Installation

  1. Download the appropriate image for your device from releases
  2. Flash to an SD card:
    sudo ./scripts/build/flash-image.sh flash rexos-<version>.img.gz /dev/sdX
  3. Insert the SD card and power on your device

๐Ÿค Contributing

We welcome contributions! Areas where help is needed:

  • Rust systems programming
  • Linux kernel customization
  • Hardware driver development
  • EmulationStation theming
  • Documentation
  • Testing on various devices

๐Ÿ“ Development Principles

  1. Safety First: Leverage Rust's safety guarantees
  2. Performance: Optimize for battery life and responsiveness
  3. Modularity: Clear separation of concerns
  4. User-Friendly: Simple for users, powerful for developers
  5. Open: Transparent development and community-driven

๐Ÿ”ง Technical Decisions

Why Rust?

  • Memory safety without garbage collection
  • Zero-cost abstractions
  • Excellent embedded systems support
  • Modern tooling and package management
  • Growing embedded/gaming community

Why Hybrid Approach?

  • Reuse proven shell script patterns from ArkOS
  • Leverage existing C-based emulators
  • Gradual migration path
  • Practical for hardware interfacing

๐Ÿ“š Resources & References

๐Ÿ“„ License

This project will be licensed under MIT License (TBD - to be decided with community input).

๐Ÿ—บ๏ธ Roadmap

Q1 2025: Project setup, core architecture, HAL development Q2 2025: Basic boot system, EmulationStation integration Q3 2025: First alpha release for RG353 series Q4 2025: Beta release with full feature set


Status: ๐ŸŸก Active Development - Core functionality implemented

Join us: [Discord/Matrix community link coming soon]

๐Ÿ“Š Project Metrics

Component Status Coverage
Core HAL โœ… Complete 80%
Storage โœ… Complete 75%
Config โœ… Complete 85%
Emulator Service โœ… Complete 70%
Library Service โœ… Complete 75%
Update Service โœ… Complete 80%
Network Service โœ… Complete 75%
C Bridge โœ… Complete N/A
Shell Scripts โœ… Complete N/A
CI/CD โœ… Complete N/A

About

Retro game OS

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published