Mittwoch, 26. September 2007

Ubuntu with Wifi, Blu-Ray, and Sixaxis Support


Protheus, Rick, and Chris from PSUbuntu.com shows us how to get Ubuntu's Feisty Fawn up to speed with Yellow Dog Linux on the PS3. With their instructions, Feisty Fawn can now support WiFi, Sixaxis via Bluetooth, and Blu-ray.

Here are the instructions:

Part 1 - Install Ubuntufeisty fawn.
(RICK) I used the ps3 feisty iso.
(CHRIS) I used the ps3 feisty iso alternate install. This get you easier around the 15% install Problem.

Instructions are here.

Part 2 - Upgrade to gutys.
1) Create a backup of the kernel image and configure in kboot.conf.
Code:
cp /boot/initrd.img /boot/initrd.img-feisty

Code:
cp /boot/vmlinux /boot/vmlinux-feisty

Now edit /etc/kboot.conf and copy the line that looks like this one.
Code:
linux='/boot/vmlinux initrd=/boot/initrd.img root=UUID=dc9da6b4-8404-4924-962a-d1ad57c2a90b quiet splash'

Change the first word from 'linux' to 'feisty' and add '-feisty' to /boot/vmlinux and /boot/initrd.img. Add the line to end of the file. The line should look something like this.
Code:
feisty='/boot/vmlinux-feisty initrd=/boot/initrd.img-feisty root=UUID=dc9da6b4-8404-4924-962a-d1ad57c2a90b quiet splash'

When you see "reboot-to-feisty" in this howto, you should reboot and then type in feisty at the kboot: prompt. This is also the backup plan if something goes wrong.

2) Edit the sources.list file

Add these lines to the end of /etc/apt/sources.list

## gutsy repos
deb http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-updates restricted main multiverse universe
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-updates restricted main multiverse universe
deb http://security.ubuntu.com/ubuntu/ gutsy-security restricted main multiverse universe
deb-src http://security.ubuntu.com/ubuntu/ gutsy-security restricted main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu/ gutsy-proposed restricted main multiverse universe
deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-proposed restricted main multiverse universe

3) Run apt-get to upgrade to gutys

Code:
apt-get update

Code:
apt-get dist-upgrade

The installation of libpam0g will prompt you with a configuration question. Just hit enter a couple of times. When complete reboot-to-feisty.

In the next part we upgrade the kernel to 6.2.23. So hold on.

Rick and Chris
3. Update the kernel.
There are three ways to get a new kernel.

1) Install from Cell sdk.
You can start by looking here:
http://psubuntu.com/forum/viewtopic.php?t=688


2) Download debs from torrent.
This torrent has the 2.6.23-rc6 kernel with the UDF patch applied. It also includes a build of the ps3_utils and wifi-radar from the Cell sdk.

ps3 ubuntu linux-kernel-2.6.23-rc6+tools
http://www.demonoid.com/files/details/1348148/25736160/

3) Install kernel from source.

These steps will build an updated version of the same kernel available in the Cell sdk.

a) Install needed packages.
Run 'apt-get install' for each of these packages. There will be many dependencies, just hit enter when prompted.

git-core
kernel-package
device-tree-compiler
build-essential
libncurses5-dev
libqt3-mt-dev
autoconf
automake
fakeroot
libc6-dev-ppc64
dh-make

Code:
# apt-get install git-core kernel-package device-tree-compiler build-essential libncurses5-dev libqt3-mt-dev autoconf automake fakeroot libc6-dev-ppc64 dh-make

b) Download the kernel source.
Run these commands. The git command will take a while.

Code:
# cd /usr/src
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git linux-2.6.23-rc6
# ln -s linux-2.6.23-rc6 linux

If something goes wrong later on, use the next commands to reset the kernel tree to its original state and start over. There is no need to run the 'git clone' command over again.

Code:
# cd /usr/src/linux
# git checkout -f

c) Patch the kernel with UDF 2.50.
Download the patch to /usr/src/ from http://sourceforge.net

After downloading install the patch to the downloaded kernel. Remember to do this any time you reset the kernel with git checkout -f.

Code:
# cd /usr/src/linux
# bzcat /usr/src/UDF_2.50-linux-2.6.23-rc6.patch.bz2 | patch -p1

d) Configure the kernel for ps3.
Code:
# cd /usr/src/linux
# make ps3_defconfig

If you want to make changes to the kernel config, run this command.

Code:
# make menuconfig

e) Modify setlocalversion

In order for the .deb build to work properly, I had to change the setlocalversion script. It keeps trying to append '-dirty' to the kernel version (the deb build fails). Run these commands.

Code:
# cd /usr/src/linux
# echo \#\!/bin/sh > ./scripts/setlocalversion

This is a complete hack. If you know of a better way, please enlighten me.

f) create an additional link.
Update-initramfs.sh is run during the deb install. It looks for ubuntu restricted stuff in /lib/firmware/2.6.23-rc6-powerpc64-smp-custom. Since we do not have a restricted modules build for this kernel, we have to create a link to an existing one.

