I’ve already written a post about submitting kernel patches to mainline based on a 2011 presentation by Greg Kroah-Hartman, but Matt Porter, Broadcom Landing Team (LT) Technical Lead at Linaro, has given two updated talks entitled “Upstreaming 101” and “Upstreaming 201” at Linaro Connect Asia 2014. There are many planned talked during LCA 2014, and you can get the list as well as links to presentation and videos, as they become available on LCA 14 resources page.
The first session “Upstream 101” starts with some definitions such as “upstreaming” (basically getting your code to kernel.org), “mainline”, etc, explains how to get information about the (912) maintainers (tip: it’s in the MAINTAINERS file), how to deal with the 2-week merge windows occurring every 10 weeks or so, but the bulk of the talk detailing the work flow required to upstream code to the Linux kernel.
There are basically 5 steps:
- Preparation – Read the kernel documentation, check what others are going.
- Creation – Follow the docs, ask questions, run checkpatch.pl, etc…
- Posting – Post to code the the relevant mailing list via git
- Feedback – You’ll most probably get feedback, asking for clarification or changes to your patch. Answer promptly.
- Maintenance – Once you patch is accepted you’ll have to responsibility to maintain the code.
You can download the presentation slides.
The next session “Upstream 201” is described as “advanced course on kernel upstreaming fundamentals”, but Matt Porter spends time showing example how commit messages, mailing discussion DO and DON’T, as well as example upstreaming a new SoC (AllWinner A1X), and a new driver (Watchdog for bcm281xxx).
The presentation slide are also available for download.