Become a Linux operating system kernel developer-general Linux technology-Linux programming and kernel information. The following is a detailed description. Do you want to know how to become a Linux kernel developer? Or your boss tells you, "Write a Linux driver for this device. "The purpose of this document is to describe the process you need to go through and instruct you how to work with the community to teach you all the knowledge you need to know for these purposes. This article also explains why the community works like this.
Almost all the kernels are written in C, and some architecture-related components are written in assembly language. Mastering C language is essential for kernel development. An assembly language (any architecture) is not required unless you are preparing to develop the underlying architecture. Although The following books cannot completely replace The solid C Language Teaching and/or years of experience, they are still a good reference, if needed:-"The C Programming Language" author: kernighan and Ritchie [Prentice Hall]-"Practical C Programming" by Steve Oualline [O 'Reilly]
The kernel is written in the gnu c and GNU tool chains. Although it complies with the ISO C89 standard, it still uses some extensions not included in the standard. The kernel is a self-built C environment and does not rely on Standard C libraries. Therefore, some C language standards are not supported. Division and floating point number of any long type are not allowed. Sometimes it is hard to understand the kernel's assumptions about the toolchain and expansion it uses, and unfortunately there is no absolute reference to them. For more information, see the gcc info page ('info gcc.
Remember that you are trying to learn how to work with an existing development community. This is a group of people with complex components. They have high standards for code, style, and steps. These standards are time tested.
They found that following these standards is the best choice for such a large-scale and geographically dispersed team. Try to learn as much knowledge about these standards as possible in advance, because they all have good documentation; do not expect others to follow your or your company's approach.
Legal issues
The Linux kernel source code is published according to GPL. See the COPYING file under the source code tree to obtain details about this license. If you have any questions about this license, please contact your attorney and do not ask in the Linux Kernel email list. People in the email list are not lawyers and you should not rely on their interpretation of legal issues.
Document
The Linux kernel source code tree contains many documents that are invaluable for learning how to communicate with the kernel community. When a new feature is added to the kernel, we recommend that you add the document explaining this new feature to the kernel. If a kernel change causes a kernel change to the user space interface, we recommend that you send this information or a manpage patch that explains the change to the maintainer mtk-manpages@gmx.net on the manual page.
Here is a list of files to be read in the kernel source code tree:
README
This file briefly introduces the background of the Linux kernel and describes what needs to be done to configure and compile the kernel. Start from here.
Do ***** entation/Changes
This file describes the list of various software required for successful compilation and running of the kernel.
Do ***** entation/CodingStyle
This file describes the Linux kernel code style and some reasons behind it. All new code must comply with the guidelines in this document. Most maintainers only accept patches that comply with these rules. Many users only check the correct code.
Do ***** entation/SubmittingPatches
Do ***** entation/SubmittingDrivers
These files detail how to successfully create and send a patch, including (but not limited ):
-Email content
-Email format
-Who to send
Compliance with all these rules does not guarantee success (a detailed check of content and style is required for all patches), but failure to comply with these rules will certainly fail.
This file explains the reasons for conscious decisions-not using stable APIs in the kernel-, including:
-Subsystem separation layer (for compatibility ?)
-Drive portability between operating systems
-Ease (or stop) the rapid changes in the kernel source code tree
This document is critical to understanding the development philosophy of Linux. It is also important to switch from development of other operating systems to development of Linux.
Do ***** entation/SecurityBugs
If you feel that you have discovered a security problem in the Linux kernel, follow the steps described in this document to remind kernel developers and help solve the problem.
Do ***** entation/ManagementStyle
This document describes how Linux kernel maintainers operate and why they do so. It is very important for anyone new to kernel development (or anyone interested in this topic.
Because it explains some common error concepts, it can solve the doubts about the unique behavior of kernel maintainers.
Do ***** entation/stable_kernel_rules.txt
This document describes the rules for the stable version of the kernel, and what to do if you want to make some changes to one of the versions.
Do ***** entation/kernel-docs.txt
A list of external documents about kernel development. If not found in the kernel internal document? For more information, see the list.
Do ***** entation/applying-patches.txt
This section describes what patches are and how to apply patches to different kernel development branches.
The kernel also has many documents that can be automatically generated from the source code. This includes a comprehensive description of the kernel's internal API and the rules on how to handle the lock. These documents are created in the Do ***** entation/DocBook/folder. In the kernel main source code tree, run the following command to create documents in different formats such as PDF, Postscript, HTML, and manpage: make writable docsmake psdocsmake htmldocsmake mandocs
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service