FAQ   Search   Memberlist   Usergroups   Register   Profile   Log in to check your private messages   Log in 

THIS FORUM IS NOW CLOSED FOR ALL NEW POSTING. PLEASE GO TO THE NEW PSUBUNTU FORUMS TO POST NEW TOPICS.

This forum will still be available and searchable, but no posting is allowed. We encourage all users to sign up for an account on the new forums.

You can help us maintain valuable information from this forum by copying it over to the new forums or adding it to the PSUbuntu Wiki.

HOWTO: Setup Ubuntu Feisty on PS3 with Kernel 2.6.23

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PSUbuntuForums Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
Protheus



Joined: 12 Sep 2007
Posts: 142
Location: Germany

PostPosted: Mon Sep 24, 2007 1:35 pm    Post subject: HOWTO: Setup Ubuntu Feisty on PS3 with Kernel 2.6.23 Reply with quote

Hi all,

This howto is a little different to the last one and did not obsolet it. This one is without upgradeing to Gutsy. As we have some probs with gutsy ... you can stick to this one until gutsy will be final.

PLEASE DON'T ASK ANY QUESTIONS IN THIS THREAD. PLEASE ASK YOUR QUESTIONS HERE:

http://psubuntu.com/forum/viewtopic.php?t=967

as we dug out all the stuff from the net we got everything up and running for the PS3 with the actual kernel.

This means, we have the following parts in place:

kernel 2.6.23 (rc6 at the moment)
WIFI support
Bluetooth support for SIXAXIS controller
Blueray support for BD movies with UDF 2.50

Rick (aka mrvh) and me compiled this Howto, to enable you to achieve the same. We start using a scratch installation of Ubuntu 7.04 and go from there the direct way. If you already have a Ubuntu 7.04 in place you can do the appropriate steps after this, but make sure you don't have changed your installation to much.
Additional suggestions came from Garoro. Thanks a lot for this.

This howto was derived from many sources including

Howto make debian standard debs from scratch
http://ubuntuforums.org/showthread.php?t=51003

HOWTO: Kernel Compilation for Newbies
http://ubuntuforums.org/showthread.php?t=56835

PS3 Linux Distributor's Starter Kit
http://www.kernel.org/pub/linux/kernel/people/geoff/cell/

We strongly recommend to read all those pages as they have plenty of informations in it, which are in general useful for further steps in this document.

Part 1 - Install feisty

Okay get this Install-Image (and only this) from Ubuntu servers.

http://cdimage.ubuntu.com/ports/releases/feisty/release/ubuntu-7.04-alternate-powerpc+ps3.iso
Please make sure you got the right thing and you download did not screw up anything by checking the md5 key:

e56422a3294ef0308ff8d2fdd583237c *ubuntu-7.04-alternate-powerpc+ps3.iso


After this follow this simple steps:

1. Burn CD Image as ISO. Don't put the File on a CD. If you don't know how to burn this CD - refer to https://help.ubuntu.com/community/BurningIsoHowto

2. Start PS3 (Game OS)

3. Format Disk (if not done earlier)
Make sure you have a proper Backup of your PS3 Data
Go into Settings Menu > System Settings > Backup Utility
Choose "Backup up" and do a Backup to a usb disk or whatever you like and what fits you data.

Go into Settings Menu > System Settings > Format Utility
Choose "Format Hard Disk" and answer the confirmation question with Yes.

In "Select a partition setting for the hard disk" menu choose the "Custom" option.
In the next Screen choose the option "Allot 10GB to the Other OS".
Then choose in "Select the hard disk format method" Quick Format.
Now answer the final question if you want to continue with YES.

4. Install OtherOS
Insert the CD from Step1
Go into Settings Menu > System Settings > Install Other OS
On the next screen select "Start" with the X button.

Once finished, go back into Settings Menu > System Settings > Default System > Choose "Other OS"

Confirm to restart the PS3 now, and you will end up in kboot. Your CD should still be in the drive for it to work.

5. Install Ubuntu
For the following steps you need a keyboard attached to the PS3. I recommend a simple USB keyboard without any wireless or other stuff. Don't use bluetooth keyboards for now.

After startup you will get into kboot.

This looks like:
Code:
Welcome to Ubuntu 7.04 (Feisty Fawn)!

This is an Ubuntu Installation CDROM,
built on 20070418

The default option is 'install'. For maximum
control, you can use the 'expert' option.

If in doubt, just press Enter.

kboot:


