Skip to main content.
Navigation:
DENX
>
Training
>
ContributingCode
Translations:
Edit
|
Attach
|
Raw
|
Ref-By
|
Printable
|
More
Training
Sections of this site:
DENX Home
|
DULG
|
ELDK-5
|
Know
|
Training
|
U-Boot
|
U-Bootdoc
Topics
Training Home
Changes
Index
Search
Go
List of pages in Training
Search
---+ How to successfully contribute code to Free Software Projects These few pages are the base for a short three-part tutorial on how to contribute code to Free Software projects in order for the contributions to become "mainline" with as few delays and frustrations as possible. ---++ Part 1 - Overview * Understand the project (e.g. [[http://www.denx.de/wiki/UBoot/DesignPrinciples][U-Boot design principles]]) * [[ContributionRequirements][Requirements]] ---++ Part 2 - Tools * Source formating * Lindent script bundled with Linux. [[UsingLindentWithEmacs]] * Syntax sensitive editors (e.g. M-x c-set-style in GNU/Emacs) * Whitespace checkers (in git-am and e.g. M-x whitespace-global-mode in GNU/Emacs) * Versioning system * [[http://git.or.cz/][Git]] (Official [[http://www.kernel.org/pub/software/scm/git/docs/tutorial.html][tutorial]] and my own [[GitFlyThrough][Git fly through]]) * Gitk * [[http://procode.org/stgit/][StGit]] * [[http://git.or.cz/gitwiki/Tig][tig]] * Use available checkers * Use -Wall and handle all warnings! * Static analysers (in Linux) * checkstack - Generate a list of stack hogs * namespacecheck - Name space analysis on compiled kernel * headers_check - Sanity check on exported headers * [[http://www.kernel.org/pub/software/devel/sparse/][Sparse]] (in Linux) ---++ Part 3 - Examples and details (inside Linux) * [[CodingStyleIssues][Common problems with CodingStyle]] * [[http://www.denx.de/cgi-bin/gitweb.cgi?p=linux-denx.git;a=blob;f=Documentation/volatile-considered-harmful.txt;hb=f695e369ca929498bbbd837e1a4f322d6f66134d][Volatile considered harmful]] * Programming endianness clean * Abstracting from architectures with IO accessor macros * Use spinlocks, e.g. program for SMP even on UP