https://parisc.wiki.kernel.org/index.php?title=Building_the_Kernel&feed=atom&action=historyBuilding the Kernel - Revision history2024-03-28T13:03:42ZRevision history for this page on the wikiMediaWiki 1.19.24https://parisc.wiki.kernel.org/index.php?title=Building_the_Kernel&diff=1388&oldid=prevAlex Ivanov: Add template message2013-09-06T08:49:32Z<p>Add template message</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 08:49, 6 September 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"><div style="padding:0; margin:0 0 0.5em 0; border-style:solid; border-width:medium"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">{| width="100%" align="center" style="text-align:left; "</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">| style="padding-left:5px;" | '''IMPORTANT:''' The content of this page is outdated. Please '''[[User:Alex_Ivanov/Building_the_Kernel|check draft]]''' version instead.</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">|}</div></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If you are only interested in using Linux/PARISC then please see the [http://www.parisc-linux.org/software/index.html software] information web page.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If you are only interested in using Linux/PARISC then please see the [http://www.parisc-linux.org/software/index.html software] information web page.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Alex Ivanovhttps://parisc.wiki.kernel.org/index.php?title=Building_the_Kernel&diff=1385&oldid=prevAlex Ivanov at 08:07, 6 September 20132013-09-06T08:07:03Z<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 08:07, 6 September 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 27:</td>
<td colspan="2" class="diff-lineno">Line 27:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><li>'''Build Kernel Executables'''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><li>'''Build Kernel Executables'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div># <del class="diffchange diffchange-inline">2.6.x</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div># <ins class="diffchange diffchange-inline">current</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>make</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>make</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
</table>Alex Ivanovhttps://parisc.wiki.kernel.org/index.php?title=Building_the_Kernel&diff=1383&oldid=prevAlex Ivanov: /* How To Build a Kernel */ Fix numeration2013-09-06T06:15:31Z<p><span dir="auto"><span class="autocomment">How To Build a Kernel: </span> Fix numeration</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 06:15, 6 September 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 10:</td>
<td colspan="2" class="diff-lineno">Line 10:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>= How To Build a Kernel =</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>= How To Build a Kernel =</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Here are details developers care about in order to '''modify, build, test''' parisc-linux kernels. Note that just because a kernel option can be select, does NOT mean it works. Trial and error is usually the only sure way to find out. Reports of such adventures are always welcome on the parisc-linux [mailto:linux-parisc@vger.kernel.org mailing list].</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Here are details developers care about in order to '''modify, build, test''' parisc-linux kernels. Note that just because a kernel option can be select, does NOT mean it works. Trial and error is usually the only sure way to find out. Reports of such adventures are always welcome on the parisc-linux [mailto:linux-parisc@vger.kernel.org mailing list].</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># </del>'''Install tools'''</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><ol></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><li></ins>'''Install tools'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>apt-get install kernel-package gcc binutils lib6-dev</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>apt-get install kernel-package gcc binutils lib6-dev</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></pre<ins class="diffchange diffchange-inline">></li</ins>></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># </del>'''Obtain kernel source''': Stable kernel sources are available via <tt>apt-get install linux-source-XX</tt> (where XX is something like "2.4.25-32" or "2.6.6-32").</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><li></ins>'''Obtain kernel source''': Stable kernel sources are available via <tt>apt-get install linux-source-XX</tt> (where XX is something like "2.4.25-32" or "2.6.6-32").<ins class="diffchange diffchange-inline"></li></ins></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># </del>'''Configure Kernel Options'''</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><li></ins>'''Configure Kernel Options'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd /usr/src/linux-2.6</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>cd /usr/src/linux-2.6</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 23:</td>
<td colspan="2" class="diff-lineno">Line 24:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># to adjust the .config if kernel defaults don't suit you.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># to adjust the .config if kernel defaults don't suit you.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>make oldconfig</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>make oldconfig</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></pre<ins class="diffchange diffchange-inline">></li</ins>></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># </del>'''Build Kernel Executables'''</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><li></ins>'''Build Kernel Executables'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># 2.6.x</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># 2.6.x</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 34:</td>
<td colspan="2" class="diff-lineno">Line 35:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># must be root user</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># must be root user</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>make modules_install</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>make modules_install</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></pre<ins class="diffchange diffchange-inline">></li</ins>></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># </del>'''Installing the kernel'''</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"><li></ins>'''Installing the kernel'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The resulting kernel image is <tt>/usr/src/linux-2.6/vmlinux</tt>. Normally, x86-linux will save the existing vmlinux and install the new kernel with <tt>make install</tt>. The "dpkg -i" steps above do about the same thing. Here is one way to do it manually:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>The resulting kernel image is <tt>/usr/src/linux-2.6/vmlinux</tt>. Normally, x86-linux will save the existing vmlinux and install the new kernel with <tt>make install</tt>. The "dpkg -i" steps above do about the same thing. Here is one way to do it manually:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 56:</td>
<td colspan="2" class="diff-lineno">Line 57:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>reboot</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>reboot</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>...</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>...</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></pre<ins class="diffchange diffchange-inline">></li></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline"></ol</ins>></div></td></tr>
</table>Alex Ivanovhttps://parisc.wiki.kernel.org/index.php?title=Building_the_Kernel&diff=1382&oldid=prevAlex Ivanov: Strip in twice and replace dead ends2013-09-06T05:59:37Z<p>Strip in twice and replace dead ends</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr valign='top'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 05:59, 6 September 2013</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If you are only interested in using Linux/PARISC then please see the [http://www.parisc-linux.org/software/index.html software] information web page.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>If you are only interested in using Linux/PARISC then please see the [http://www.parisc-linux.org/software/index.html software] information web page.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">Pre-built 2.6 kernels are available on our [http://cvs.parisc-linux.org/download/linux-2.6/ CVS download Server] and via <tt>apt-get install kernel-image-XX</tt> (where XX is something like "2.4.25-32" or "2.6.6-32"). Most users should be pretty happy with kernels they can get from either source.</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>We no longer advise using the [http://www.parisc-linux.org/software/index.html#xcs pre-built cross compiler] to build a parisc kernel on an x86 linux host. Native compiler/linker tools are better maintained. The old mini-howto describes how to [http://www.parisc-linux.org/kernel/nfsroot.html cross-build kernels] for Net Boot. Please only bother with this if you have a very slow parisc machine and very fast x86 machine.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>We no longer advise using the [http://www.parisc-linux.org/software/index.html#xcs pre-built cross compiler] to build a parisc kernel on an x86 linux host. Native compiler/linker tools are better maintained. The old mini-howto describes how to [http://www.parisc-linux.org/kernel/nfsroot.html cross-build kernels] for Net Boot. Please only bother with this if you have a very slow parisc machine and very fast x86 machine.</div></td></tr>
<tr><td colspan="2" class="diff-lineno">Line 8:</td>
<td colspan="2" class="diff-lineno">Line 6:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Internet connection</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* Internet connection</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* hppa-debian host properly configured so apt-get and ftp work</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>* hppa-debian host properly configured so apt-get and ftp work</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>* <del class="diffchange diffchange-inline">[</del>http://<del class="diffchange diffchange-inline">cvs</del>.<del class="diffchange diffchange-inline">parisc</del>-<del class="diffchange diffchange-inline">linux</del>.org/ parisc-linux <del class="diffchange diffchange-inline">source]</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>* http://<ins class="diffchange diffchange-inline">ftp</ins>.<ins class="diffchange diffchange-inline">debian</ins>-<ins class="diffchange diffchange-inline">ports</ins>.org/<ins class="diffchange diffchange-inline">debian and http://ftp.</ins>parisc-linux<ins class="diffchange diffchange-inline">.org/debian-ports/debian apt sources</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>= <del class="diffchange diffchange-inline">Short Recipe to Build a Kernel =</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>= <ins class="diffchange diffchange-inline">How </ins>To Build a Kernel =</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">The short recipe is for when existing kernels from [http://cvs.parisc-linux.org/download/linux-2.6/ CVS download Server] or debian package pool don't have needed config "defaults" or need a different selection of kernel modules. If you want to do more than that, read "The Old, Grotty Way" as well (below).</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>Here are details developers care about in order to '''modify, build, test''' parisc-linux kernels. Note that just because a kernel option can be select, does NOT mean it works. Trial and error is usually the only sure way to find out. Reports of such adventures are always welcome on the parisc-linux [mailto:linux-parisc@vger.kernel.org mailing list].</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"><pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># get necessary tools</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">apt-get install kernel-package gcc binutils libc6-dev</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">cd /usr/src</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># if CVS doesn't work, See "Getting Source" below.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">cvs -d :pserver:anonymous@cvs.parisc-linux.org:/var/cvs login</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">cvs -d :pserver:anonymous@cvs.parisc-linux.org:/var/cvs co linux-2.4</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">cd linux-2.4</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># adjust a new .config file</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">make menuconfig</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># or do it by hand:</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># vi .config</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># make oldconfig</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">make-kpkg kernel_image</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">cd ..</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">dpkg -i kernel-image*.deb</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">sync</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">reboot</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"></pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">= The Old, Grotty Way </del>To Build a Kernel =</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>Here are <del class="diffchange diffchange-inline">all the ugly </del>details developers care about in order to '''modify, build, test''' parisc-linux kernels. Note that just because a kernel option can be select, does NOT mean it works. Trial and error is usually the only sure way to find out. Reports of such adventures are always welcome on the parisc-linux [mailto:linux-parisc@vger.kernel.org mailing list].</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># '''Install tools'''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># '''Install tools'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>apt-get install kernel-package gcc binutils lib6-dev</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>apt-get install kernel-package gcc binutils lib6-dev</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div># '''<del class="diffchange diffchange-inline">Fetch </del>kernel source''': <del class="diffchange diffchange-inline">The 2.6.x </del>kernel <del class="diffchange diffchange-inline">source tree is </del>available via <del class="diffchange diffchange-inline">[http://cvs.parisc-linux.org/ CVS] and [http://cvs.parisc-linux.org/download/linux-2.6/ snapshots]. It is better to get a snapshot first and then update using CVS.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div># '''<ins class="diffchange diffchange-inline">Obtain </ins>kernel source''': <ins class="diffchange diffchange-inline">Stable </ins>kernel <ins class="diffchange diffchange-inline">sources are </ins>available via <<ins class="diffchange diffchange-inline">tt</ins>><ins class="diffchange diffchange-inline">apt</ins>-<ins class="diffchange diffchange-inline">get install </ins>linux-<ins class="diffchange diffchange-inline">source</ins>-<ins class="diffchange diffchange-inline">XX<</ins>/<ins class="diffchange diffchange-inline">tt> (where XX is something like "</ins>2.<ins class="diffchange diffchange-inline">4</ins>.<ins class="diffchange diffchange-inline">25</ins>-<ins class="diffchange diffchange-inline">32" or "</ins>2.6.6-<ins class="diffchange diffchange-inline">32")</ins>.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><<del class="diffchange diffchange-inline">pre</del>></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">cd /usr/src</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># See http://cvs.parisc</del>-<del class="diffchange diffchange-inline">linux.org/download/</del>linux-<del class="diffchange diffchange-inline">2.6/</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">wget http://cvs.parisc</del>-<del class="diffchange diffchange-inline">linux.org</del>/<del class="diffchange diffchange-inline">download/linux-</del>2.<del class="diffchange diffchange-inline">6/linux-2</del>.<del class="diffchange diffchange-inline">6.6-pa2.tar.bz2</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"># verify ~350MB free</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">df -h .</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">tar xjf linux</del>-2.6.6-<del class="diffchange diffchange-inline">pa2</del>.<del class="diffchange diffchange-inline">tar.bz2</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"></pre></del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># '''Configure Kernel Options'''</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div># '''Configure Kernel Options'''</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div><pre></div></td></tr>
</table>Alex Ivanovhttps://parisc.wiki.kernel.org/index.php?title=Building_the_Kernel&diff=1380&oldid=prevAlex Ivanov: Import with no edits from parisc-linux.org website.2013-09-06T05:23:01Z<p>Import with no edits from parisc-linux.org website.</p>
<p><b>New page</b></p><div>If you are only interested in using Linux/PARISC then please see the [http://www.parisc-linux.org/software/index.html software] information web page.<br />
<br />
Pre-built 2.6 kernels are available on our [http://cvs.parisc-linux.org/download/linux-2.6/ CVS download Server] and via <tt>apt-get install kernel-image-XX</tt> (where XX is something like "2.4.25-32" or "2.6.6-32"). Most users should be pretty happy with kernels they can get from either source.<br />
<br />
We no longer advise using the [http://www.parisc-linux.org/software/index.html#xcs pre-built cross compiler] to build a parisc kernel on an x86 linux host. Native compiler/linker tools are better maintained. The old mini-howto describes how to [http://www.parisc-linux.org/kernel/nfsroot.html cross-build kernels] for Net Boot. Please only bother with this if you have a very slow parisc machine and very fast x86 machine.<br />
<br />
= Prerequisites For Building Kernels =<br />
* Internet connection<br />
* hppa-debian host properly configured so apt-get and ftp work<br />
* [http://cvs.parisc-linux.org/ parisc-linux source]<br />
<br />
= Short Recipe to Build a Kernel =<br />
The short recipe is for when existing kernels from [http://cvs.parisc-linux.org/download/linux-2.6/ CVS download Server] or debian package pool don't have needed config "defaults" or need a different selection of kernel modules. If you want to do more than that, read "The Old, Grotty Way" as well (below).<br />
<pre><br />
# get necessary tools<br />
apt-get install kernel-package gcc binutils libc6-dev<br />
cd /usr/src<br />
# if CVS doesn't work, See "Getting Source" below.<br />
cvs -d :pserver:anonymous@cvs.parisc-linux.org:/var/cvs login<br />
cvs -d :pserver:anonymous@cvs.parisc-linux.org:/var/cvs co linux-2.4<br />
cd linux-2.4<br />
# adjust a new .config file<br />
make menuconfig<br />
# or do it by hand:<br />
# vi .config<br />
# make oldconfig<br />
make-kpkg kernel_image<br />
cd ..<br />
dpkg -i kernel-image*.deb<br />
sync<br />
reboot<br />
</pre><br />
= The Old, Grotty Way To Build a Kernel =<br />
Here are all the ugly details developers care about in order to '''modify, build, test''' parisc-linux kernels. Note that just because a kernel option can be select, does NOT mean it works. Trial and error is usually the only sure way to find out. Reports of such adventures are always welcome on the parisc-linux [mailto:linux-parisc@vger.kernel.org mailing list].<br />
# '''Install tools'''<br />
<pre><br />
apt-get install kernel-package gcc binutils lib6-dev<br />
</pre><br />
# '''Fetch kernel source''': The 2.6.x kernel source tree is available via [http://cvs.parisc-linux.org/ CVS] and [http://cvs.parisc-linux.org/download/linux-2.6/ snapshots]. It is better to get a snapshot first and then update using CVS.<br />
<pre><br />
cd /usr/src<br />
# See http://cvs.parisc-linux.org/download/linux-2.6/<br />
wget http://cvs.parisc-linux.org/download/linux-2.6/linux-2.6.6-pa2.tar.bz2<br />
# verify ~350MB free<br />
df -h .<br />
tar xjf linux-2.6.6-pa2.tar.bz2<br />
</pre><br />
# '''Configure Kernel Options'''<br />
<pre><br />
cd /usr/src/linux-2.6<br />
# clone the nearest _config to start with<br />
cp arch/parisc/configs/b180_config .config<br />
# You can also "make config" or "make menuconfig" here<br />
# to adjust the .config if kernel defaults don't suit you.<br />
make oldconfig<br />
</pre><br />
# '''Build Kernel Executables'''<br />
<pre><br />
# 2.6.x<br />
make<br />
<br />
# 2.4.x needs several steps instead:<br />
# make -j2 dep && make vmlinux && make modules<br />
<br />
# must be root user<br />
make modules_install<br />
</pre><br />
# '''Installing the kernel'''<br />
The resulting kernel image is <tt>/usr/src/linux-2.6/vmlinux</tt>. Normally, x86-linux will save the existing vmlinux and install the new kernel with <tt>make install</tt>. The "dpkg -i" steps above do about the same thing. Here is one way to do it manually:<br />
<pre><br />
cd /boot<br />
mv vmlinux vmlinux.old<br />
mv System.map System.map.old<br />
cd /usr/src/linux-2.6<br />
cp System.map vmlinux /boot/<br />
sync<br />
reboot<br />
</pre><br />
''NOTE: One does not need to run palo when replacing an existing kernel.''<br />
<br />
Another way is to rename <tt>vmlinux</tt> with revision info, reboot, interrupt autoboot and specify interactive boot, specify the new kernel via palo, and finally once the new kernel is booted, modify <tt>/etc/palo.conf</tt> to match (and run <tt>palo</tt> again). Start with something like:<br />
<pre><br />
cp vmlinux /boot/vmlinux-2.6.6-pa1<br />
cp System.map /boot/System.map-2.6.6-pa1<br />
cp .config /boot/config-2.6.6-pa1<br />
sync<br />
reboot<br />
...<br />
</pre></div>Alex Ivanov