Getting user programs into my boot image (microkernel)
Posted: Wed Mar 04, 2026 5:01 am
I am trying to write a microkernel. I need to set up my task array with user programs, and I am looking at two approaches: limine modules and baking them into my kernel (not to run in ring 0, but simply to be available in my code).
Limine doesn't guarantee page alignment for modules, so it makes my job more difficult. I am thinking of including `ALIGN(4096)` statements in my linker scripts, flattening the resulting elf file with `objcopy`, then ultimately including them in my kernel using `.incbin`. It sounds very cumbersome.
The main constraint is the microkernel design, I would love not to include my bitmap frame allocator and virtual memory manager inside the kernel itself.
What's the best way to include user programs in your kernel? Thank you all :)
Limine doesn't guarantee page alignment for modules, so it makes my job more difficult. I am thinking of including `ALIGN(4096)` statements in my linker scripts, flattening the resulting elf file with `objcopy`, then ultimately including them in my kernel using `.incbin`. It sounds very cumbersome.
The main constraint is the microkernel design, I would love not to include my bitmap frame allocator and virtual memory manager inside the kernel itself.
What's the best way to include user programs in your kernel? Thank you all :)