Skip to content

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

3 pointscollinglass1 comment
On 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.

Comments

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.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.