<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Million Monkeys &#187; compile</title>
	<atom:link href="http://www.monkeedev.co.uk/blog/tag/compile/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.monkeedev.co.uk/blog</link>
	<description>Surviving life as a sysadmin.</description>
	<lastBuildDate>Mon, 16 May 2011 09:49:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Kernel compiling, the debian way</title>
		<link>http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/</link>
		<comments>http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 20:37:20 +0000</pubDate>
		<dc:creator>Kris</dc:creator>
				<category><![CDATA[Tech]]></category>
		<category><![CDATA[compile]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/</guid>
		<description><![CDATA[There are plenty of guides for doing this, but here&#8217;s my way, which I&#8217;ve done on loads of different hardware. Personally, I prefer to use the stock debian kernel because it supports most hardware and makes upgrading through apt easier. Occasionally though, I like to test the newest kernel releases, and here&#8217;s how I do [...]]]></description>
			<content:encoded><![CDATA[<p>There are plenty of guides for doing this, but here&#8217;s my way, which I&#8217;ve done on loads of different hardware.</p>
<p>Personally, I prefer to use the stock debian kernel because it supports most hardware and makes upgrading through apt easier. Occasionally though, I like to test the newest kernel releases, and here&#8217;s how I do it.</p>
<p>1, Install necessary tools:</p>
<blockquote><p># apt-get install kernel-package ncurses-dev bzip2 module-init-tools initrd-tools procps fakeroot</p></blockquote>
<p>2, Download the latest kernel source:</p>
<blockquote><p># cd /usr/src<br />
# wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.1.tar.bz2<br />
# tar -xjvf linux-2.6.22.1.tar.bz2<br />
# cd linux-2.6.22.1</p></blockquote>
<p>3, Unzip any extra patches and apply them:</p>
<blockquote><p># bzip2 -dc patch-xxx.bz2 | patch -p1</p></blockquote>
<p>5, Configure the kernel.</p>
<p>a, Using the current config as a base:</p>
<blockquote><p># cp /boot/config-x.x.x /usr/src/linux-2.6.22.1/.config<br />
# make oldconfig<br />
[ answer all the questions]</p></blockquote>
<p>b, Using the menu interface (you can do the cp line above to use the old config as a base but make changes):</p>
<blockquote><p># make menuconfig</p></blockquote>
<p>If you have multiple processors/cores, you can speed up the compile by utilising them all (this is similar to the -j flag when compiling the non debian way). To find out the number of cores you have, run:</p>
<blockquote><p># grep -c &#8216;^processor&#8217; /proc/cpuinfo</p></blockquote>
<p>Then to make sure all cores are used:</p>
<blockquote><p># export CONCURRENCY_LEVEL=4<br />
replace 4 with the number of processors.</p></blockquote>
<p>6, Compile and install:</p>
<blockquote><p># make-kpkg clean<br />
# time fakeroot make-kpkg &#8211;initrd &#8211;revision=1 &#8211;append-to-version=.kris kernel-image</p></blockquote>
<p>This will usually take between 5 minutes and over an hour, depending on how many modules there are to compile, and how fast your hardware is.</p>
<p>Once this has finished, you will be left with a .deb file which you can install using dpkg:</p>
<blockquote><p># dpkg -i linux-image*.deb</p></blockquote>
<p>Because of the &#8211;initrd flag earlier, the initrd image will be created when you install the kernel. This command will also update grub, so all you need to do to use your new kernel is reboot.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F&amp;title=Kernel+compiling%2C+the+debian+way" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F&amp;title=Kernel+compiling%2C+the+debian+way" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F&amp;title=Kernel+compiling%2C+the+debian+way" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F&amp;title=Kernel+compiling%2C+the+debian+way" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F&amp;title=Kernel+compiling%2C+the+debian+way" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Kernel+compiling%2C+the+debian+way+@+http%3A%2F%2Fwww.monkeedev.co.uk%2Fblog%2F2007%2F07%2F11%2Fkernel-compiling-the-debian-way%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.monkeedev.co.uk/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.monkeedev.co.uk/blog/2007/07/11/kernel-compiling-the-debian-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

