Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d1001fb
Updated the docs/ structure
pbalduino Oct 30, 2025
e65a0ab
Refactored driver layout
pbalduino Oct 30, 2025
756fbe2
Restructured filesystem layout
pbalduino Oct 30, 2025
dcfae66
Vendored doomgeneric sources
pbalduino Oct 30, 2025
daa1127
Updated test paths after fs restructure
pbalduino Oct 30, 2025
592b095
Added documentation for the graphic user interface milestone
pbalduino Oct 30, 2025
5984112
Introduced dynamic char device registry
pbalduino Oct 30, 2025
82f1474
Added PS/2 keyboard char device
pbalduino Oct 30, 2025
a18447e
Aligned memory helpers with naming scheme (#23)
pbalduino Oct 30, 2025
852c23f
Expanded char-device allocator to handle minor ranges (#23)
pbalduino Oct 31, 2025
f166ef8
Completed mknod syscall and userland tooling
pbalduino Oct 31, 2025
84aefd9
Documented dynamic major policy for drivers
pbalduino Oct 31, 2025
549ac77
Declared mknod prototype for userland
pbalduino Oct 31, 2025
0252c60
Renamed driver init entry to match naming scheme
pbalduino Oct 31, 2025
a849cc5
Renamed fb_init to framebuffer_init (#23)
pbalduino Oct 31, 2025
bd4eebd
Renamed additional init helpers for Phase 6 (#23)
pbalduino Oct 31, 2025
99a062a
Phase 6: align remaining init helpers with subsystem naming (#23)
pbalduino Oct 31, 2025
05352b2
Phase 6: align graphics and driver init names (#23)
pbalduino Oct 31, 2025
3caa208
Phase 6: normalize memory subsystem naming (#23)
pbalduino Oct 31, 2025
3ea2b9b
Phase 6: finalize sync primitive renames (#23)
pbalduino Oct 31, 2025
c3d543e
Phase 7: replace find-based kernel source discovery
pbalduino Oct 31, 2025
6f05134
Phase 7: hardcode uACPI and host-test sources
pbalduino Oct 31, 2025
9eed0ea
Documented binutils build command and corrected commit guidelines
pbalduino Oct 31, 2025
07e06bc
Phase 7: enumerated host tests manually (#23)
pbalduino Oct 31, 2025
0a112d9
Phase 7: listed kernel sources explicitly (#23)
pbalduino Oct 31, 2025
351eb94
Phase 7: wired kernel build to libc sources (#23)
pbalduino Oct 31, 2025
a1296ad
Phase 8: relocated fs and console sources (#23)
pbalduino Oct 31, 2025
94b6279
Phase 9: documented code layout guidelines (#23)
pbalduino Oct 31, 2025
c920365
Closed the task #23
pbalduino Oct 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ build/
.vscode/
bochsout.txt
core
!src/kernel/core/
!src/kernel/fs/core/
!include/kernel/core/
usermode
!src/usermode/
!src/usermode/*
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Kernel sources live in `src/` (drivers, memory, scheduler, syscall) with exported headers under `include/`. Userland libc and runtime live in `user/`, while runnable programs (e.g., shell, Doom helpers) sit in `app/`. Build products land in `build/` and the assembled disk image in `menios.hdd`/`menios.iso`. Design notes and roadmaps are in `docs/`; third-party toolchains are vendored in `vendor/`. Tests reside in `test/` alongside Unity helpers and host stubs.

## Build, Test, and Development Commands
- `make binutils` – build the cross binutils toolchain into `build/bin/`.
- `make userland` – build the libc, runtime, and user programs into `build/bin/`.
- `make build` – produce the kernel, sync Limine assets, and pack the bootable HDD/ISO images.
- `make run` – boot the built image in QEMU using the project default flags.
Expand All @@ -18,4 +19,4 @@ Follow the two-space indentation rule across C and assembly; never commit tabs.
Host tests live in `test/test_*.c` and use Unity assertions; name helpers after the feature under test (e.g., `test_heap_virtual.c`). Ensure new functionality ships with tests or updates existing cases. Run `make test` locally; the suite builds each test with kernel stubs and drops binaries in place. Boot the image with `make run` (or on hardware) when touching kernel low-level code, IPC, or filesystems to confirm no runtime regressions.

## Commit & Pull Request Guidelines
Author commits in present tense with a concise (<72 char) subject and an explanatory body covering what changes and why (e.g., `Fix buffer overflow in vsprintk`). Reference related issues or tasks using `#123` syntax and update `tasks.json` to reflect progress since it is the source of truth. Squash fix-ups before submitting. Pull requests should include a clear summary, testing notes, screenshots for UI-facing shells if relevant, and links to roadmap items being advanced. Flag breaking changes or tooling updates explicitly and update documentation (README, docs/) when behavior shifts.
Author commits in past tense with a concise (<72 char) subject and an explanatory body covering what changed and why (e.g., `Fixed buffer overflow in vsprintk`). Reference related issues or tasks using `#123` syntax and update `tasks.json` to reflect progress since it is the source of truth. Squash fix-ups before submitting. Pull requests should include a clear summary, testing notes, screenshots for UI-facing shells if relevant, and links to roadmap items being advanced. Flag breaking changes or tooling updates explicitly and update documentation (README, docs/) when behavior shifts.
37 changes: 21 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -321,39 +321,44 @@ void test_memory_allocation_success(void) {

```
menios/
├── src/ # Kernel source code
├── kernel/ # Core kernel functionality
├── drivers/ # Hardware drivers
│ └── libc/ # Basic C library functions
├── include/ # Header files
── kernel/ # Kernel-specific headers
── test/ # Unit tests
├── bin/ # Build artifacts
├── vendor/ # Third-party dependencies
└── docs/ # Project documentation
├── app/ # User-facing programs installed into /bin
├── build/ # Generated artifacts (kernel, userland, disk images)
├── docs/ # Architecture notes and roadmaps
── include/ # Exported headers (mirrors source hierarchy)
├── src/ # Kernel and shared libc sources
── kernel/ # Kernel subsystems (core, arch, drivers, fs, …)
│ └── libc/ # Target libc implementation shared with userland
├── test/ # Unity-based host tests and stubs
├── user/ # Userland runtime (crt0, libc glue)
└── vendor/ # Third-party toolchains and helpers (doomgeneric, uACPI)
```

### Key Components

1. **Memory Management** (`src/kernel/memory/`)
1. **Memory Management** (`src/kernel/mem/`)
- Physical memory manager (PMM)
- Virtual memory manager (VMM)
- Kernel heap (kmalloc)

2. **Process Management** (`src/kernel/process/`)
2. **Process Management** (`src/kernel/proc/`)
- Kernel threading
- Basic scheduler
- Synchronization primitives

3. **I/O Systems** (`src/drivers/`)
- PS/2 keyboard driver
- Console/framebuffer
- Future: VGA, audio, storage
3. **I/O Systems** (`src/kernel/drivers/`, `src/kernel/console/`, `src/kernel/framebuffer/`)
- PS/2 keyboard driver and input pipeline
- ANSI/serial/front-buffer consoles
- Storage controllers (AHCI) and future devices

4. **System Calls** (`src/kernel/syscall/`)
- Syscall dispatcher
- Individual syscall implementations

Additional detail on the layout can be found in
[`docs/architecture/code_structure.md`](docs/architecture/code_structure.md). When
adding new modules ensure sources, headers, and Makefile entries follow the
patterns outlined there.

### Adding New Features

When adding new features:
Expand Down
Loading