now that ps3-utils is packaged, and it seems spufs didn't take much to get to work, i'd like to turn back to the installation procedure, which was admittedly manual and not exactly as "seamless" as i think it could be.

the first step as i see it is to get the bootloader working both generally and also specifically for the installer. by "working", i mean the following:

  • that it can be used to start the installer
  • that it can be used to boot the system, of course :)
  • that it can be built within debian

the third of these being the most complicated, as will be detailed below.

how a linux (kboot) "otheros" bootloader works on the ps3

okay, so i'm not intimately familiar with the powerpc architecture, nor with all the details of cross-compilation, but this is as much as i can tell.

  • the file "otheros.bld" which you use to start the installation is a compressed linux image with a built in ramdisk initrd.
  • it is a custom generated image made by kboot, which includes specialized versions of busybox and kexec-tools among others.
  • it is compiled with a locally bootstrapped compiler and uclibc library.
  • the initrd boots to a kboot script/prompt, which will then find and load the "real" or "system installed" kernel off of the disk.
  • you can also specify a different kernel to use, different boot params, etc.
  • you can also optionally get to a limited shell environment to poke around.

how kboot can be used on the installer

including support for this "otheros.bld" bootloader on the installer is fairly easy from a technical point of view, whether it's a usb disk or netinst cdrom image. basically, in either case the media should have a directory called "ps3/otheros", in which the file is placed and named "otheros.bld". when running the PS3 in game-os mode, this is where it looks when you tell it to "scan for otheros".

how kboot can be used/maintained, generally speaking

beyond a kboot.conf file, nothing really needs to be done on the host os to use kboot. of course, it would be nice to be able to issue updates for an image, which should be possible with a package that makes use of ps3-flash-util from the ps3-utils package. nothing too difficult/complicated there.

how kboot can be used/built within debian

this is the tricky part. in additional to the standard Free Software guidelines which debian is so (in)famous for following, we also have some basic QA rules that are needed from a distribution release management / security perspective.

one of these rules is that generally speaking it is considered taboo to include embedded copies of other software within a package, if that software is already available in debian. for example, i don't think it's very likely that the ftp-masters will look very kindly on some new software package that includes a copy of the entire kernel source tree, the gcc compiler, (uc)libc, busybox, coreutils, udev, etc.

it may be that a certain subset will require special patches, in which case some convincing/justification will be in order, but for the big ones (i.e. the kernel) there will almost certainly need to be modifications made.

ps3-kboot in ubuntu

there are already source packages available for ps3-kboot in ubuntu. apart from the fact that i can't stand working with packages that use cdbs, this package can't be used because the package maintainers' solution to the previously mentioned problem is basically to ignore that it exists.

it also seems that there's quite a bit of customization in this source package with respect to the initrd generation, which is probably worth some review... so i will likely still use this package as a base point of reference.

Posted Fri 06 Feb 2009 12:07:58 AM CET Tags: ps3

ps3-utils

is packaged and uploaded now, and will be in debian after making it through the initial processing of NEW. i ended up using the ubuntu ps3pf-utils package as the starting point, as it was the most recent package and was in reasonably good shape.

for tracking purposes: the here is the original ITP, and i've made the packaging generally available at an initial git repo for ps3-utils. if more people get interested/involved this location might change of to something more "official" looking.

bluetooth

i stumbled across another odd behaviour between the ps3 "game OS" and linux. it seems that if you have bluetooth daemons running under linux, your controllers will be disabled the next time you boot into the "game OS". i asked on a ps3/cell related mailing list that i recently joined, and got a confirmation that this was a problem. the suggested workaround at the moment is to disable the bluetooth daemons in linux while they find out what the problem is. i've also found that rebooting the ps3 an extra time from game OS to game OS again seems to resolve the problem (or maybe it fixes itself after a short while, i'm not entirely sure, but have eventually been able to use the controllers again).

Posted Fri 06 Feb 2009 12:07:58 AM CET Tags: ps3

so i've been looking into the state of things with running debian on my ps3, and while talking to some folks on #cell, it was brought to my attention that there was a problem or two with the libspe2 packages, used for programming SPU using applications.

for those not in the loop, the Cell Broadband Engine chip which powers the ps3 is a multi-core processor, with two general purpose PPU's and 6 specialized SPU's available. Without spufs support, the SPU's aren't available, and the real number-crunching capabilities of the ps3 aren't either.

more information on the nitty-gritty of spufs is available here

anyway, the problems are fixed now :)

still, as of now there's still some one-time setup after installation. namely:

    echo spu    /spu    spufs   defaults    0   0 >> /etc/fstab

(and then mount it or just reboot)

there really should be some way to have this setup automatically, either from the installer or through some kind of spufs support package. i'll take it up on the mailing lists and see what the consensus would be for this.

Posted Fri 06 Feb 2009 12:07:58 AM CET Tags: ps3

when not being distracted by other uses of the system, i've managed to spend some more time on packaging some more stuff that's useful on a debian ps3. namely:

  • ps3-utils: necessary utilities (boot-game-os, ps3-video-mode, etc)
  • speutils: threading and message passing library
  • spu-medialib: spu-accellerated audio/video library
  • xserver-xorg-video-spu: spu-accellerated framebuffer driver for xorg

