<?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>cenolan.com &#187; kernel</title>
	<atom:link href="http://www.cenolan.com/tag/kernel/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cenolan.com</link>
	<description>What you looking at?</description>
	<lastBuildDate>Sun, 14 Jun 2009 20:03:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Building a custom kernel RPM with FUSE support on YDL 6</title>
		<link>http://www.cenolan.com/2008/05/building-custom-kernel-rpm-fuse-ydl-6/</link>
		<comments>http://www.cenolan.com/2008/05/building-custom-kernel-rpm-fuse-ydl-6/#comments</comments>
		<pubDate>Tue, 13 May 2008 13:39:29 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Yellow Dog Linux]]></category>
		<category><![CDATA[fuse]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ydl]]></category>

		<guid isPermaLink="false">http://www.cenolan.com/?p=11</guid>
		<description><![CDATA[This guide explains how to build and install a custom kernel RPM with FUSE support on Yellow Dog Linux 6. The guide is written based on my experience with YDL on an Apple XServe G4 using kernel-2.6.23-9 on ppc architecture. If your system is different then adjust the guide as required.

Follow all the commands as [...]]]></description>
			<content:encoded><![CDATA[<p>This guide explains how to build and install a custom kernel RPM with FUSE support on Yellow Dog Linux 6. The guide is written based on my experience with YDL on an Apple XServe G4 using kernel-2.6.23-9 on ppc architecture. If your system is different then adjust the guide as required.</p>
<p><span id="more-11"></span><br />
Follow all the commands as a normal user, NOT root!</p>
<p><strong>1) Create an rpm build environment</strong></p>
<pre><code>cd ~
mkdir ~/rpmbuild
mkdir ~/rpmbuild/BUILD
mkdir ~/rpmbuild/RPMS
mkdir ~/rpmbuild/SOURCES
mkdir ~/rpmbuild/SPECS
mkdir ~/rpmbuild/SRPMS

echo "%_topdir /home/`whoami`/rpmbuild" &gt; ~/.rpmmacros</code></pre>
<p><strong>2) Download and install the source rpm of the current kernel.</strong></p>
<p>Note: this is not the kernel-source rpm!</p>
<pre><code>wget http://www.mirrorservice.org/sites/ftp.yellowdoglinux.com/pub/yellowdog/releases/yellowdog-6.0/SRPMS/kernel-2.6.23-9.ydl6.1.src.rpm
rpm -ivh kernel-2.6.23-9.ydl6.1.src.rpm</code></pre>
<p><strong>3) Prepare the kernel source tree</strong></p>
<pre><code>cd ~/rpmbuild/SPECS
rpmbuild -bp --target=`uname -m` kernel.spec</code></pre>
<p><strong>4) Configure the kernel</strong></p>
<pre><code>cd ~/rpmbuild/BUILD/kernel-2.6.23/linux-2.6.23.9/
cp configs/kernel-2.6.23-ppc.config .config
make oldconfig
make menuconfig</code></pre>
<p>Using the down arrow key navigate to "File systems" then press Enter and then scroll down to "Filesystem in Userspace support" and press "M" to select it as a module. Press Tab to select Exit in the bottom bar, then do it again, then press Y when prompted to save the configuration.</p>
<p>Copy the config file to ~/rpmbuild/SOURCES/:</p>
<pre><code>cp .config ~/rpmbuild/SOURCES/kernel-2.6.23-ppc.config</code></pre>
<p><strong>5) Prepare the build files</strong></p>
<pre><code>cd ~/rpmbuild/SPECS</code></pre>
<p>Open up the kernel.spec file for editing and ensure the kernel has a unique name by changing the following line (line 32)</p>
<pre><code>%define release %{subrev}.ydl6.%{rpmrev}</code></pre>
<p>to</p>
<pre><code>%define release %{subrev}.ydl6fuse.%{rpmrev}</code></pre>
<p><strong>6) Build the new kernel</strong></p>
<pre><code>rpmbuild -bb --with baseonly --without debuginfo --target=`uname -m` kernel.spec</code></pre>
<p>The build process takes a long time to complete. A lot of messages will be printed to the screen. These messages can be ignored, unless the build ends with an error. If the build completes successfully, the new kernel packages in the ~/rpmbuild/RPMS directory.</p>
<p><strong>7) Install the new kernel</strong></p>
<pre><code>cd ~/rpmbuild/RPMS/ppc
su -c "rpm -ivh kernel-2.6.23-9.ydl6fuse.1.ppc.rpm kernel-headers-2.6.23-9.ydl6fuse.1.ppc.rpm --oldpackage"</code></pre>
<p><strong>8) Make the new kernel boot by default</strong></p>
<p>As root, open up /boot/etc/yaboot.conf for editing. You should now see two kernel images listed as boot options. Change the label of the ydl6fuse image to something friendly like "linuxfuse". Now change the "default" line to the same.</p>
<p>For example:</p>
<pre><code>default=linuxfuse
image=/vmlinux-2.6.23-9.ydl6fuse.1
label=linuxfuse
read-only
initrd=/initrd-2.6.23-9.ydl6fuse.1.img
append="root=LABEL=/"

image=/vmlinux-2.6.23-9.ydl6.1
label=linux
read-only
initrd=/initrd-2.6.23-9.ydl6.1.img
append="root=LABEL=/"</code></pre>
<p>Important: Ensure you also have a line that says "delay=5" (or a greater number) so if your new kernel won't boot you can still access the yaboot menu to boot your old kernel!</p>
<p>Save and exit the file.</p>
<p>Now run "ybin" (again, as root) to commit the changes. Reboot!</p>
<p><strong>9) Load the fuse module</strong></p>
<pre><code>su -
modprobe fuse</code></pre>
<p>To make the fuse module load on boot. Create the file /etc/sysconfig/modules/my.modules and give it the following contents:</p>
<pre><code>#!/bin/sh
modprobe fuse &gt;/dev/null 2&gt;&amp;1</code></pre>
<p>Save and exit. Now make it executable:</p>
<pre><code>chmod +x /etc/sysconfig/modules/my.modules</code></pre>
<p><strong>10) Finished!</strong></p>
<p>Your kernel now supports FUSE. Now you can use any of the various userspace tools to mount the various filesystems supported by FUSE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cenolan.com/2008/05/building-custom-kernel-rpm-fuse-ydl-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
