1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Chapter 11. Putting Your Stuff in the Kernel</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Unreliable Guide To Hacking The Linux Kernel"><link rel="up" href="index.html" title="Unreliable Guide To Hacking The Linux Kernel"><link rel="prev" href="conventions-ifdef.html" title="#if"><link rel="next" href="cantrips.html" title="Chapter 12. Kernel Cantrips"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 11. Putting Your Stuff in the Kernel</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="conventions-ifdef.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="cantrips.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="submitting"></a>Chapter 11. Putting Your Stuff in the Kernel</h1></div></div></div><p> 2 In order to get your stuff into shape for official inclusion, or 3 even to make a neat patch, there's administrative work to be 4 done: 5 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p> 6 Figure out whose pond you've been pissing in. Look at the top of 7 the source files, inside the <code class="filename">MAINTAINERS</code> 8 file, and last of all in the <code class="filename">CREDITS</code> file. 9 You should coordinate with this person to make sure you're not 10 duplicating effort, or trying something that's already been 11 rejected. 12 </p><p> 13 Make sure you put your name and EMail address at the top of 14 any files you create or mangle significantly. This is the 15 first place people will look when they find a bug, or when 16 <span class="emphasis"><em>they</em></span> want to make a change. 17 </p></li><li class="listitem"><p> 18 Usually you want a configuration option for your kernel hack. 19 Edit <code class="filename">Kconfig</code> in the appropriate directory. 20 The Config language is simple to use by cut and paste, and there's 21 complete documentation in 22 <code class="filename">Documentation/kbuild/kconfig-language.txt</code>. 23 </p><p> 24 In your description of the option, make sure you address both the 25 expert user and the user who knows nothing about your feature. Mention 26 incompatibilities and issues here. <span class="emphasis"><em> Definitely 27 </em></span> end your description with <span class="quote">“<span class="quote"> if in doubt, say N 28 </span>”</span> (or, occasionally, `Y'); this is for people who have no 29 idea what you are talking about. 30 </p></li><li class="listitem"><p> 31 Edit the <code class="filename">Makefile</code>: the CONFIG variables are 32 exported here so you can usually just add a "obj-$(CONFIG_xxx) += 33 xxx.o" line. The syntax is documented in 34 <code class="filename">Documentation/kbuild/makefiles.txt</code>. 35 </p></li><li class="listitem"><p> 36 Put yourself in <code class="filename">CREDITS</code> if you've done 37 something noteworthy, usually beyond a single file (your name 38 should be at the top of the source files anyway). 39 <code class="filename">MAINTAINERS</code> means you want to be consulted 40 when changes are made to a subsystem, and hear about bugs; it 41 implies a more-than-passing commitment to some part of the code. 42 </p></li><li class="listitem"><p> 43 Finally, don't forget to read <code class="filename">Documentation/SubmittingPatches</code> 44 and possibly <code class="filename">Documentation/SubmittingDrivers</code>. 45 </p></li></ul></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="conventions-ifdef.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="cantrips.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">#if </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 12. Kernel Cantrips</td></tr></table></div></body></html> 46