Ask HN: Resources to get started writing user space over a (linux) kernel?

3 points by collinglass ↗ HN
I'd like to start hacking away at my own OS over the linux kernel, how do I get started? I've looked at tons of kernel hacking resources, is this it? I'd like a resource that distinguishes "user space" from kernel space.

1 comment

[ 3.0 ms ] story [ 15.6 ms ] thread
Assuming you want to start from scratch, perhaps as a learning exercise, without leveraging glibc and similar:

First, try running a kernel directly within a VM such as KVM. Then read about the initramfs format and how to construct one, and build a simple one with a single statically linked executable. Explore what you can do with that.

http://www.muppetlabs.com/~breadbox/software/tiny/teensy.htm... might provide you with more insight into the syscall interface and the ELF format. From there, look into the ELF "interpreter" mechanism and the dynamic linker. Then, write a C program that doesn't link to glibc, and instead makes syscalls directly.