Skip to content

Conversation

@F1r3d3v
Copy link
Collaborator

@F1r3d3v F1r3d3v commented Dec 11, 2025

image

Bootloader now locates and passes ramdisk information to the kernel.
The VFS module mounts the FAT12 ramdisk at the root filesystem.
Introduces 'cd', 'ls', 'cat', and 'pwd' commands to the kernel shell for basic filesystem interaction.

Introduce several new data structures and allocator wrappers:
- CritBitTree: A binary crit-bit tree for NUL-terminated strings.
- LinkedList: Generic single and double linked lists with custom allocators.
- LruCache: A fixed-capacity LRU cache.
- TaggedPointer: Stores type info in unused pointer bits.
- CustomAllocatorWrapper: Enables using custom allocators with containers.
Introduces a comprehensive system for building root filesystems,
supporting both initial RAM disks (INITRD) and standalone disk images.

This includes:
- New `cmake/BashConfigHelpers.cmake` for managing bash configurations.
- `register_filesystem` CMake function in `RuntimeHelpers.cmake`.
- `rootfs` subdirectory with its own CMake configuration.
- `scripts/actions/make_rootfs.bash` and `scripts/rootfs/make_fat.bash`
  for orchestrating and creating FAT filesystems.
- A `ramdisk` feature flag to control INITRD vs. image generation.
- New bash helper functions for size conversions.
- Fixes a bug in test filtering logic.
Introduces a new `Path` class in `kernel/src/vfs/path.hpp` to provide robust path manipulation capabilities for the Virtual File System. This includes parsing, normalization, component access, concatenation, and comparison of file paths. A comprehensive test suite is also added.
Refactor `OptionalField` in `utils.hpp` from a type alias to a macro to ensure `NO_UNIQUE_ADDRESS` is correctly applied with `std::conditional_t`.
Introduce `DivRoundUp` for safe integer division, `span::get` for structured access to spans, and compile-time array utilities.
Add `UNUSED`, `CONCAT`, and `RESERVED` macros.
Refactor PMM calculations to use `DivRoundUp` and fix a header guard.
Introduces the core Virtual File System (VFS) framework, including:
- Generic VFS interfaces and types for filesystem operations.
- Error handling mechanisms (`VfsError`, `Result`).
- An in-memory I/O driver for testing and simple storage.
- Base FAT filesystem implementation (`Fat` template).
- Specific drivers for FAT12, FAT16, and FAT32.
- Comprehensive unit tests for FAT12.

This lays the foundation for managing various filesystems within the kernel.
Introduces the VFS module, providing a unified interface for
filesystem operations like mounting, file, and directory management.
Includes core implementation, public API, and comprehensive tests.
Bootloader now locates and passes ramdisk information to the kernel.
The VFS module mounts the FAT12 ramdisk at the root filesystem.
Introduces 'cd', 'ls', 'cat', and 'pwd' commands to the kernel shell for basic filesystem interaction.
Base automatically changed from f1r3d3v/vfs-03 to dev December 11, 2025 06:43
@F1r3d3v F1r3d3v merged commit 1a1a398 into dev Dec 11, 2025
3 of 4 checks passed
@F1r3d3v F1r3d3v deleted the f1r3d3v/vfs-04 branch December 11, 2025 07:00
F1r3d3v added a commit that referenced this pull request Dec 11, 2025
Bootloader now locates and passes ramdisk information to the kernel.
The VFS module mounts the FAT12 ramdisk at the root filesystem.
Introduces 'cd', 'ls', 'cat', and 'pwd' commands to the kernel shell for
basic filesystem interaction.
F1r3d3v added a commit that referenced this pull request Dec 11, 2025
Bootloader now locates and passes ramdisk information to the kernel.
The VFS module mounts the FAT12 ramdisk at the root filesystem.
Introduces 'cd', 'ls', 'cat', and 'pwd' commands to the kernel shell for
basic filesystem interaction.
Jlisowskyy pushed a commit that referenced this pull request Jan 7, 2026
Bootloader now locates and passes ramdisk information to the kernel.
The VFS module mounts the FAT12 ramdisk at the root filesystem.
Introduces 'cd', 'ls', 'cat', and 'pwd' commands to the kernel shell for
basic filesystem interaction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants