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.