a) Now wait a little moment or press return
b) Menu driven install .. follow the instructions until partitioning.
c) partitioning
The installer now shows you the configured partitions on the discovered drives. If you install Ubuntu for the first time - you should not see any partition. If you have installed any Linux before you see the old partitions now.
Okay choose the menu item "Guided partitioning"
In next screen choose "Guided - use entire disk.
Now select the disk created in Step 3 of this guide:
Code:
SCSI4 (0,0,0) (sde) - 10.7 GB SCEI Sec:Master-3

The result should look like this:
Code:
The following partitions are going to be formatted:
   partition #1 of SCSI4 (0,0,0) (sde) as ext3
   partition #5 of SCSI4 (0,0,0) (sde) as swap

Confirm the changes to the partitioning scheme and answer Yes.
The disk will be partitioned and formated now.
d) Clock settings
Set you Clock to UTC. This is the standard Unix style clock setting.
e) Enter a user and a password.
This password is also valid for root. You should change the root password after first reboot below.
f) Now install will go on. You should have internet access, so the installer can download packages.
g) At some point you will be asked for you display device resolutions. Don't change anything here. You have to do it another way, especially if you have HDTV device. No HDTV resolution is selectable. Let the settings untouched.
h) Now the installtion goes on - and it looks like it hangs at 6%. Don't care about it. The next step will take about 45 Minutes (depending on you internet speed). So get yourself a coffee. Wait until the CD is ejected.
i) Change kboot.conf
At the end of installer you will be asked for a reboot. Don't do it for now.
Instead press ALT-F2 - then press Enter. (this is not key F and key 2 but the F2 key)
You end up in a simple busybox shell - which is very limited. As the Ubuntu installer is somehow broken on finding the right /dev/sdx for you root filesystem, we have to change it by hand.
Code:
nano /target/etc/kboot.conf

Change any occurance of /dev/sde1 to /dev/sda1. Additionally remove the quiet and splash keywords for now. Your linux and your old line should look similar to this:

Change back to the installer by pressing ALT-F1

j) Finish your installation
In installer choose continue. Now the PS3 should do a reboot, but normaly it hangs due to the kernel used by ubuntu Sad. You have to power off your PS3 on the backside and power on again. This will be fixed with a new kernel only Sad

5. Some configuration changes (xorg.conf HDTV)
At first we update our system with the normal updateprocedures. This can be done by clicking on the orange button with a white star on it. The Update Manager starts up and searches for updates via internet. Just click on "Install Updates" enter your password and have another coffe Smile At the time of writing this 120 packages needs an update.

After the update we need a reboot. (remember you have to manually switch the power off)

Okay finished ...now lets go on to some configurational stuff.

a) Videomode for your display
Your display or screen (Plasma, LCD, Projector) has different screen resolutions that it accepts. For example I assume your display accepts 1080p as mine.
First we need a terminal session. In the menu line on top of the screen choos Applications > Accessories > Terminal
You end up in a shell (this is the comand line interface of unix).
First let us check the kernel version:
Code:
uname -a
Linux ps3 2.6.20-16-powerpc64-smp #3 SMP Thu Aug 30 23:49:48 UTC 2007 ppc64 GNU/Linux


Okay we made it.

We have to edit kboot.conf again to set the correct video mode in there. Open up /etc/kboot.conf in a editor i.e. nano:
Code:
sudo nano /etc/kboot.conf

Again change the linux line - but this time leave the old one untouched.
Here are the possible video modes:

Quote:
video=ps3fb:mode:<video mode ID>
Drawing resolution can be set explicitly, if needed. If there is no video syntax, auto mode is used.

<video mode ID>
0: auto mode , default value
YUV 60Hz 1:480i 2:480p 3:720p 4:1080i 5:1080p
YUV 50Hz 6:576i 7:576p 8:720p 9:1080i 10:1080p
RGB 60Hz 33:480i 34:480p 35:720p 36:1080i 37:1080p
RGB 50Hz 38:576i 39:576p 40:720p 41:1080i 42:1080p
VESA 11:WXGA 12:SXGA 13:WUXGA

full screen mode: <video mode ID> + 128
dither ON mode : <video mode ID> + 2048

We want 1080p with full screen mode this means 5+128=133. Our paramater will be video=ps3fb:mode:133

The linux line should look like this:
Code:
linux='/boot/vmlinux initrd=/boot/initrd.img root=/dev/sda1 video=ps3fb:mode:133'

Now we have to change xorg.conf (only for clarity)
Code:
sudo nano /etc/X11/xorg.conf

