<?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"
	>

<channel>
	<title>Munckfish.net</title>
	<atom:link href="http://www.munckfish.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://munckfish.net/blog</link>
	<description>Dan Munckton's slice of the internet pie.</description>
	<pubDate>Mon, 22 Mar 2010 18:17:08 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Silence stdout for an entire shell script</title>
		<link>http://munckfish.net/blog/archive/2010/03/22/silence-stdout-for-an-entire-shell-script/</link>
		<comments>http://munckfish.net/blog/archive/2010/03/22/silence-stdout-for-an-entire-shell-script/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 18:17:08 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/?p=95</guid>
		<description><![CDATA[To silence stdout in a Linux shell script use the following line:
exec 1&#62;/dev/null
This redirects the file stream to the /dev/null device which silently swallows the output.
This is useful if for instance you are writing a cron job which you want to have log it&#8217;s steps while you are developing or debugging it, but don&#8217;t want [...]]]></description>
			<content:encoded><![CDATA[<p>To silence stdout in a Linux shell script use the following line:</p>
<p>exec 1&gt;/dev/null</p>
<p>This redirects the file stream to the /dev/null device which silently swallows the output.</p>
<p>This is useful if for instance you are writing a cron job which you want to have log it&#8217;s steps while you are developing or debugging it, but don&#8217;t want any output except the stderr once it&#8217;s running.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2010/03/22/silence-stdout-for-an-entire-shell-script/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Display list of all predefined macros in GCC</title>
		<link>http://munckfish.net/blog/archive/2010/01/22/display-list-of-all-predefined-macros-in-gcc/</link>
		<comments>http://munckfish.net/blog/archive/2010/01/22/display-list-of-all-predefined-macros-in-gcc/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 17:17:04 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[C/C++]]></category>

		<category><![CDATA[c]]></category>

		<category><![CDATA[gcc]]></category>

		<category><![CDATA[preprocessor]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/?p=92</guid>
		<description><![CDATA[Something I always forget and have to look up.
1) Print predefined macros:
gcc -dM -E - &#60;/dev/null &#124; sort &#124; less
2) Print predefined macros and macros introduced by a specific header
echo &#8220;#include &#60;stdlib.h&#62;&#8221; &#62; foo.h
gcc -dM -E foo.h &#124; sort &#124; less
Reference for -dM is in the cpp man page.
]]></description>
			<content:encoded><![CDATA[<p>Something I always forget and have to look up.</p>
<p>1) Print predefined macros:</p>
<p>gcc -dM -E - &lt;/dev/null | sort | less</p>
<p>2) Print predefined macros and macros introduced by a specific header</p>
<p>echo &#8220;#include &lt;stdlib.h&gt;&#8221; &gt; foo.h</p>
<p>gcc -dM -E foo.h | sort | less</p>
<p>Reference for -dM is in the cpp man page.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2010/01/22/display-list-of-all-predefined-macros-in-gcc/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Maintaining the Ubuntu PS3 Kernel: Upstream Syncing</title>
		<link>http://munckfish.net/blog/archive/2008/08/30/ubuntu-ps3-kernel-upstream-syncing/</link>
		<comments>http://munckfish.net/blog/archive/2008/08/30/ubuntu-ps3-kernel-upstream-syncing/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 18:33:10 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[HOWTO]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[PS3]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/?p=91</guid>
		<description><![CDATA[Following on from my previous posts I&#8217;ll now make some notes on how to synchronise with the upstream kernel Git HEAD.
The KernelTeam&#8217;s KernelMaintenance page does mention a little about this but provides no examples or detail. I found out what was necessary by sending questions to the kernel team mailing list.
In my repository the &#8220;origin&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my previous posts I&#8217;ll now make some notes on how to synchronise with the upstream kernel Git HEAD.</p>
<p>The KernelTeam&#8217;s <a href="https://wiki.ubuntu.com/KernelMaintenance">KernelMaintenance page</a> does <a href="https://wiki.ubuntu.com/KernelMaintenance#Upstream%20syncing">mention a little about this</a> but provides no examples or detail. I found out what was necessary by <a href="https://lists.ubuntu.com/archives/kernel-team/2008-June/thread.html#2599">sending questions to the kernel team mailing list</a>.</p>
<p>In my repository the &#8220;origin&#8221; repository is an Ubuntu one (<a href="http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid-ports.git;a=summary">ubuntu-intrepid-ports</a>) as this is where I cloned from. But originally this will have been based on a repository from <a href="http://git.kernel.org/">git.kernel.org</a>. So for convenience, we can add a git &#8220;remote&#8221; definition for our target upstream kernel.org repository so that we can refer to it by a simple name. In this case I&#8217;ll just use the name of the upstream tree, linux-2.6.25.y. <a href="http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.25.y.git;a=summary">linux-2.6.25.y</a> is the stable tree for maintenance releases of the 2.6.25 kernel which the ubuntu-intrepid-ports kernel is currently based on.</p>
<pre>git remote add linux-2.6.25.y git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.25.y.git</pre>
<p>Now we need to fetch all the new upstream changes into our repository. This doesn&#8217;t make any changes to our current branch it just downloads upstream revisions into a remote-tracking branch in the background. You can view remote-tracking branches by running git branch -r, you should see linux-2.6.25.y/master listed.</p>
<pre>git fetch linux-2.6.25.y</pre>
<p>Next we can see what new revisions are available upstream by listing logs from our HEAD through to the HEAD of the upstream remote-tracking branch.</p>
<pre>git log HEAD..linux-2.6.25.y/master</pre>
<p>We can also see which of our local changes will be rebased by asking git log to show us commits which are in the HEAD but not in the remote. For ubuntu-intrepid-ports this will be all commits which add to or modify the packaging scripts in the &#8220;debian/&#8221; directory, and any other special patches which have been applied. Most of the commit logs for these revisions should start with &#8220;UBUNTU:&#8221;.</p>
<pre>git log linux-2.6.25.y/master..HEAD</pre>
<p>Now we&#8217;re ready to actually rebase. Run the following command. You should see lots of output from git as it saves away local changes, resets back to the last commit pulled from the remote, pulls in all the new revisions from the remote, then replays all our commits on top.</p>
<pre>git rebase linux-2.6.25.y/master</pre>
<p>That&#8217;s it. We&#8217;ve resynced with upstream. Now we&#8217;re ready to build and test.</p>
<p>If you&#8217;re happy the tree is in a good state the next job is to make your updates public. If you have been allocated a git tree on kernel.ubuntu.com you can push the changes there. Otherwise you&#8217;ll need to investigate other ways of hosting a remote git repository.</p>
<p>Add a &#8220;remote&#8221; definition for your public repo. In this example I&#8217;m accessing the remote repo using SSH as the transport.</p>
<pre>git remote add mypublic myusername@myhost:/path/to/git/repos/dmunckton/ubuntu-intrepid-ports.git</pre>
<p>You have to force-push the changes to your remote public tree because where we&#8217;ve rebased our history has completely changed. Any history already in your public tree will completely different. The -f option to git push forces it to make the remote repository reflect your local changes. If you don&#8217;t do this the push will fail.</p>
<pre>git push -f mypublic master</pre>
<p>Be careful to warn anyone following your public tree as this type of push will prevent easy tracking using git pull. They will need to follow the instructions in the <a href="https://wiki.ubuntu.com/KernelGitGuide">KernelGitGuide</a> wiki page to track your changes.</p>
<p>As usual if you find any innaccuracies or mistakes please do leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2008/08/30/ubuntu-ps3-kernel-upstream-syncing/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Maintaining the Ubuntu PS3 Kernel: Cross Compiling</title>
		<link>http://munckfish.net/blog/archive/2008/08/16/ubuntu-ps3-kernel-building/</link>
		<comments>http://munckfish.net/blog/archive/2008/08/16/ubuntu-ps3-kernel-building/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 12:41:54 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[HOWTO]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[PS3]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/?p=90</guid>
		<description><![CDATA[The easiest way to build the kernel for PS3 is to do so on the PS3 itself. However even with great tools like ccache to speed up repeated builds it can take a long time on PS3 most probably because of its relative small amount of RAM (256MB). So I made a point of working [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest way to build the kernel for PS3 is to do so on the PS3 itself. However even with great tools like ccache to speed up repeated builds it can take a long time on PS3 most probably because of its relative small amount of RAM (256MB). So I made a point of working out a way to cross build the Ubuntu packaged version of the kernel on my x86 machine. Here are my notes on how to do that.</p>
<p><strong>Prerequisites</strong></p>
<p>I&#8217;m going to presume the reader already has a git checkout of the ubuntu ports source tree and knows how to build the Ubuntu kernel packages on the target architecture. Notes on this can be found in the <a href="https://wiki.ubuntu.com/KernelMaintenance#Performing%20builds">&#8220;Performing Builds&#8221; section of the KernelMaintenance</a> wiki page.</p>
<p>I recommend the reader either runs Hardy or Intrepid on their x86 system so that toolchain packages from the PS3 Dev Team PPA will install easily.</p>
<p><strong>The Problem</strong></p>
<p>Cross compiling the Linux Kernel directly is well supported. You need only set 2 environment variables so the build scripts know the target architecture and where to find the cross build tool chain. E.g. if you&#8217;re targeting PowerPC and your build toolchain (binutils, gcc etc) binaries are named as powerpc-linux-gnu-gcc, powerpc-linux-gnu-ld etc then you&#8217;d run something like this to build the kernel:</p>
<pre>make ARCH=powerpc CROSS_COMPILE=powerpc-linux-gnu-</pre>
<p>But what I wanted was a valid installable Ubuntu package at the end. Usually to avoid any chance of missing build platform related build errors Ubuntu/Debian packages are always built on the target architecture. However there&#8217;s quite a bit of work happening in Debian to help support cross building for low resource embedded platforms (e.g. mobile, set top boxes etc) so with a little hunting I was able to find out a very simple way of achieving my goal.</p>
<p><strong>The Toolchain</strong></p>
<p>First problem is we need to get a toolchain built for x86 but compiled to build for our target architecture which is powerpc64 with specific knowledge of the Cell CPU.</p>
<p>Luckily, the old Cell-SDK had already been packaged for Ubuntu by Matthias Klose, and is built for both powerpc and x86 architectures. However there was a bug which prevented kernel compilation. So I updated these packages to the latest from the Cell-SDK site. To get my updated packages add the <a href="https://launchpad.net/~ubuntu-ps3-dev/+archive">PS3 Dev Team&#8217;s PPA</a> to your APT sources list (basic instructions on that last page, make sure you choose &#8216;hardy&#8217; or &#8216;intrepid&#8217; ) and run:</p>
<pre>sudo apt-get install ppu-gcc</pre>
<p>Now your cross toolchain should be available as ppu-gcc and ppu-ld etc.</p>
<p>While the toolchain patches for the Cell were being developed they were created against GCC 4.1 and Binutils 2.17 and sources and binaries were (and still are) hosted at <a href="http://www.bsc.es/plantillaH.php?cat_id=461">Barcelona Supercomputing Centre</a> and known as the Cell-SDK. These patches have now been absorbed into the current versions of GCC and Binutils (GCC 4.3 and Binutils 2.18 I believe) so in theory it&#8217;s no longer necessary to use the Cell-SDK.</p>
<p>Intrepid&#8217;s toolchain is based on these newer versions and despite there being notes on a way to create Debian packaged cross toolchains using them I wasn&#8217;t able to get them both to compile. See debian/README.cross in the binutils and gcc package sources for more info. I&#8217;m sure the problem can be easily resolved but for now the Cell-SDK has got me up and running quickly.</p>
<p><strong>Setting The Target Architecture For The Package Scripts</strong></p>
<p>Now we have a toolchain the next problem was how to force the Ubuntu packaging scripts to use it. After much scanning of source code this turned out to be very simple indeed. There are whole a series of environment variables which need to be set. Luckily the utility dpkg-architecture makes it very simple to set these. You just need to pass it your desired architecture and evaluate it&#8217;s output in your shell, thus:</p>
<pre>eval $(dpkg-architecture -apowerpc -s)</pre>
<p>I&#8217;ll leave it to the reader to look at the man page for dpkg-architecture to understand more about this utility and the variables which get set.</p>
<p><strong>Putting It All Together</strong></p>
<p>So putting all these things together, this is roughly the script I use to cross build the kernel.</p>
<pre>#!/bin/sh

# Decide where we're going to log to this time
LOG=$(pwd)/../$(basename $(pwd))-$(date +%F-%H%M).log

# Make sure ccache is used for HOST_CC
export PATH=/usr/lib/ccache:$PATH

# Setup the deb arch variables for cross building to target powerpc
eval $(dpkg-architecture -apowerpc -s)

# Run the build
CROSS_COMPILE="ccache ppu-" fakeroot debian/rules binary-powerpc64-smp 2&gt;&amp;1 | tee "$LOG"

# Let you know it's finished
aplay /usr/share/sounds/phone.wav</pre>
<p>This script should be run from the top of the Ubuntu kernel source. It logs all the build output to a file in the directory above but also outputs everything to the shell.</p>
<p>Note CROSS_COMPILE is set before running the build command. Although this variable is not touched directly by debian/rules it is propogated to the kernel build scripts.</p>
<p><a href="http://ccache.samba.org/">ccache</a> can be used for cross building. For me it halved the build time to 25 mins on second run so it&#8217;s well worth using it. Caching for the host architecture is supported on Ubuntu by pre-pending the /usr/lib/ccache directory to $PATH. I&#8217;ll leave it to the reader to find out how this works. In order to support caching for the foreign architecture we can simply modify the CROSS_COMPILE variable to prepend a call to ccache.</p>
<p>I also like to use the screen utility so I can walk away/logout etc and return later. See my <a href="http://munckfish.net/blog/archive/2006/07/18/howto-screen-command-quickstart/">previous post</a> on how to use that. Finally the script runs a WAV file so I know when it&#8217;s finished.</p>
<p><strong>UPDATES</strong>:</p>
<p>30 Aug 08: Updated notes on using ccache for cross compilation. Updated the build script to use ccache for the target architecture.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2008/08/16/ubuntu-ps3-kernel-building/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Maintaining the Ubuntu PS3 Kernel: Getting Started</title>
		<link>http://munckfish.net/blog/archive/2008/08/16/maintaining-the-ubuntu-ps3-kernel-getting-started/</link>
		<comments>http://munckfish.net/blog/archive/2008/08/16/maintaining-the-ubuntu-ps3-kernel-getting-started/#comments</comments>
		<pubDate>Sat, 16 Aug 2008 10:37:14 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[HOWTO]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[PS3]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/?p=89</guid>
		<description><![CDATA[I want to make a series of posts to record some of the things I&#8217;ve found out about maintaining the Ports Kernel for PS3 so far. I&#8217;m still to complete the full cycle to getting an updated kernel build into the repos but I&#8217;d like to note what I&#8217;ve found out so far. As I [...]]]></description>
			<content:encoded><![CDATA[<p>I want to make a series of posts to record some of the things I&#8217;ve found out about maintaining the Ports Kernel for PS3 so far. I&#8217;m still to complete the full cycle to getting an updated kernel build into the repos but I&#8217;d like to note what I&#8217;ve found out so far. As I know more I&#8217;ll endeavor to update these notes so they remain fairly accurate.</p>
<p><strong>Background</strong></p>
<p>The kernel used for PS3 in Ubuntu is the generic powerpc64-smp flavour. Unfortunately the PowerPC architecture is no longer an officially supported architecture in Ubuntu and therefore it falls to the community to keep it alive. The kernel source for this and the other unsupported architectures have been moved out into a separate git source tree to reduce the complexity and fragility of kernel maintenance. E.g. a bad change in the ports tree won&#8217;t break the build for the supported flavours. For the upcoming Intrepid release this is the <a href="http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid-ports.git;a=summary">ubuntu-intrepid-ports</a> tree.</p>
<p>The important thing to note here is the PS3 kernel source is still shared with other architectures such as HPPA, ia64, SPARC etc, as well as for the standard PowerPC platform so any changes we make for PS3 <strong>must not</strong> break the kernel for any of these platforms. To verify this I will need to find interested parties who have relevant equipment to test on as I will not have access to any of these platforms myself. More on this in later posts.</p>
<p><strong>Stuff To Do</strong></p>
<p>First thing to do is read the <a href="https://wiki.ubuntu.com/KernelTeam/KnowledgeBase">KernelTeam/KnowledgeBase</a> articles on the Ubuntu Wiki. In particular the <a href="https://wiki.ubuntu.com/KernelGitGuide">KernelGitGuide</a> and the <a href="https://wiki.ubuntu.com/KernelMaintenance">KernelMaintenance</a> pages.</p>
<p>Presuming you&#8217;re already subscribed to and known on the <a href="http://lists.ubuntu.com/mailman/listinfo/ubuntu-cell">ubuntu-cell</a> list, next subscribe to the <a href="http://lists.ubuntu.com/mailman/listinfo/kernel-team">Ubuntu Kernel Team mailing list</a> and introduce yourself and your intentions. You will also need to <a href="http://lkml.org/">monitor</a> or subscribe to the actual <a href="http://www.tux.org/lkml/">kernel mailing list</a>, and also specifically to the <a href="https://ozlabs.org/mailman/listinfo/cbe-oss-dev">PS3/Cell Kernel development list</a>.</p>
<p>Geoff Levand is (one of the folks) employed by Sony to work on the Linux Kernel for Cell and PS3. He keeps releases of the PS3 &#8220;Distro Kit&#8221; and lots of interesting documentation in his directory on kernel.org: <a href="http://www.kernel.org/pub/linux/kernel/people/geoff/cell/">http://www.kernel.org/pub/linux/kernel/people/geoff/cell/</a>. You&#8217;ll need to be familiar with what&#8217;s there and hoover up the information provided.</p>
<p>Having done all this you should now have</p>
<ul>
<li>A local clone of the ubuntu-&lt;codename&gt;-ports tree (replace &lt;codename&gt; with &#8216;intrepid&#8217; or whichever is the current codename as you read this) to work in.</li>
<li>A good (but theoretical) idea of the maintenance process to follow.</li>
<li>And you should know where &#8216;upstream&#8217; is and where relevant development discussion is happening.</li>
</ul>
<p><strong>Getting More Official</strong></p>
<p>The way development is structured is each of the Ubuntu Kernel Devs have their own Git source trees on <a href="http://kernel.ubuntu.com/git">http://kernel.ubuntu.com/git</a>. They work locally then push there changes to their tree hosted there. Changes from their hosted tree can then be pulled into the intended mainline source trees as necessary, e.g. I may push my changes to <a href="http://kernel.ubuntu.com/git?p=dmunckton/ubuntu-intrepid-ports.git;a=summary">dmunckton/ubuntu-intrepid-ports</a> and when ready the changes will be moved to <a href="http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-intrepid-ports.git;a=summary">ubuntu/ubuntu-intrepid-ports</a>. In theory this is how it works, still to get my changes approved and moved across.</p>
<p>Ben Collins is the guardian of kernel.ubuntu.com (a.k.a. zinc). To get your own tree there you need to convince him you&#8217;re serious and he can then get you a login setup. Expect this to take a while - until I had a login I made my own local builds and uploaded them <a href="http://ubuntu.munckfish.net/linux-ports/">to my website</a> for review.</p>
<p>Once you have a login follow the instructions under the section titled &#8220;Developers with access to kernel.ubuntu.com&#8221; on the <a href="https://wiki.ubuntu.com/KernelGitGuide">KernelGitGuide</a> page to get your hosted tree setup.</p>
<p><strong>What Next?</strong></p>
<p>In the next few posts I will hopefully deal with building, cross-compiling, rebasing against new official upstream kernel releases, looking for PS3 specific fixes, testing, and (fingers crossed) hopefully record the process of getting an updated build into the repos.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2008/08/16/maintaining-the-ubuntu-ps3-kernel-getting-started/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Working on the Ubuntu PS3 Port</title>
		<link>http://munckfish.net/blog/archive/2008/05/17/working-on-the-ubuntu-ps3-port/</link>
		<comments>http://munckfish.net/blog/archive/2008/05/17/working-on-the-ubuntu-ps3-port/#comments</comments>
		<pubDate>Sat, 17 May 2008 14:15:44 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[PS3]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/?p=87</guid>
		<description><![CDATA[I am relatively new to the Ubuntu PS3 Port team. I joined about a month before Hardy was released when I was told by Gouki that there really wasn&#8217;t any development happening on it because it was a community maintained port just like the PowerPC port now is too. I just felt I had to [...]]]></description>
			<content:encoded><![CDATA[<p>I am relatively new to the Ubuntu PS3 Port team. I joined about a month before Hardy was released when I was told by <a href="https://launchpad.net/~gouki">Gouki</a> that there really wasn&#8217;t any development happening on it because it was a community maintained port just like the PowerPC port now is too. I just felt I had to do something - <a href="http://munckfish.net/blog/archive/2008/02/15/linux-on-playstation-3/">Ubuntu on the PlayStation3 is just too compelling for me</a> to sit back and watch it bit-rot!</p>
<p>One of the first things that needed doing was to <a href="https://bugs.launchpad.net/ubuntu-ps3-port/+bug/146230">update the bootloader</a> (otheros.bld) as the old Gutsy one wasn&#8217;t able to boot Hardy&#8217;s kernel. Once this was achieved (thanks to some great mentoring by a very busy <a href="https://launchpad.net/~kamion">Colin Watson</a> and others) I was able to upgrade to Hardy and start fire-fighting.</p>
<p>Unfortunately we weren&#8217;t able to fix things in time for Hardy&#8217;s first release. <a href="https://bugs.launchpad.net/ubuntu-ps3-port/+bug/217647">X was crashing</a> and <a href="https://bugs.launchpad.net/ubuntu-ps3-port/+bug/219424">trying to choose the wrong video driver</a> (both now fixed), and <a href="https://bugs.launchpad.net/ubuntu-ps3-port/+bug/220524">the Kernel (still) has a memory allocation problem</a> (fix on the way). There are <a href="https://bugs.launchpad.net/ubuntu-ps3-port/+bugs">various other problems</a> waiting to be resolved, and a few <a href="https://wiki.ubuntu.com/UbuntuPS3/SuggestionBox">suggested features</a> too, but we&#8217;ll get to them all in good time.</p>
<p>Although initially the plan was to try and have an installable/usable Hardy by 8.04.1 in July, I think focus will probably be on Intrepid from now on. Getting fixes back into critical components such as the kernel and X for Hardy in time would be tough as this is considered an &#8220;unmaintained port&#8221; in Hardy.</p>
<p>So far working on this project has been a great experience for me. I am gaining a very broad knowledge of all aspects of how Ubuntu works, and also how Linux works on the PS3. I highly recommend any folks who are using Ubuntu on PS3 and have Debian/Ubuntu dev experience please jump on the <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-cell">development mailing list</a> and look out for ways to contribute.</p>
<p>A <a href="https://lists.ubuntu.com/archives/ubuntu-cell/2008-May/000073.html">status update</a> has just been posted to the dev list today. I&#8217;ve tried to outline as best as I can the current state of the project.</p>
<p>Thanks to everyone <a href="https://ozlabs.org/mailman/listinfo/cbe-oss-dev">upstream</a>, downstream (<a href="https://launchpad.net/~ubuntu-ps3-dev">ubuntu-ps3-dev</a>, <a href="https://launchpad.net/~ubuntu-x-swat">ubuntu-x</a>, <a href="https://wiki.ubuntu.com/KernelTeam">kernel-team</a>), and in the community who has helped out so far!</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2008/05/17/working-on-the-ubuntu-ps3-port/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello Planet!</title>
		<link>http://munckfish.net/blog/archive/2008/05/13/hello-planet/</link>
		<comments>http://munckfish.net/blog/archive/2008/05/13/hello-planet/#comments</comments>
		<pubDate>Tue, 13 May 2008 08:51:58 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/?p=86</guid>
		<description><![CDATA[Hi folks. This is my first post to Planet Ubuntu Users. Thanks to Gouki for letting me on board.
As well as blogging about general Ubuntu stuff I&#8217;ll also be talking about the Ubuntu PS3 Port project which I&#8217;m currently obsessed with.
]]></description>
			<content:encoded><![CDATA[<p>Hi folks. This is my first post to <a href="http://ubuntuweblogs.org/">Planet Ubuntu Users</a>. Thanks to <a href="http://blog.goukihq.org/">Gouki</a> for letting me on board.</p>
<p>As well as blogging about general Ubuntu stuff I&#8217;ll also be talking about the <a href="https://wiki.ubuntu.com/UbuntuPS3">Ubuntu PS3 Port project</a> which I&#8217;m currently obsessed with.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2008/05/13/hello-planet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux on Playstation 3</title>
		<link>http://munckfish.net/blog/archive/2008/02/15/linux-on-playstation-3/</link>
		<comments>http://munckfish.net/blog/archive/2008/02/15/linux-on-playstation-3/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 22:14:36 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[PS3]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/archive/2008/02/15/linux-on-playstation-3/</guid>
		<description><![CDATA[I have now got Ubuntu installed on my PS3.  This is very cool! The potential of no longer having to have a desktop computer sat in the corner taking up space is fantastic. Instead I have a mini super computer in a small beautifully styled consumer device&#8217;s clothing connected to a widescreen TV as [...]]]></description>
			<content:encoded><![CDATA[<p>I have now got Ubuntu installed on my PS3.  This is very cool! The potential of no longer having to have a desktop computer sat in the corner taking up space is fantastic. Instead I have a mini super computer in a small beautifully styled consumer device&#8217;s clothing connected to a widescreen TV as a monitor. Woo-hoo!</p>
<p>I followed <a href="http://psubuntu.com/installation-instructions/">the instructions on PSUbuntu.com</a> to install <a href="http://cdimage.ubuntu.com/custom/20071115-gutsy-ps3/">the port of 7.10 Gutsy Gibbon</a>. The instructions are good but this is very early days for Linux on PS3; naturally there&#8217;s plenty of work still to do to smooth over the user experience.  The Ubuntu builds for PS3 are maintained voluntarily by literally only 2 or 3 guys at Canonical, so it&#8217;s impressive it works as well as it does.</p>
<p>Setting up the screen resolution didn&#8217;t work quite <a href="http://psubuntu.com/installation-instructions/setup/">as described</a> - stopping gdm (the Gnome Display Manager) and setting the screen mode only changes the resolution for the current terminal not for the one which Xorg starts in, and if you specify a non-compatible mode your display may be a mess so you have to type blind to fix it (or better use the up/down cursor keys to access a previous working mode using shell history). Not a big deal for a techy but obviously could be quite a hurdle for your average punter. Anyway once the correct mode has been found setting up a script under /etc/event.d/ ensures it always boots into the desired mode.</p>
<p>Second issue was that the OS didn&#8217;t seem to be finding the ethernet network card. Luckily browsing the <a href="http://psubuntu.com/forum/viewforum.php?f=7">PSUbuntu Networking and Connectivity forum</a> revealed the solution - disable <a href="http://www.gnome.org/projects/NetworkManager/">NetworkManager</a> and configure the network settings manually using the Gnome Network tool (or by editing /etc/network/interfaces directly if you know how). Seems NetworkManager doesn&#8217;t work quite right with the PS3 ethernet card yet.</p>
<p>Having got it up and running the next task was to choose a lighter desktop system than <a href="http://www.gnome.org/">Gnome</a>. I love Gnome but there&#8217;s only 256MB of RAM on the PS3 and the Gnome desktop on it&#8217;s own uses most of that so applications are likely to be swapped out to disk way to too quickly for my liking. There are <a href="http://psubuntu.com/forum/viewtopic.php?t=1408">some interesting instructions</a> on the PSUbuntu forum which suggest all sorts of things like disabling the graphical login screen (gdm) and changing to use the Fluxbox window manager instead of the default Metacity, but I felt I wanted something less custom and more complete so I decided to install the <a href="http://www.xfce.org/">Xfce desktop</a>.</p>
<p><a href="http://www.xfce.org/">Xfce</a> is the base of the <a href="http://www.xubuntu.org/">XUbuntu</a> distribution and is a lightweight Gtk based desktop system with its own window manager. It has some slick themes and also supports pretty features like transparency and drop shadows (using Xorg&#8217;s Composite extension). You can choose to install the entire XUbuntu default installation by installing the xubuntu-desktop package from Synaptic, but this will pull in all sorts of other peripheral tools such as the Abiword office suite. I didn&#8217;t need this stuff so I opted to install just the Xfce components by installing the xfce4 package.</p>
<p><a title="PS3 + Ubuntu + Xfce" href="http://munckfish.net/blog/wp-content/uploads/2008/02/ps3-linux-xfce-screenshot.png"><img src="http://munckfish.net/blog/wp-content/uploads/2008/02/ps3-linux-xfce-screenshot-small.png" alt="PS3 + Ubuntu + Xfce" /></a></p>
<p>Of course one thing which I want to take advantage of is the chance to experiment programming the amazing <a href="http://en.wikipedia.org/wiki/Cell_microprocessor">Cell Microprocessor</a>. Included in the package repositories are the required development libraries and tools. Just search for the keyword &#8216;cell&#8217; in Synaptic to find the relevant packages. There&#8217;s also a packaged copy of the <a href="http://www.kernel.org/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20080201-ADDON/doc/CellProgrammingPrimer.html">Cell Programming Primer</a> from kernel.org.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2008/02/15/linux-on-playstation-3/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Linux on TV</title>
		<link>http://munckfish.net/blog/archive/2008/02/13/linux-on-tv/</link>
		<comments>http://munckfish.net/blog/archive/2008/02/13/linux-on-tv/#comments</comments>
		<pubDate>Wed, 13 Feb 2008 15:09:58 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/archive/2008/02/13/linux-on-tv/</guid>
		<description><![CDATA[Flicking through the menus on a Panasonic Viera 32&#8243; LCD I discovered a &#8220;Software Licence&#8221; link in the setup menu. Amazingly this links to a full copy of the GPL and a link to am-linux.jp. Seems it runs Linux!
]]></description>
			<content:encoded><![CDATA[<p>Flicking through the menus on a Panasonic Viera 32&#8243; LCD I discovered a &#8220;Software Licence&#8221; link in the setup menu. Amazingly this links to a full copy of the GPL and a link to <a href="http://www.am-linux.jp/">am-linux.jp</a>. Seems it runs Linux!</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2008/02/13/linux-on-tv/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Possible regression in Java 6 DisplayMode functionality on Ubuntu Gutsy</title>
		<link>http://munckfish.net/blog/archive/2007/10/20/regression-java6-displaymodes-gutsy/</link>
		<comments>http://munckfish.net/blog/archive/2007/10/20/regression-java6-displaymodes-gutsy/#comments</comments>
		<pubDate>Sat, 20 Oct 2007 02:06:30 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
		
		<category><![CDATA[C/C++]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://munckfish.net/blog/archive/2007/10/20/possible-regression-in-java-6-displaymode-functionality-on-ubuntu-gutsy/</guid>
		<description><![CDATA[I upgraded my desktop machine to Gutsy today to have a play with it before upgrading my laptop. I&#8217;m really glad I did it in this order as it appears there may be a regression in the version of Java 6 shipping on Gutsy.
I happened to test out a Java game which uses Full Screen [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded my desktop machine to Gutsy today to have a play with it before upgrading my laptop. I&#8217;m really glad I did it in this order as it appears there may be a regression in the version of Java 6 shipping on Gutsy.</p>
<p>I happened to test out a Java game which uses <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">Full Screen Exclusive Mode</a> with a DisplayMode of 800&#215;600. So far this app has been working ok on Feisty but when I tested it today on Gutsy it couldn&#8217;t change display mode. I discovered that Java was only able to see the current screen mode of 1280&#215;1024 and no others.</p>
<p>I&#8217;ve opened a bug on Launchpad here:  <a href="https://bugs.launchpad.net/ubuntu/+source/sun-java6/+bug/154613">#154613: Java cannot change display modes / screen resolution in Gutsy</a>, and I&#8217;ve been digging in trying to work out what&#8217;s going wrong.</p>
<p>I managed to locate the JNI function call in Java&#8217;s native C source code where it gets the list of modes. It&#8217;s called <code>Java_sun_awt_X11GraphicsDevice_enumDisplayModes(...)</code> and is in the file <a href="http://icedtea.classpath.org/hg/openjdk/file/ce9dde984c21/j2se/src/solaris/native/sun/awt/awt_GraphicsEnv.c"><code>j2se/src/solaris/native/sun/awt/awt_GraphicsEnv.c</code></a>. As expected the Ubuntu packages are built from the Sun Linux binaries - no source code. I couldn&#8217;t find the Java 6 source on Sun&#8217;s site, the link appears to be wrong. Instead I found the file in the <a href="http://icedtea.classpath.org/wiki/Main_Page">Icedtea/OpenJDK</a> source tree. Icedtea on Gutsy has the same problem so I&#8217;m fairly happy this is the the same or roughly the same code as in Java 6.</p>
<p>The function makes use of the XRandr Xorg extension to query the available display modes. <a href="http://launchpadlibrarian.net/10076188/xrandr-lsmodes.c">I coded up a small test</a> to see if XRandr was behaving correctly. It is, on both Gutsy and Feisty. So it looks like it could be something in Java 6 u3.</p>
<p>Will keep digging, as I really need this to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://munckfish.net/blog/archive/2007/10/20/regression-java6-displaymodes-gutsy/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

