Thank you for your interest in contributing to OpenComp! This document provides guidelines for contributing to the project.
- Fork the repository on GitHub (https://github.com/misumuse/OpenComp-Kernel)
- Clone your fork locally
- Create a new branch for your feature or bugfix
- Make your changes
- Test thoroughly in QEMU
- Submit a pull request
x86_64-elf-gcc(cross-compiler)x86_64-elf-ld(linker)grub-mkrescue(ISO creation)qemu-system-x86_64(testing)
make clean
make
make run- Use 4 spaces for indentation (no tabs)
- Keep lines under 100 characters when possible
- Use descriptive variable names
- Add comments for complex logic
- Self-Contained: Components should be independent
- Single Responsibility: Each component does one thing well
- Minimal Dependencies: Avoid tight coupling between components
- Documentation: Document your component's purpose and API
/* mycomponent.c
*
* Brief description of what this component does
* Copyright (C) 2025 Your Name
* Licensed under GNU GPLv2
*/
#include "kernel.h"
// Private state (static)
static int my_state = 0;
// Helper functions (static)
static void helper_function(void) {
// ...
}
// Public API (if needed)
void my_component_do_something(void) {
// ...
}
// Component init function
static void mycomponent_init(void) {
puts("[mycomponent] Initializing...\n");
// Initialize state here
}
// Component tick function
static void mycomponent_tick(void) {
// Called repeatedly by kernel main loop
}
// Component registration
__attribute__((section(".compobjs"))) static struct component mycomponent_component = {
.name = "mycomponent",
.init = mycomponent_init,
.tick = mycomponent_tick
};
__attribute__((section(".comps"))) struct component *p_mycomponent_component = &mycomponent_component;- Update Documentation: Update README.md and ARCHITECTURE.md if needed
- Add Tests: Ensure your changes work in QEMU
- Clean Commits: Use clear, descriptive commit messages
- One Feature Per PR: Keep pull requests focused on one feature/fix
- Update Makefile: Add new source files to the build system
[component] Brief description (50 chars or less)
Detailed explanation of what changed and why.
Can be multiple paragraphs.
Fixes #123
Examples:
[desktop] Add window minimize functionality
[keyboard] Fix buffer overflow in scancode handler
[memory] Improve page allocation performance
- Timer interrupt support
- Mouse driver (PS/2)
- Better memory management (virtual memory)
- Process/task management
- System call interface
- Serial port debugging output
- More desktop applications
- Better error handling
- Documentation improvements
- Network stack basics
- Simple filesystem support
- Audio support
- Additional hardware drivers
Use GitHub Issues to report bugs. Include:
- Description: Clear description of the bug
- Steps to Reproduce: How to trigger the bug
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
- Environment: QEMU version, build environment, etc.
**Description**
Brief description of the bug
**To Reproduce**
1. Boot kernel
2. Type command 'xyz'
3. Observe crash
**Expected Behavior**
Command should execute normally
**Actual Behavior**
Kernel crashes with page fault
**Environment**
- QEMU version: 6.2.0
- GCC version: 11.2.0
- Host OS: Ubuntu 22.04Feature requests are welcome! Please use GitHub Issues and include:
- Use Case: Why is this feature needed?
- Proposed Solution: How might it work?
- Alternatives: Other approaches considered?
- Additional Context: Any other relevant information
All submissions require review. We look for:
- Correctness: Does it work as intended?
- Style: Does it follow project conventions?
- Documentation: Is it properly documented?
- Testing: Has it been tested?
- Integration: Does it fit the architecture?
By contributing, you agree that your contributions will be licensed under the GNU General Public License v2.0.
Feel free to open an issue with the "question" label if you need help or clarification.
Be respectful and constructive.
Thank you for contributing to OpenComp.