find the line with Section "Screen". Remove all Subsections "Display" but the on with Depth 24 entry.
In the SubSection "Display" entry for depth 24 remove the Modes line.

The complete Section "Screen" should look like this:
Code:
Section "Screen"
        Identifier      "Default Screen"
        Device          "Generic Video Card"
        Monitor         "Generic Monitor"
        DefaultDepth    24
        DefaultFbBpp 32
        SubSection "Display"
                Depth 24
        EndSubSection
EndSection


After the next Reboot you should have 1080p with full screen. Remember: Use the right setting for your screen ... 133 is only for 1080p and full screen.

Problems at this point:
The cdrom does not work anymore. You can insert a cd, but you cannot mount it nor eject it Sad
Without the new kernel you got nothing - no cd, and no reboot, no ps3ps-utils atm.

Okay thats it. In the next Part I will dive into creating a new kernel.

Protheus
_________________
If you want to contact me over ICQ - please leave me a message with regards to ubuntu on ps3 or something. Otherwise you will be droped into spam list.

Thx.
Protheus


Last edited by Protheus on Tue Nov 20, 2007 3:39 pm; edited 3 times in total
Back to top
View user's profile Send private message
Protheus



Joined: 12 Sep 2007
Posts: 142
Location: Germany

PostPosted: Mon Sep 24, 2007 4:30 pm    Post subject: Reply with quote

Here we go with the next part - Upgrading the kernel
At the end of part 2 you should have in place:

Updated Feisty with
    kernel 2.6.23-rc7
    cd mount/umount/eject etc working
    WIFI working
    New ps3pf-utils in place
    new wifi-radar tools in place


Whats next?
    Getting Sixaxis over bluetooth to work
    Getting some other stuff in place (vlc, mplayer, snes9x, doom perhaps)



Part 2 - update the kernel

There are two ways to get a new kernel.
You can either download the kernel, or build one on your own.
As the cd access is broken until we have a new kernel in place - downloading the new kernel is a safe option to get up and running - and it saves much of your time and coffe machine power Smile

2) Download custom build deps

Download the debs files from rapidshare or megaupload:
ATTENTION - UPDATED VERSIONS! PLEASE REINSTALL FOR WORKING BLUETOOTH!

http://rapidshare.com/files/58033319/linux-kernel-2.6.23-rc7_tools.tar.html
http://www.megaupload.com/?d=GBBFENGU

this is sha1sum:
838c869513cdfeb8584cd529155ac59e4cbdd03f linux-kernel-2.6.23-rc7+tools.tar

this is md5sum:
30a0954493045b3e9118bb16fb79e592 linux-kernel-2.6.23-rc7+tools.tar

please check it after download


after downloading the kernel - untar it with:
Code:
tar xf linux-kernel-2.6.23-rc7+tools.tar

then enter the linux-kernel... directory and install it:
Code:
cd linux-kernel-2.6.23-rc7+tools
sudo dpkg -i linux-headers-2.6.23-rc7-powerpc64-smp-custom_20070924_powerpc.deb
sudo dpkg -i linux-image-2.6.23-rc7-powerpc64-smp-custom_20070924_powerpc.deb
sudo dpkg -i ps3pf-utils_2.0-1_powerpc.deb
sudo dpkg -i wifi-radar_1.9.8-0ubuntu2_all.deb


DONT REBOOT NOW!

Go ahead to step 4 or optionaly build your own kernel.

3) Install kernel from source.

These steps will build an updated version of the same kernel available in the deb from above.

Everything in this step should be done as root ...

Code:
sudo su -


Preparations to avoid the cd mounting problems on apt-get install:
Copy the iso image of the installcd to any directory on your PS3 (assuming /tmp for now). After this is finished we have to mount it, so that it is seen under /cdrom.
As you are already root, just type:
Code:
mount -o loop /tmp/ubuntu-7.04-alternate-powerpc+ps3.iso /media/cdrom0



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
    flex
    bison


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 flex bison


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-rc7
# ln -s linux-2.6.23-rc7 linux

The version number of kernel changes. At the time of writing it is rc7.

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/tracker/index.php?func=detail&aid=1795804&group_id=295&atid=300295

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.
Get a fresh install of dtc (Device Tree Compiler)
Code:
cd /usr/src
git clone git://www.jdl.com/software/dtc.git dtc
cd dtc
make
cp dtc /usr/bin/dtc

This overrides the dtc delivered by ubuntu.

Code:
# cd /usr/src/linux
# make ps3_defconfig


We have to add bluetooth settings to the kernel - so download the config.patch and patch the kernel.

