Linux kernel development kit

What is the best light weight for exploring Linux kernel development. It should have many debugging and profiling tools available with it :)

+7
linux linux-kernel
source share
6 answers

LFS . Then install each debugger and profiler that you can find.

+9
source share

I heard Linus himself uses Fedora . I would recommend Gentoo , which allows (intends) you to manually tune your kernel, this is the perfect setting for it (and I spent many hours squeezing every last bit of performance to enjoy it).

Naturally, Ubuntu is my preferred distribution, but you may have problems if you start capturing and removing the expected kernel functions. Gentoo will not complain or expect their start.

+8
source share

I liked using Gentoo to mess around with the kernel.

+7
source share

Distribution is not a big deal. This is what you want to do with the kernel, and develop / test its function.

Here are a few things to do.

but. Enable kernel debugging and logging options. This will definitely help you in debugging. see useful Linux kernel debugging options

b. Getdebuggers, for example Valgrind, which checks for memory leaks. See Doc e.g. https://www.kernel.org/doc/Documentation/kmemleak.txt

from. Found a good editor for editing. I do not want to start a vim vs emacs war. This is truly a personal preference, just make sure you follow the Linux kernel coding style guidelines. https://www.kernel.org/doc/Documentation/CodingStyle

e. Become familiar with the journal systems and the proc system, as they provide valuable information.

e. Read the documentation in the / usr / src / linux / Documentation directory. A very good starting point for understanding the kernel.

+3
source share

The distros probably don't matter much, since you will be working on your own kernel, not the “kitchen sink” core, in most cases distributions usually contain a bunch of patches.

If you are developing a kernel, then I guess you need a distribution that loads quickly, something like a puppy might be perfect here and make your actual encoding from something like Ubuntu.

+2
source share

Buildroot

Buildroot is a collection of scripts that generate tiny distributions with rootfs images smaller than 10MiB.

It downloads everything from the source code and compiles it, so it’s trivial to fix the packages.

The generated images are so small that it becomes possible to understand the entire userland setting, which will simplify focusing on the kernel.

The advantage over LFS: everything is fully automated. Because of this, Buildroot is used professionally in large organizations.

I created this setting to automate the work as much as possible: https://github.com/cirosantilli/linux-kernel-module-cheat

0
source share

All Articles