Documentation/translations/zh_TW/process/howto.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_TW/process/howto.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_TW/process/howto.rst- Extension
.rst- Size
- 25058 bytes
- Lines
- 500
- 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
.. SPDX-License-Identifier: GPL-2.0
.. _tw_process_howto:
.. include:: ../disclaimer-zh_TW.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>
胡皓文 Hu Haowen <2023002089@link.tyut.edu.cn>
如何參與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_TW/process/license-rules.rst <tw_kernel_licensing>`
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.