OpenComp is an educational component-based kernel featuring a simple text-mode desktop environment. It's designed to help developers understand operating system fundamentals while maintaining a clean, modular architecture.
Note: Images may be outdated and/or completely different from the current release, development is quick.
- Component Architecture: Modular design where features are self-contained components
- Memory Management: Bitmap-based physical page allocator managing 16MB
- Keyboard Driver: PS/2 keyboard input with scancode translation
- Desktop Environment: Basic windowing system with Linux-like shortcuts and terminal-style window
- VGA Display: Enhanced VGA graphics with color support
- Multiboot2 Compliant: Boots with GRUB2 bootloader
- Dual ISO Output: Builds both 32-bit and experimental x86_64 ISOs
# Clone the repository
git clone https://github.com/misumuse/OpenComp-Kernel.git
cd OpenComp-Kernel
# Build and run
make
make runFirst time building? See QUICKSTART.md for detailed setup instructions.
Legacy Text-mode desktop with windowing system
┌──────────────────────────────────────────────────────────────────────────────┐
│ OpenComp Desktop Environment │
├──────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────────────────────────────┐ │
│ │ Welcome to OpenComp │ │
│ ├────────────────────────────────────┤ │
│ │ │ │
│ │ Welcome to OpenComp! │ │
│ │ │ │
│ │ Type 'help' for commands. │ │
│ │ │ │
│ └────────────────────────────────────┘ │
│ │
│ │
├──────────────────────────────────────────────────────────────────────────────┤
│ CMD> help_ │
└──────────────────────────────────────────────────────────────────────────────┘
x86_64-elf-gcccross-compilerx86_64-elf-ldlinkergrub-mkrescue(for creating bootable ISO)qemu-system-x86_64(for testing)
sudo apt-get install build-essential grub-pc-bin xorriso qemu-system-x86
# For cross-compiler, you may need to build from source or install via:
sudo apt-get install gcc-x86-64-linux-gnumake # Build 32-bit + x86_64 experimental kernels
make run # Build and run 32-bit ISO in QEMU
make run64 # Build and run x86_64 experimental ISO in QEMU
make clean # Clean build artifactsOnce booted, you'll see the desktop environment with a command prompt at the bottom.
help- Display available commandsabout- Show kernel informationmem- Display memory statisticsclear- Close all windows
Type commands at the bottom prompt and press Enter to execute them.
OpenComp uses a component-based architecture where each major feature is a self-contained component with init() and tick() functions.
- Memory Component - Physical memory management
- Keyboard Component - PS/2 keyboard driver
- Desktop Component - Windowing system and UI
Create a new .c file with this structure:
#include "kernel.h"
static void my_component_init(void) {
// Initialize your component
}
static void my_component_tick(void) {
// Called repeatedly in main loop
}
__attribute__((section(".compobjs"))) static struct component my_component = {
.name = "my_component",
.init = my_component_init,
.tick = my_component_tick
};
__attribute__((section(".comps"))) struct component *p_my_component = &my_component;Add your component to the Makefile OBJS list and recompile.
├── LICENSE - GNU GPLv2 license
├── README.md - This file
├── Makefile - Build configuration
├── kernel.h - Main kernel header
├── kernel.c - Core kernel code
├── memory.c - Memory management component
├── keyboard.c - Keyboard driver component
├── desktop.c - Desktop environment component
├── start.S - Assembly entry point
└── linker.ld - Linker script
Future features planned:
- Mouse support
- Simple filesystem (initrd)
- Process/task management
- System call interface
- Network stack (basic)
- More desktop applications
- Timer interrupts
- Better memory management (virtual memory)
Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
- Follow the existing component architecture
- Keep components self-contained
- Document your code
- Test in QEMU before submitting
- Update README with new features
OpenComp is licensed under the GNU General Public License v2.0. See LICENSE for details.
Copyright (C) 2025 B."Nova" J.
OpenComp is meant to help development of other kernels, such as GNU/Linux and BSD, by providing educational examples of kernel development techniques.