Linux Kernel Development
  • Introduction
  • Linux Kernel Development Environment
    • Git Source Code Management
    • Docker
  • Linux Kernel Development Process
    • A Guide To The Linux Kernel Development Process
  • Linux Kernel Compilation
  • Linux Kernel Modules
  • Linux Kernel Build System
    • Compilation Kernel Object
    • Compilation Built-In
  • Linux Kernel Patch
    • Patchset
  • Linux Kernel Developer
Powered by GitBook
On this page
  • Let’s get started
  • What Linux Kernel development process is about?
  • The importance of “getting” code into the mainline
  • Licensing
  • How the process development works
  • The big picture
  • The lifecycle of a patch
  • Mailing lists
  • How patches get into the kernel
  • Other Trees
  • Next trees
  • Staging trees
  • Tools
  • Getting started with Kernel development
  • Early stage planning
  • Early Stage Planning
  • Early Discussion
  • Who do you talk to?
  • When to post?
  • Getting official buy-in
  • Getting the code right
  • Posting patches
  • Followthrough
  • Advanced Topics
  • Conclusion
  1. Linux Kernel Development Process

A Guide To The Linux Kernel Development Process

The purpose of "A guide to the Linux Kernel development process" is to help developers (and their managers) work with the development community with a minimum of frustration. It is an attempt to document how this community works in a way which is accessible to those who are not intimately familiar with Linux kernel development (or, indeed, free software development in general). While there is some technical material here, this is very much a process-oriented discussion which does not require a deep knowledge of kernel programming to understand. Homepage Based on Linux Kernel Commit ID 75b021468368288ac8fec1a86a13f5cf2229139e

Go to the Linux Kernel Source Code

user@workstation:~$ cd linux
user@workstation:~/linux$

Let’s get started

The Linux Foundation (LF) is dedicated to building sustainable ecosystems around open source projects to accelerate technology development and commercial adoption. The largest open source non-profit organization, it works to promote, protect, and advance Linux and collaborative development and support the "greatest shared technology resources in history." Wikipedia

  • Ask Wikipedia about Linux Kernel

How many files in total?

$ git ls-files | wc -l

How many collaborations in total?

$ git log --pretty=oneline | wc -l

What Linux Kernel development process is about?

  • Watch “How Linux is built” by LinuxFoundation

$ find . -type f -name \*.[ch]* -print0 | xargs -0 cat | wc -l
$ git log --pretty=short | grep Author
$ ls arch
$ ls arch/ | wc -l

$ ls arch/x86
$ ls arch/arm

$ ls arch/x86/configs
$ ls arch/arm/configs
$ git log | grep scalable
$ git log | grep capable
$ git log | grep reliable

The importance of “getting” code into the mainline

  • Go to mainline, the main repository of the Linux Kernel source code and get used to the interface, find out about the different sections mainline

$ vi README

$ git log
/propietary
$ git log c752d04

$ git ls-files arch/arm | grep gpio
$ git ls-files arch/arm | grep gpio | wc -l

$ git ls-files arch/powerpc | grep gpio
$ git ls-files arch/powerpc | grep gpio | wc -l

Extra Reading

  • Read how changes can influence the direction of the Linux Kernel http://marc.info/?l=linux-kernel&m=128979084506774

  • Read how delayed code changes make kernel developers angry

    https://lkml.org/lkml/2010/11/2/147

  • Read how unprepared code submissions make Linus Torvalds mad

    http://thread.gmane.org/gmane.linux.kernel/1114495/focus=112007

Licensing

  • Ask Wikipedia about Free Software

  • Ask Wikipedia about GNU General Public License

$ git grep GPLv2
$ vi COPYING
$ git log | grep signed-off

How the process development works

  • Ask a kernel developer: maintainer workflow

The big picture

Nobody knows when a kernel will be released, because it's released according to perceived bug status, not according to a preconceived timeline.

4.x Kernel Tree

    • Linux Kernel's Source Management Tool

  • 4.x.y -Stable Kernel Tree

  • Stable Kernel Rules: Everything you ever wanted to know about Linux -stable releases

-Next Kernel Tree

>

  • Go to mainline, the main repository of the Linux Kernel source code

    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git

  • Review section “tags”

  • What is the latest version of the Linux Kernel?

  • How many Release Candidates the Kernel has had in the last 2 cycles?

  • Find out more about the Merge Window cycle

    • https://lkml.org/lkml/2011/5/23/358

    • https://lkml.org/lkml/2012/5/21/296

    • https://lkml.org/lkml/2012/1/19/418

  • Find out more about some concerns on Merge Window cycle

    http://kerneltrap.org/node/14152

  • Read Linus’ message celebrating the final release of a version

    https://lkml.org/lkml/2012/3/18/132

$ git tag -l

The lifecycle of a patch

$ git checkout –b my.master origin/master
$ git tag -l
$ git checkout v3.6
$ git log
$ git format-patch -s -1
$ cat 0001-Linux-3.6.patch

checkout version 3.5 and generate top patch where version is changed

Mailing lists

$ git log | grep vger.kernel.org
$ vi MAINTAINERS

How patches get into the kernel

None

$ git log | grep torvalds
$ git log | grep Torvalds | wc -l

Other Trees

None

Next trees

None

Staging trees

None

Tools

None

Getting started with Kernel development

None

Early stage planning

Early Stage Planning

None

Early Discussion

None

Who do you talk to?

$ scripts/get_maintainer.pl -f drivers/input/… $ git log | grep Morton

When to post?

None

Getting official buy-in

None

Getting the code right

Posting patches

Followthrough

None

Advanced Topics

None

Conclusion

PreviousLinux Kernel Development ProcessNextLinux Kernel Compilation

Last updated 7 years ago