Documentation/translations/zh_CN/process/howto.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/process/howto.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/process/howto.rst- Extension
.rst- Size
- 25021 bytes
- Lines
- 496
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. _cn_process_howto:
.. include:: ../disclaimer-zh_CN.rst
:Original: :ref:`Documentation/process/howto.rst <process_howto>`
译者::
英文版维护者: Greg Kroah-Hartman <greg@kroah.com>
中文版维护者: 李阳 Li Yang <leoyang.li@nxp.com>
中文版翻译者: 李阳 Li Yang <leoyang.li@nxp.com>
时奎亮 Alex Shi <alex.shi@linux.alibaba.com>
中文版校译者:
钟宇 TripleX Chung <xxx.phy@gmail.com>
陈琦 Maggie Chen <chenqi@beyondsoft.com>
王聪 Wang Cong <xiyou.wangcong@gmail.com>
如何参与Linux内核开发
=====================
这是一篇将如何参与Linux内核开发的相关问题一网打尽的终极秘笈。它将指导你
成为一名Linux内核开发者,并且学会如何同Linux内核开发社区合作。它尽可能不
包括任何关于内核编程的技术细节,但会给你指引一条获得这些知识的正确途径。
如果这篇文章中的任何内容不再适用,请给文末列出的文件维护者发送补丁。
入门
----
你想了解如何成为一名Linux内核开发者?或者老板吩咐你“给这个设备写个Linux
驱动程序”?这篇文章的目的就是教会你达成这些目标的全部诀窍,它将描述你需
要经过的流程以及给出如何同内核社区合作的一些提示。它还将试图解释内核社区
为何这样运作。
Linux内核大部分是由C语言写成的,一些体系结构相关的代码用到了汇编语言。要
参与内核开发,你必须精通C语言。除非你想为某个架构开发底层代码,否则你并
不需要了解(任何体系结构的)汇编语言。下面列举的书籍虽然不能替代扎实的C
语言教育和多年的开发经验,但如果需要的话,做为参考还是不错的:
- "The C Programming Language" by Kernighan and Ritchie [Prentice Hall]
《C程序设计语言(第2版·新版)》(徐宝文 李志 译)[机械工业出版社]
- "Practical C Programming" by Steve Oualline [O'Reilly]
《实用C语言编程(第三版)》(郭大海 译)[中国电力出版社]
- "C: A Reference Manual" by Harbison and Steele [Prentice Hall]
《C语言参考手册(原书第5版)》(邱仲潘 等译)[机械工业出版社]
Linux内核使用GNU C和GNU工具链开发。虽然它遵循ISO C11标准,但也用到了一些
标准中没有定义的扩展。内核是自给自足的C环境,不依赖于标准C库的支持,所以
并不支持C标准中的部分定义。比如long long类型的大数除法和浮点运算就不允许
使用。有时候确实很难弄清楚内核对工具链的要求和它所使用的扩展,不幸的是目
前还没有明确的参考资料可以解释它们。请查阅gcc信息页(使用“info gcc”命令
显示)获得一些这方面信息。
请记住你是在学习怎么和已经存在的开发社区打交道。它由一群形形色色的人组成,
他们对代码、风格和过程有着很高的标准。这些标准是在长期实践中总结出来的,
适应于地理上分散的大型开发团队。它们已经被很好得整理成档,建议你在开发
之前尽可能多的学习这些标准,而不要期望别人来适应你或者你公司的行为方式。
法律问题
--------
Linux内核源代码都是在GPL(通用公共许可证)的保护下发布的。要了解这种许可
的细节请查看源代码主目录下的COPYING文件。Linux内核许可准则和如何使用
`SPDX <https://spdx.org/>` 标志符说明在这个文件中
:ref:`Documentation/translations/zh_CN/process/license-rules.rst <cn_kernel_licensing>`
如果你对它还有更深入问题请联系律师,而不要在Linux内核邮件组上提问。因为
邮件组里的人并不是律师,不要期望他们的话有法律效力。
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.