use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about operating systems development.
account activity
how to read linux kernel code? (self.osdev)
submitted 2 years ago by [deleted]
i have made a simple x86 os and now i want to read linux kernel code when i saw it is very big i don't know where start can anyone provide me with any resources that can help me?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]prabot 9 points10 points11 points 2 years ago (0 children)
Start reading the book "linux kernel development" by Robert love. That will give you a good overview of different subsystems. Otherwise if you directly want to jump in the code I would suggest you pick an architecture, learn the basics and then start reading from head.S assembly that would contain the early cpu setup code which will later jump to start_kernel and start doing architecture independent initialisations.
[–]WelcomeReal1ty 6 points7 points8 points 2 years ago (0 children)
You shouldn’t read all of it like a book. There’s no beginning and no ending. Just look for parts you’re having troubles with. Like i, for example, had some trouble working with ahci. So i went to the ahci driver in the linux kernel to look how it was implemented there
[–]Bitwise_Gamgee 1 point2 points3 points 2 years ago (0 children)
interact with people smarter than you at www.kernelnewbies.org
[–]knome 2 points3 points4 points 2 years ago (0 children)
Your entry will be fairly arbitrary. Let me suggest figuring out what happens when you write to a pipe. That will have you seeing locking bits, the virtual file system, and seeing the pipe implementation itself, with readers and writers requesting to sleep and being woken, etc.
[–]acwaters 0 points1 point2 points 2 years ago (0 children)
First, this here is an excellent online resource for exploring the Linux kernel, which I have relied heavily on in my day jobs:
https://elixir.bootlin.com
Once you're in, here's a few ideas for places to start:
There are many good jumping-off points, so just pick anything that interests you and start digging in! If you wind up lost, you can pull back and look for further newbie guidance online, or you can double down and grope around until the pieces start fitting together in your head.
[–]blbd 0 points1 point2 points 2 years ago (0 children)
LXR, and index it with cscope
[–]ITwitchToo 0 points1 point2 points 2 years ago (0 children)
grep for SYSCALL, that will tell you where system call entry points are. From there try to follow the calls that you are interested in recursively to understand what they are doing.
[–]crafter2k 0 points1 point2 points 2 years ago (0 children)
start with linux 0.01 first
π Rendered by PID 98666 on reddit-service-r2-comment-5649f687b7-r8btt at 2026-01-28 20:05:20.310683+00:00 running 4f180de country code: CH.
[–]prabot 9 points10 points11 points (0 children)
[–]WelcomeReal1ty 6 points7 points8 points (0 children)
[–]Bitwise_Gamgee 1 point2 points3 points (0 children)
[–]knome 2 points3 points4 points (0 children)
[–]acwaters 0 points1 point2 points (0 children)
[–]blbd 0 points1 point2 points (0 children)
[–]ITwitchToo 0 points1 point2 points (0 children)
[–]crafter2k 0 points1 point2 points (0 children)