KernelNewbiesTW:

Kernelnewbies網站的這個部份本意是如何讓程式碼併入上層核心的手冊, 由Linus Torvalds維護和可以從kernel.org取得的的核心樹.

合併至上游程式碼有什麼好處?

合併你的原始碼至上游要花費精力,貢獻和時間. 過程並不容易, 因為Linus接受程式碼進入他的版本時, 他冒著這一輩子得維護該程式碼的風險. 如果品質差的程式碼被接受, 維護Linux核心會變得非常睏難. 這些理由還有更多意指讓程式碼收入Linux核心門坎相對的提高.

However, there are also a number of benefits to having your source code accepted into the kernel.

Maintainability

Keeping up with the changes in the upstream kernel can be a challenge, wasting days or weeks of developer time every time the upstream kernel changes. Code that lives in the upstream kernel does not have this issue, since kernel developers tend to simply grep the sources and fix up any driver that is impacted by a proposed API change. This frees up your developers for more important work.

Ubiquity

Your source code will be present in every Linux distribution. This matters if you would like to sell your hardware to every Linux user. No more need to lobby distributions to include your patches (hard), you can just ask them to switch on a config option (easy).

Quality control

Some of the world's best developers will be going over your source code with a fine comb. This may be embarrassing for a few days or weeks, but in the end the code tends to work better and be more easily maintained. In some cases the upstream developers have made network and storage drivers 30% faster, making the hardware more attractive to customers.

How to merge code upstream

Merging code into the upstream kernel can be a daunting process to the uninitiated. However, with the right strategy in mind, you won't get lost on your way to upstream acceptance.

Helpful documents from the kernel tree:

Other documents on getting patches upstream:

KernelNewbiesTW: UpstreamMerge (last edited 2010-05-28 12:12:15 by ChiaHungLin)