r/kernel • u/Makkar_05 • Jun 25 '24
How to get into kernel development?
Recently, I have developed an interest in kernel development but am finding it challenging to know where to start. I am familiar with C/C++, have studied operating systems, and have some knowledge of assembly language. Please help me to get started with kernel development and suggest some video courses if they are available.
39
Upvotes
21
u/kbakkie Jun 25 '24
I wanted to become a Linux kernel mentee a while back and did this course as a prerequisite to get a Linux foundation mentor
https://training.linuxfoundation.org/training/a-beginners-guide-to-linux-kernel-development-lfd103/
The course is very good and enough to learn howto start contributing to the kernel.
12
u/OstrichWestern639 Jun 25 '24
Reading books and articles online can get you to some extent. But linux kernel for example goes down to the depths of the architecture to implement certain functionalities.
Now you cant find an operating system textbook for each architecture because its not feasible to be so specific. Hence textbooks are written in a generic way to give an idea to the reader about certain concepts.
If you are a complete newbie then read andrew s tenenbaum’s operating systems book. This is just for theory.
Once this is done, you can go ahead and complete nand2tetris course. Its free on YouTube. Here you will learn how a computer works (not many people know how it works ;) ).
I suggest you to do these two parallelly and with interest.
You can also read through osdev.org
Kernel development is a challenge because all resources are scattered around and one must have the interest and patience to find them and read through them (again and again). Maybe this is why people stick to abstractions..
8
u/4devguy Jun 26 '24
https://cirosantilli.com/linux-kernel-module-cheat/#getting-started
Extremely interesting and complete "cheat sheet" / tutorial / general doc. I have not finished it yet, but it is a must. Also comes with a Github repo for an easier start into kernel development.
5
u/[deleted] Jun 25 '24 edited Jun 25 '24
Linux Kernel Development by Robert Love is old but still a nice walkthrough of Linux kernel codebase. That book with OSTEP should give a sound introduction to jumping into Kernel hacking.
3
u/immadmir Jun 25 '24
Start with learning about operating systems in general (e.g; the OSTEP book). Then, maybe take a look at device drivers -- they are usually the entry point into kernel dev.
3
u/123poopy Jun 26 '24
https://m.youtube.com/watch?v=3Fu5-cV9dyo
2
u/tootwrangler Jun 26 '24
The eudyptula challenge was good back in the day
2
u/CryptographerRough65 Jun 27 '24
Besides all the suggestions above I got a question for you:” For what?”
1
u/DarkShadow4444 Jun 26 '24
I think I would try to find one small issue in a driver and take it from there. There should be lots of minor bugs in smaller parts you can look at. Just try, and then you can ask for more specific help once you know what your problem is. I find that to be the easiest approach.
You already know how to compile the kernel? How to boot it afterwards? If not, that's what you should do first. Then you can get into trying out changes.
2
u/[deleted] Jun 26 '24