01. Ideas and Directions - skybonep/fishboneOS GitHub Wiki

Current Focus

Rebuild the system for production

Incremental Plan for fishboneOS

This plan is subjected to change!

Phase 2: Memory and Multitasking (Steps 5-8)

  1. [Done] Paging and VMM

    • Implement: Basic paging in src/arch/i386/paging.s and src/kernel/vmm.c.
    • Test: Enable paging; print kernel CR3; ensure no page faults.
  2. [Done] PMM and Heap

    • Implement: Physical memory manager in src/kernel/pmm.c; basic heap in src/kernel/malloc.c.
    • Test: Allocate/free memory; print success/failure.
  3. [Done] Task Scheduler

    • Implement: Simple round-robin scheduler in src/kernel/task.c.
    • Test: Create idle task; verify context switches via timer.
  4. User Mode and Syscalls

    • Implement: User segments, syscall handler in src/arch/i386/cpu.s and src/kernel/syscall.c.
    • Test: Switch to user mode; call a syscall (e.g., write); check output.

Phase 3: Drivers and Filesystem (Steps 9-11)

  1. ATA and Block Drivers

    • Implement: ATA driver in src/drivers/ata.c; block abstraction.
    • Test: Read disk sectors; print data.
  2. FAT16 Filesystem

    • Implement: FAT16 reader in src/kernel/fat16.c.
    • Test: Mount disk; list files.
  3. TTY and Input

    • Implement: VGA TTY in src/arch/i386/tty.c; keyboard driver.
    • Test: Print to screen; read keyboard input.

Phase 4: Modularity and Installer (Steps 12-15)

  1. Loadable Modules

    • Implement: Basic module loader (e.g., flat binary) in src/kernel/module.c.
    • Test: Load a simple module; verify execution.
  2. ELF Loader (Optional)

    • Implement: ELF parser for executables.
    • Test: Load/run a user app from disk.
  3. Installer Prototype

    • Implement: Minimal installer UI and disk setup.
    • Test: Boot installer; detect hardware; install to disk.
  4. Integration and Polish

    • Combine features; add menu system.
    • Test: Full boot, module loading, user apps.

For each step: Implement manually, compile with make, test in QEMU, and debug via serial logs. Reference monolithic for details but rewrite in your words. Start with Step 1—ready to guide on implementation?

Completed Work

  • Create a bare-bones project to understand the basic concepts and set up the development environment.
  • Create my own c library. Only get the printf function running, still need to add the memory functions and setup for hosted c compiler later. (https://wiki.osdev.org/Meaty_Skeleton)
  • Add serial ports for debugging. (http://wiki.osdev.org/Serial_ports)
  • Implement the Global Descriptor Table (GDT) (https://wiki.osdev.org/GDT_Tutorial)
  • Implement Interrupt (https://wiki.osdev.org/Interrupts_Tutorial)
  • Enable keyboard input (https://wiki.osdev.org/PS/2_Keyboard)
  • Core Dump. printf(), sprintf(), printk() now handle basic formatting.
  • Implement a heap.
  • Solidify your memory system
  • Turn boot into a real kernel runtime
  • Implement scheduling / multitasking
  • Build a syscall interface
  • Add user mode support
  • Add a text based menu
  • Add a FAT filesystem
  • Implement loadable kernel modules
  • Transition to user-space processes with ELF binary support
  • Rebuild the system for production: Boot and Basic Setup, Serial Output, GDT, IDT.

Upcoming or Possible Experiments

  • Figure out how to test an OS. (Build application in the OS to test)
  • Gather hardware information to help with module selection.
  • The Installer can detect the hardware and make the basic functions work. In a new machine, we have installer that users can select the modules and applications that they need. And set it for the OS.
  • In a fishboneOS powered machine, there is a setup application where users can change, add, or delete the modules and applications. Most of the time, some installation process and a reboot will work. But if the change is more foundation, e.g. change disk format, it may need to delete all of the data in the machine, or if possible, we can come up with something to migrate the data to the new system.

Ideas for Later

  • Build a BASIC inside the OS

Created: 20251227