Code:
# ln -s 2.6.22-11-powerpc64-smp lib/firmware/2.6.23-rc6-powerpc64-smp-custom


g) build the kernel as debs.
This command will build the kernel debs. You should end up with two .deb files in /usr/src.

Code:
# make-kpkg --initrd --append-to-version=-powerpc64-smp-custom --revision=20070914 kernel_image kernel_headers

h) install the new kernel.
Code:
# dpkg -i /usr/src/linux-headers-2.6.23-rc6-powerpc64-smp-custom_20070914_powerpc.deb
# dpkg -i /usr/src/linux-image-2.6.23-rc6-powerpc64-smp-custom_20070914_powerpc.deb

You can now reboot to the new kernel. If something goes wrong, reboot-to-feisty.
4. Additional Configuration.
As we did not have the new ps3pf-utils right now, we need to build them.

First remove the old ones with:

Code:
# apt-get remove ps3pf-utils

Get the new .dep from http://eve.l-nibelungia.de, and install them

Code:
# wget http://eve.l-nibelungia.de/ps3pf-utils-2.0-powerpc.deb
# dpkg -i ps3pf-utils_2.0.deb

The tools are needed for restart game os and such things.

Remember - now you start your game os with

Code:
# ps3-boot-game-os

which is located in /usr/local/bin
5. Sixaxis through Bluetooth.
The main research is done here and we follow their guidelines.

http://www.pabr.org/sixlinux/sixlinux.en.html

a) First get the software
We need to get some additional software:

joystick
jscalibrator
bluez-utils

Code:
# apt-get install joystick jscalibrator bluez-utils

b) Configure Bluetooth
Change /etc/default/bluetooth so that HIDD_ENABLED is enabled.
HIDD_ENABLED=1

c) Testing it
Now we need to stop bluetooth so that we can see whats going on.

Code:
# /etc/init.d/bluetooth stop

Now start the hidd manually:
Code:
# hidd --server --nocheck -n

You will see something like this:
Code:
hidd[10169]: Bluetooth HID daemon

Press the PS button on controllers. You should see an output like this:

Code:
hidd[10190]: New HID device 00:19:C1:3F:9E:AA (Sony Computer Entertainment Wireless Controller)

Press ctrl-c to exit hidd.

Look in /var/log/messages with tail to find something like this:

Code:
# tail /var/log/messages
Sep 15 09:02:08 ps3 kernel: input: Sony Computer Entertainment Wireless Controller as /class/input/input1

At least start bluetooth again by

Code:
# /etc/init.d/bluetooth start

Now test the controllers.

Code:
# jstest /dev/input/js0

If you see stuff like this ... everything is okay - up and running.
Code:
# jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Sony Computer Entertainment Wireless Controller) has 28 axes (X, Y, Z, Rz, (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null))
and 19 buttons (Trigger, ThumbBtn, ThumbBtn2, TopBtn, TopBtn2, PinkieBtn, BaseBtn, BaseBtn2, BaseBtn3, BaseBtn4, BaseBtn5, BaseBtn6, BtnDead, BtnA, BtnB, BtnC, BtnX, BtnY, BtnZ).
Testing ... (interrupt to exit)
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 10: 0 11: 0 12: 0 13: 0 14: 0 15: 0 16: 0 17: 0 18: 0 19: 0 20: 0 21: 0 22: 0 23: 0 24: 0 25: 0 26: 0 27: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 10: 0 11: 0 12: 0 13: 0 14: 0 15: 0 16: 0 17: 0 18: 0 19: 0 20: 0 21: 0 22: 0 23: 0 24: 0 25: 0 26: 0 27: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 10: 0 11: 0 12: 0 13: 0 14: 0 15: 0 16: 0 17: 0 18: 0 19: 0 20: 0 21: 0 22: 0 23: 0 24: 0 25: 0 26: 0 27: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 8: 0 9: 0 10: 0 11: 0 12: 0 13: 0 14: 0 15: 0 16: 0 17: 0 18: 0 19: 0 20: 0 21: 0 22: 0 23: 0 24: 0 25: 0 26: 0 27: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off
Axes: 0: 0 1:-32767 2:-32767 3:-32767 4:-32767 5:-32767 6:-32767 7:-32767 8:-32767 9:-32767 10:-32767 11:-32767 12:-32767 13:-32767 14:-32767 15:-32767 16:-32767 17:-32767 18:-32767 19:-32767 20:-32767 21:-32767 22:-32767 23:-32767 24:-32767 25:-32767 26:-32767 27:-32767 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off 12:off 13:off 14:off 15:off 16:off 17:off 18:off

Press CTRL-C to exit this tool again.

Okay thats it - your SIXAXIS is running over bluetooth now.
Thanks to the Classical God for this information.



Read More...

[Source: Sony PS3 Modding - Homebrew, Upgrades, Mods, and Hacks]