the last of which i think will be of the most interest to some folks, as it provides an spu-based xvideo extension, which brings back the possibility of playing HD videos etc on the ps3.

now if you're interested in checking out these packages, read on, starting with this:

!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=

ZOMG WARNING!!!1!!ONE!!

THESE ARE EXPERIMENTAL BLEEDING EDGE PACKAGES.

I MAKE NO GUARANTEE WHETHER THESE PACKAGES ARE PROPERLY BUILT, WILL INSTALL, WILL WORK, WILL NOT DESTROY YOUR SYSTEM, WILL NOT CRAWL OUT OF YOUR SYSTEM AND MAKE LONG DISTANCE PHONE CALLS WHILE EATING THAT SNACK YOU WERE SAVING IN THE FRIDGE, ETC.

!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=

okay, so now that we've disposed with that formality, i'm glad if you're interested and still here :)

so... where were we? oh yes.

put this in your sources.list:

deb http://people.debian.org/~seanius/ps3-experimental-packages sid main

source packages are also available if you want to poke around or backport the packages to etch or ubuntu or something else wierd like that:

deb-src http://people.debian.org/~seanius/ps3-experimental-packages sid main

now, if you have a properly configured system, you should get a warning:

Reading package lists... Done
W: GPG error: http://people.debian.org sid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY CA78CB3E6E76D81D
W: You may want to run apt-get update to correct these problems

but i promise this key is valid, and mine. but hey, you don't have to take my word for it :)

sudo apt-get install debian-keyring
gpg --no-default-keyring --keyring /usr/share/keyrings/debian-keyring.gpg --export --armor CA78CB3E6E76D81D | sudo apt-key add -

then you can install the packages... assuming you want the xorg video driver:

sudo apt-get install xserver-xorg-video-spu

and update the appropriate Device entry in your xorg.conf, so that the normal fbdev is commented out and instead you use the spufbdev driver. example:

Section "Device"
        Identifier      "Generic Video Card"
        Driver          "spufbdev"
        Option "ShadowFB" "false"
EndSection

and then

sudo /etc/init.d/gdm restart

(or the equivalent if you're using something else). that's it!

more packages may trickle in here as well, at least until and they find their way into debian proper. i'm also in contact with the upstream authors of this stuff, and they're generally very responsive, so let me know if you have any problems.

Posted Fri 06 Feb 2009 12:07:58 AM CET Tags: ps3

when i haven't been blowing up crates of gold bullion or benevolently guiding cute little blob creatures, i've been tinkering with a debian installation on my PS3.

first installation

following the well-beaten path, i first created the usb/kboot bootstrap as documented here, followed by using a custom d-i image from keshi.org.

knowing that this would give me a relatively old system, and that i'd like want to dist-upgrade my way to testing/unstable, i opted for installing a minimal system without gnome/X, and therefore when the installer was done was left with useable headless system.

so this worked rather well, though i wasn't entirely happy about the experience. for the most part, this was because of the multi-step nature of the process, a few non-intuitive "bumps" in the process, and because it required going "outside the distribution" for different things. namely:

  • does there really need to be two installation media?
  • the ps3pf-utils package is not included in debian
  • the installed kernel is not an official debian kernel
  • the installer was a customized version of the debian-installer and not the official one.
  • there were some confusing/misleading error messages (which could be ignored, but still...)

dist-upgrading to lenny/sid

so next i went for the dist-upgrade. the upgrade itself went okay, except that a new version of udev isn't fully compatible with older kernels like the installed one. since i wasn't happy running an unofficial/unmaintained kernel anyway, i took a stab at installing the debian 2.6.26 kernel.

unfortunately, through no fault of my own this was greeted with epic failure.
discussing the issue on some mailing lists along with the proper google incantations i found the problem, and i was then pointed to a temporary fix by members of the debian kernel team.

further complications were introduced by the old version of the ps3pf-utils package not being able to reboot back into the PS3 OS on a new kernel (caused by the change in name of the root device from sda1 -> ps3da1), but fortunately i still had the old kernel handy (with a broken udev, but that could be worked around too).

installing X/gnome

apt-get install gnome

that was easy :) after that to get the full 1080p running i just needed to pass a hint to the kernel in the kboot configuration. Of course I don't have a mouse plugged into the thing, and my crappy usb keyboard's cable is just too short to sit comfortably at the couch, even with an extension cable. so it's generally easier to work from my laptop for the anyway...

however, i tried to play a simple (non-HD even) video file and was greated by a system that was unusably sluggish and a hung desktop. very strange... maybe it was because i was running x11vnc on the desktop, but i can't be sure. anyway, i'm going to put my head in the sand wrt that specific issue and instead focus on tackling some of the issues i brought up earlier.

next steps

a brain dump of what's to come:

  • packaging a newer version of ps3pf-utils and getting it into debian.
  • finding other useful software/packages (spufs, etc)
  • getting any needed changes/enhancements incorporated into d-i
    • single installation media
    • package selection
    • partitioning (and avoiding the scary error messages)
    • other ps3-specific installation-time configuration
    • other out-of-the-box improvements:
    • bluetooth working (as much as possible) by default
    • working controllers
  • any needed documentation/guides
  • ...?
Posted Mon 13 Oct 2008 10:27:00 AM CEST Tags: ps3