How nicepotato-ms/potatos works
Project Type and Purpose
• Project Type: A homemade operating system kernel for “Potato Computers.”
• Purpose: To initialize hardware (via architecture-specific code), manage low-level operations (memory, interrupts, device drivers), and provide basic OS functionality. It’s implemented in C++ and assembly, with platform-specific code directories (for x86_64 and planned i686 support).
File Structure to Determine the Main Components
• Bootloader Support:
• Files like limine.conf and the bundled limine tool indicate integration with a bootloader.
• Architecture-Specific Code (“arch” directory):
• Separate directories for i686 and x86_64 demonstrate that core startup and low-level initialization code (GDT, paging, interrupts, etc.) are abstracted by architecture.
• Files such as archinc.mk, linker.ld, and architecture-specific headers and source files (e.g., in arch/x86_64/include and arch/x86_64/kernel) are used to adapt the kernel to the hardware.
• Kernel Core (“kernel” directory):
• Contains kernel source code (e.g., kernel/src/kmain.cpp) which forms the central control logic.
• Subdirectories like “kernel/lib/kernel” (handling panic, printk, error codes) and “kernel/lib/libc” (simplified standard library support) represent kernel-level services.
• Additional utilities like “kernel/include” provide core API interfaces for the rest of the OS.
• Support Libraries and Subsystems:
• Graphics support in both “kernel/lib/graphics” and related font files (in both kernel and misc) suggest dedicated components for rendering and system display.
• The organization into “lib”, “include”, and “src” fosters a modular design in the kernel.
• Miscellaneous and Build Tools:
• Files such as Makefile, modules.mk, tools.mk, and build.mk hint at a custom build process.
• The “misc” directory and additional test directories (e.g., misc/testenv) indicate test code and helper scripts.
• Versioning and Documentation:
• Files like version.json and version.py alongside GitHub folders for development logs and images help with version tracking and communication of design status.