Code:
cd /usr/src
wget http://eve.l-nibelungia.de/config-2.6.23-rc7-ps3.patch
cd /usr/src/linux
patch -p1 -i ../config-2.6.23-rc7-ps3.patch


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:
# echo "#!/bin/sh" > scripts/setlocalversion


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-rc7-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.20-16-powerpc64-smp /lib/firmware/2.6.23-rc7-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=20070924 kernel_image kernel_headers


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


4) Change kboot.conf

With beginning of kernel 2.6.22 the devices for the ps3 are natively supported. This means the hard drive is not longer used as a scsi device but we have a special device /dev/ps3da1. This means we have to edit kboot.conf again.

change the line
Code:

linux='/boot/vmlinux initrd=/boot/initrd.img root=/dev/sda1 quiet splash'

again, so that the we juse the new boot device:
Code:
linux='/boot/vmlinux initrd=/boot/initrd.img root=/dev/ps3da1 quiet splash'


Alternativly you can choose use the UUID of the boot device.
1. Look into /etc/fstab. Ubuntu alread mounts the partitions by UUID, so just copy the UUID from there.

find the line with your root partition (this is the one with / as mountpoint)
Code:
# /dev/sda1
UUID=ef6ece50-37d5-4b61-9bbf-fd5330b93354 / ext3 defaults,errors=remount-ro 0 1

On my Ubuntu it looks like this. In other configuration you would find in the first column /dev/sda1 instead of UUID=xxxx

2. now copy the complete UUID entry - means UUID=ef6ece50-37d5-4b61-9bbf-fd5330b93354

and edit your kboot.conf again:

change this line
Code:
linux='/boot/vmlinux initrd=/boot/initrd.img root=/dev/sda1 quiet splash video=ps3fb:mode:5'

so that it looks like this:
Code:
linux='/boot/vmlinux initrd=/boot/initrd.img root=UUID=ef6ece50-37d5-4b61-9bbf-fd5330b93354 quiet splash video=ps3fb:mode:5'

Make sure you insert the copied UUID from Step 1. alas you will insert my UUID Smile Which will lead to an unbootable system again.

You can now reboot to the new kernel. If something goes wrong, reboot with old kernel.
_________________
If you want to contact me over ICQ - please leave me a message with regards to ubuntu on ps3 or something. Otherwise you will be droped into spam list.

Thx.
Protheus
Back to top
View user's profile Send private message
Protheus



Joined: 12 Sep 2007
Posts: 142
Location: Germany

PostPosted: Tue Sep 25, 2007 2:08 pm    Post subject: Reply with quote

Part 3:

Fixing ps3-boot-game-os
I was too fast and geoff changed another detail in the ps3pf-utils, and forgot another place to change it.

The command ps3-flash-util does not any longer accept the parameter -b, which formerly was used to change the boot flag to game os.
Instead the parameter is now -g for game os.

We have to change the ps3-boot-game-os file:
Code:
sed "s/ps3-flash-util -b/ps3-flash-util -g/" -i /usr/bin/ps3-boot-game-os


Okay thats ist for now. No more time for me this time.

Have fun
Protheus
_________________
If you want to contact me over ICQ - please leave me a message with regards to ubuntu on ps3 or something. Otherwise you will be droped into spam list.

Thx.
Protheus
Back to top
View user's profile Send private message
Luk@s



Joined: 03 Mar 2008
Posts: 15
Location: Austria

PostPosted: Mon Mar 03, 2008 8:50 pm    Post subject: Reply with quote

I have to say, this tutorial is out of date. If you are not a pro, I wouldn't give it a try and waste plenty of hours. I'm still hoping that someone is publishing an article which is up to date. Smile
Back to top
View user's profile Send private message
Luk@s



Joined: 03 Mar 2008
Posts: 15
Location: Austria

PostPosted: Tue Mar 04, 2008 10:32 pm    Post subject: Reply with quote

So, I finally made it!

I'm writing this entry with (X)ubuntu 7.10 with my own kernel 2.6.24! Cool Cool

One of my recent problems was, that the new kernel didn't want to boot. However, this wasn't the kernel's fault but the boot-loaders!

So if someone is experiencing the same problem, just download the newest others.bld, copy it to a USB key and run the Sony-OS again as you did when you wanted to boot from the installer-CD. Everything (okay nearly everything... 1680 x 1050 is still a problem) works like a charm. I'm writing an article about the whole process in the next days and I'll publish it here.

So stay tuned! Wink
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PSUbuntuForums Forum Index -> Tutorials All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Theme xand created by spleen.