Creating a Kernel Profile
Step-by-step guide to creating your own custom Helix kernel profile — from directory setup to first boot.
Introduction
Helix is built around profiles — self-contained kernel configurations that define exactly which subsystems, modules, and features your OS includes. Creating a profile is the primary way to build a custom Helix-based operating system tailored to your target platform.
A profile is a Cargo crate inside the profiles/ directory. It contains:
- A
helix.toml— your kernel configuration manifest - A
linker.ld— the linker script for your target boot protocol - A
src/main.rs— the kernel entry point - Optional additional sources for boot-time setup, framebuffer init, etc.
Today only
profiles/minimal/is a fully runnable profile. The other directories (limine/,uefi/,common/) provide linker scripts only.
Directory Structure
Create a new directory under profiles/ with the following layout:
Your profile directory should look like this:
profiles/my-kernel/
├── Cargo.toml # Crate manifest (depends on helix-core, helix-hal, etc.)
├── helix.toml # Kernel configuration
├── linker.ld # Linker script for your boot protocol
└── src/
└── main.rs # Kernel entry point (_start / kernel_main)
helix.toml Configuration
The helix.toml file defines every aspect of your kernel: target architecture, enabled features, memory layout, scheduler, console, module selection, boot sequence, and build options.
Here is a minimal example:
For the full configuration schema and every available option, see the helix.toml Reference page.
Linker Script
Every profile needs a linker script that tells the linker how to lay out the kernel binary in memory. The script depends on your boot protocol:
- Multiboot2 — flat physical layout at 1 MB
- Limine — PIE binary with HHDM (Higher-Half Direct Mapping)
- UEFI — PIE binary with RELRO
Here's a minimal Multiboot2 linker script to get started:
For PIE/KASLR-ready layouts and architecture-specific scripts, see the Linker Scripts page.
Kernel Entry Point
Your src/main.rs is the kernel entry point. It must be a #![no_std] + #![no_main] crate with an _start or kernel_main function (matching your helix.toml boot.entry).
Workspace Setup
After creating your profile, register it in the root Cargo.toml workspace:
Make sure your Cargo.toml specifies the correct target and linker:
Build & Test
Once your profile is set up, use the standard Helix build pipeline:
Checklist
Before submitting your profile:
| Step | Command | Expected Result |
|---|---|---|
| 1. Build | ./scripts/build.sh | No errors, ELF produced |
| 2. Boot | ./scripts/run_qemu.sh | Kernel reaches kernel_main |
| 3. Format | cargo fmt --all | No formatting changes |
| 4. Lint | cargo clippy --all-targets | No warnings |
| 5. Test | cargo test --target x86_64-unknown-linux-gnu | All tests pass |
Tip: Use the
profiles/minimal/profile as a reference implementation. It's the most complete and well-tested profile in the repository.