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