OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:51 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Good microkernel for x86_64
PostPosted: Sun Jul 14, 2019 4:59 pm 
Offline

Joined: Sun Jul 14, 2019 4:27 pm
Posts: 22
Hi Guys,

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?

Thanks in advance.

Code:
KickStart 0.1374389535
Detected multiboot compliant loader
kernel    (0x0011f000-0x001791f0)   => 0x00d17000
  (0x0011f160-0x001486c0) -> 0x00600000-0x00629560
  (0x001486c0-0x00148fc3) -> 0x00800000-0x00800903
  (0x00149000-0x0014e1b4) -> 0x00a00000-0x00a051b4
  (0x0014f000-0x00165470) -> 0x00c00000-0x00c16470
  (0x00166000-0x0016dca0) -> 0x00d17000-0x00d1eca0
sigma0    (0x0017a000-0x001a0c48)   => 0x00f00000
  (0x0017a0c0-0x001802a0) -> 0x00f00000-0x00f061e0
roottask  (0x001a1000-0x001cc698)   => 0x01000820
  (0x001a10b0-0x001b20c8) -> 0x01000000-0x01011018


https://github.com/l4ka/pistachio

https://www.l4ka.org/english/120.php


Top
 Profile  
 
 Post subject: Re: Good microkernel for x86_64
PostPosted: Mon Jul 15, 2019 12:24 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 999
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].


Top
 Profile  
 
 Post subject: Re: Good microkernel for x86_64
PostPosted: Mon Jul 15, 2019 2:13 am 
Offline
Member
Member
User avatar

Joined: Thu Oct 13, 2016 4:55 pm
Posts: 1584
Hi,

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.
Image

Cheers,
bzt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot], nullplan and 59 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group