Skip to content

Project Structure

This document provides an overview of the TilekarOS directory layout and where to find key components of the system.

๐Ÿ“‚ Directory Overview

TilekarOS/
โ”œโ”€โ”€ kernel/                 # ๐Ÿง  Core Kernel Source
โ”‚   โ”œโ”€โ”€ arch/i386/          # ๐Ÿ“Ÿ x86 Specific Implementation
โ”‚   โ”‚   โ”œโ”€โ”€ boot/           # ๐Ÿš€ Entry point and Linker script
โ”‚   โ”‚   โ”œโ”€โ”€ cpu/            # ๐Ÿ“Ÿ GDT, IDT, and CPU control
โ”‚   โ”‚   โ”œโ”€โ”€ drivers/        # ๐Ÿ”Œ Hardware Drivers
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ata.c       # ๐Ÿ’พ ATA Disk Driver
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ pci.c       # ๐ŸšŒ PCI Bus Driver
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ keyboard.c  # โŒจ๏ธ Keyboard Driver
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ tty.c       # ๐Ÿ–ฅ๏ธ TTY/VGA Console
โ”‚   โ”‚   โ”œโ”€โ”€ fs/             # ๐Ÿ“ Filesystem & VFS
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ vfs.c       # ๐ŸŒ Virtual File System
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ fat.c       # ๐Ÿ“‚ FAT16/32 Driver
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ buffer.c    # ๐Ÿ’พ Block Buffer Cache
โ”‚   โ”‚   โ”œโ”€โ”€ mm/             # ๐Ÿ’พ Memory Management (PMM, VMM, Heap)
โ”‚   โ”‚   โ”œโ”€โ”€ syscalls/       # ๐Ÿ”Œ System Call Dispatcher
โ”‚   โ”‚   โ”œโ”€โ”€ task/           # ๐Ÿ”„ Multitasking & ELF Loader
โ”‚   โ”‚   โ””โ”€โ”€ utils/          # ๐Ÿ› ๏ธ Kernel Utilities
โ”‚   โ””โ”€โ”€ include/            # ๐Ÿ“‚ Kernel-wide Headers
โ”œโ”€โ”€ libc/                   # ๐Ÿ“š Minimal C Standard Library
โ”œโ”€โ”€ docs/                   # ๐Ÿ“– Documentation (MkDocs)
โ”œโ”€โ”€ helpers/                # ๐Ÿ› ๏ธ Build and Helper Scripts
โ”œโ”€โ”€ sysroot/                # ๐Ÿ“ Build System Root
โ”œโ”€โ”€ VirtualMachine/         # ๐Ÿ’ป Default VM Workspace (Generated)
โ”‚   โ””โ”€โ”€ drives/             # ๐Ÿ“€ VM Disk Images (.img)
โ””โ”€โ”€ build/                  # ๐Ÿ—๏ธ Build Artifacts (Generated)

๐Ÿ› ๏ธ Key Files

File Description
Makefile The main build orchestration file.
CMakeLists.txt Configuration for the CMake build system.
grub.cfg Configuration for the GRUB bootloader.
.clangd Configuration for the Clangd Language Server (Generated).
LICENSE The project license (MIT).

๐Ÿš€ Key Entry Points

  • Kernel Entry (ASM): kernel/arch/i386/boot/boot.asm - The very first code executed by the bootloader.
  • Kernel Entry (C): kernel/arch/i386/init_kernel.c - Performs architecture-specific initialization.
  • Kernel Main: kernel/kernel.c - The platform-independent kernel main loop.
  • Linker Script: kernel/arch/i386/boot/linker.ld - Defines the memory layout of the kernel binary.

๐Ÿ› ๏ธ Build System Hierarchy

TilekarOS uses a nested build system for modularity: 1. Top-level Makefile: Manages the overall build process, VM workspaces, and dynamic drives. 2. CMake: Manages the compilation of the kernel and libc, generating IDE configuration. 3. Toolchains: cmake/toolchains/*.cmake define cross-compilation settings.