Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm wondering if anyone has successfully got anywhere getting a basic microkernel up and running for development? I've done some searching but most of the Google results are "wish there was documentation for this". Mostly I'm trying to get to the point where I can successfully launch an elf64 binary and output "Hello, world!" to the screen or serial port.
So far I've been trying with L4Ka:Pistachio. I've pulled in the Pistachio code from the github repository and followed a guide both linked below. There were a number of compile errors (I notice the repo is untouched for 5 years, most of the errors are related to trying to compare a char* to '\0' which doesn't seem to be allowed in the current GCC. I changed '\0' to "\0" to pass the error) which I made what seemed like reasonable fixes for them. When I boot my iso though I get an endless boot loop with the output below dumped into the serial console. I have no idea if this is what is intended or not because the guide neglects to mention what pingpong (the demo program) is actually supposed to do.
Anyone manage to either get this working or get something similar working with another micro kernel?
There should be quite a lot of microkernels that can boot a "Hello world!". Aside from the "classical" ones like Mach and L4, you could also look at Minix or Fuchsia. If you feel like experimenting a bit more, you could look at smaller hobby OSes (e.g., those written by members of this forum). The microkernel-based OS in my signature, for example, can boot to either kmscon or Weston (although the boot process is not documented very well, either).
In general, however, modifying a microkernel to boot into some non-default environment will always be harder than booting a monolithic kernel. Microkernels often rely on support code in userspace, e.g., to enumerate devices, load drivers, or even to provide the basic libc functionality.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
GMorgan wrote:Mostly I'm trying to get to the point where I can successfully launch an elf64 binary and output "Hello, world!" to the screen or serial port.
Check out my bootloader, that was specifically designed for 64 bit and micro-kernels. Here's its forum thread with all the features detailed.
It loads an initrd into memory, maps the kernel executable inside into higher half and transfers control to it. It sets up the framebuffer as well as the serial port. It is well documented, and comes with an example "Hello World" kernel.