PS3:Linux

From wikibrew
Jump to: navigation, search

Contents

Example

Generic Guide to install any PPC64 Linux Distro (vflash only)

umount ps3db
umount ps3dc
wget http://gitbrew.org/~glevand/ps3/scripts/hdd_access.sh
chmod a+x hdd_access.sh
./hdd_access.sh
kexec -l vmlinuz --initrd of the distro you want to install

Fedora

Installed with Fedora 9 Full DVD Tested on Slim PS3 (3.55) & Phat PS3 (3.15)

When installing Fedora 9, when you are asked about partitioning, choose "Custom layout" and select ps3da.


3.55 (Custom CFW)

umount ps3db
umount ps3dc
./hdd_access print|patch|restore?
mkdir /mnt/fedora
cp /tmp/petitboot/mnt/sr0/ppc/ppc64/* /mnt/fedora
kexec -l vmlinuz --initrd=ramdisk.image.gz

Reboot the PS3 and it will start the installer

NOTE: When installing Fedora 9 (possibly all versions), choose "Custom layout" and select ps3da. The hdd_access.sh script disables ps3da-c and makes it so that ps3dd reads as the "first" hard drive. After the installer finishes, DO NOT HIT REBOOT. You must unplug or hardware reset your console.

3.15 PHAT (Stock OFW)

mkdir -p /media/usbstick/PS3/otheros/
wget http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-petitboot/otheros.bld
cp ./otheros.bld /media/usbstick/PS3/otheros/otheros.bld



NAND 3.15 Notes before Tweaks

Tweaks

 
root     ALL=(ALL) ALL
snowy    ALL=(ALL) ALL
KERNEL=="ps3da1", ACTION=="add", RUN+="/sbin/mkswap /dev/ps3da1", RUN+="/sbin/swapon -p 1 /dev/ps3da1"

# udev rules to automatically enable swap on /dev/ps3vram
# Copy this file to /etc/udev/rules.d/10-ps3vram-swap.rules
# Choose only one of the rules below

# Initialize and enable swap unconditionally
KERNEL=="ps3vram", ACTION=="add", RUN+="/sbin/mkswap /dev/ps3vram", RUN+="/sbin/swapon -p 10 /dev/ps3vram"

# Initialize using /etc/fstab and standard init scripts
# KERNEL=="ps3vram", ACTION=="add", RUN+="/bin/bash -c '/bin/grep -q ^/dev/ps3vram[[:space:]]*swap /etc/fstab && /sbin/mkswap /dev/ps3vram'"


Fedora is now installed and configured.


Fedora 12, faster way

### Fedora 12 clone installation howto by masterzorag ###
 
This is my console-only base Fedora 12 system, with:
Cell SDK 3.1.0.1, OpenCL 0.3, switchable support for 7th spu under opencl or SS;
eth0 static ip 192.168.1.203, ssh server running, minimal.
 
assuming here:	/dev/ps3dd2 as target root partition, /dev/ps3dd1 as swap
prerequisites:	petitboot running, accessible ps3dd, anything more
 
0. grab my image at http://www.filefactory.com/file/c3e8221/n/FC12.tar.bz2
1. boot petitboot
2. make your root filesystem:	mkfs.ext4 -m 0 /dev/ps3dd2
3. make your swap filesystem:	mkswap /dev/ps3dd1
4. make your temp mountpoint:mkdir /FC12
5. mount target partition:	        mount /dev/ps3dd2 /FC12
6. untar my image onto:	        tar xjvf FC12.tar.bz2 -C /FC12 
 
7. boot now Fedora via kexec:
    kexec -l /FC12/boot/vmlinux-2.6.39-gb9133b3-dirty --initrd=/FC12/boot/initramfs-2.6.39-gb9133b3-dirty --append="root=/dev/ps3dd2"
    reboot
  
8. Fedora will boots bringing up console login in a flash:
    login as root, password root
 
9. Fit your needs about root login, mountpoints, hostname, ip:
    passwd
    nano /etc/fstab
    nano /etc/sysconfig/network
    nano /etc/sysconfig/network-scripts/ifcfg-eth0
    reboot
 
On petitboot reboots, /dev/ps3dd2 is mounted on /tmp/petitboot/mnt/ps3dd2, boot via kexec (or add a kboot entry for):
kexec -l /tmp/petitboot/mnt/ps3dd2/boot/vmlinux-2.6.39-gb9133b3-dirty --initrd=/tmp/petitboot/mnt/ps3dd2/boot/initramfs-2.6.39-gb9133b3-dirty --append="root=/dev/ps3dd2"
reboot

Fixes

Debian

Debian-Installer


Always being worked on.  But should do everything the manual install does plus more.

Instructions for NAND PS3's:
# wget --no-check-certificate http://bit.ly/debian-ps3-installer
# unzip nikitis-PS3-Debian-Installer.zip
# sh ./debian-installer.sh

Instructions for SLIM PS3's:
# git clone git://github.com/nikitis/PS3-Debian-Installer
# sh PS3-Debian-Installer/debian-installer.sh

And follow instructions.

NOTE:  If you have already done the partitioning of drives from the previous wiki page, select 'y' then '2' when asked if
you have already paritioned the drives and asked how many.

Manual Install

Debootstrap HOWTO by glevand (geoffrey.levand@mail.ru)
-------------------------------------------------------

Links:

* http://www.debian.org/releases/stable/i386/apds03.html.en
* https://help.ubuntu.com/6.10/ubuntu/installation-guide/i386/linux-upgrade.html

Installing Debian Squeeze with debootstrap on petitboot
--------------------------------------------------------

- Configuring the base system

1. umount /dev/ps3dd2
2. mkdir /mnt/debian
3. mkfs.ext3 /dev/ps3dd2
4. mount /dev/ps3dd2 /mnt/debian
5. rm -rf /mnt/debian/*
6. debootstrap --arch powerpc squeeze /mnt/debian http://ftp.us.debian.org/debian
7. mount -t proc none /mnt/debian/proc
8. mount --rbind /dev /mnt/debian/dev
9. LANG=C chroot /mnt/debian /bin/bash
10. export TERM=xterm-color

- Mounting partitions

 File /etc/fstab
 ----------------
 /dev/ps3dd2			/			ext3		defaults		        		0 1
 /dev/ps3vram		        none		        swap		sw					0 0
 /dev/ps3dd1			none		        swap		sw					0 0
 /dev/sr0			/mnt/cdrom	        auto		noauto,ro		        	0 0
 proc				/proc		        proc		defaults		        		0 0
 shm			        /dev/shm        		tmpfs		nodev,nosuid,noexec             		0 0
 spu                            /spu                    spufs           defaults                                0 0

(don't forget to mkdir /spu)

- Setting timezone

1. vi /etc/default/rcS

UTC=yes

2. dpkg-reconfigure tzdata

- Configuring networking

1. echo "Name of your computer here" > /etc/hostname

File /etc/network/interfaces
-----------------------------

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

File /etc/resolv.conf (cat /etc/resolv.conf, if you see nameservers already skip this step)
----------------------

nameserver 192.168.1.1

- Configuring apt

File /etc/apt/sources.list
---------------------------
deb http://ftp.us.debian.org/debian squeeze main
deb-src http://ftp.us.debian.org/debian squeeze main

deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

1. aptitude update

- Configuring locales and keyboard

1. aptitude install locales
2. dpkg-reconfigure locales
3. aptitude install console-data
4. dpkg-reconfigure console-data

- Finishing touches

1. tasksel install standard
2. aptitude clean
3. passwd
4. aptitude install git build-essential ncurses-dev
5. mkswap /dev/ps3dd1
6. swapon /dev/ps3dd1

- Installing kernel

1. cd /usr/src
2. git clone --depth=1 git://git.gitbrew.org/ps3/ps3linux/linux-2.6.git
3. ln -sf linux-2.6 linux
4. cd linux
5. cp ps3_linux_config .config
6. make menuconfig
7. make
8. make install
9. make modules_install

If you compile your kernel on PS3 then make sure you activate swap because
compiling kernel needs much RAM. I used /dev/ps3dd1 as swap which
you have to create with fdisk first of course or some other program.

- Creating kboot.conf
1. ls /boot/
2. edit kboot.conf and replace what you see for > vmlinux-2.6.* from below (example. vmlinux-2.6.38-gf77c53d)

File /etc/kboot.conf
---------------------

debian=/boot/vmlinux-2.6.* root=/dev/ps3dd2
debian_Hugepages=/boot/vmlinux-2.6.* root=/dev/ps3dd2 hugepages=1

- Creating /dev/ps3flash device (needed for ps3-utils)

File /etc/udev/rules.d/70-persistent-ps3flash.rules
----------------------------------------------------

KERNEL=="ps3vflashf", SYMLINK+="ps3flash"

Ubuntu

Ubuntu-Installer 10.04 Lucid


Always being worked on.  But should do everything the manual install does plus more.

Instructions for NAND PS3's:
# wget --no-check-certificate http://bit.ly/ubuntu-installer
# tar --strip-components=1 -zxvf ubuntu-installer
# sh ./ubuntu-installer.sh

Instructions for SLIM PS3's:
# git clone git://github.com/nikitis/PS3-Ubuntu-Installer
# sh PS3-Ubuntu-Installer/ubuntu-installer.sh

And follow instructions.

NOTE:  If you have already done the partitioning of drives from the previous wiki page, select 'y' then '2' when asked if
you have already paritioned the drives and asked how many.  Otherwise just select 'n'.

Manual Installation

Debootstrap HOWTO by glevand (geoffrey.levand@mail.ru) 
(Redone by snowy)
(Updated by thom) 7-19-11
-------------------------------------------------------
Installing Ubuntu Lucid (10.04) with debootstrap on petitboot
--------------------------------------------------------
For different versions of Ubuntu, just change all occurrences of lucid, to natty or whatever build you would like.

You can also edit the config files in whatever text editor you would like. Nano is the preferred text editor in this
documentation.

- Configuring the base system

1. umount /dev/ps3dd2
2. mkdir /mnt/ubuntu
3. mkfs.ext3 /dev/ps3dd2
4. mount /dev/ps3dd2 /mnt/ubuntu
5. rm -rf /mnt/ubuntu/*
6. debootstrap --arch powerpc lucid /mnt/ubuntu http://ports.ubuntu.com
7. mount -t proc none /mnt/ubuntu/proc
8. mount --rbind /dev /mnt/ubuntu/dev
9. LANG=C chroot /mnt/ubuntu /bin/bash
10. export TERM=xterm-color
11. apt-get install nano -y

- Mounting partitions

12.) nano /etc/fstab

Configuration File for /etc/fstab
----------------

/dev/ps3dd2			/		ext3		defaults				0 1
/dev/ps3vram			none		swap		sw				0 0
/dev/ps3dd1			none		swap		sw				0 0
/dev/sr0				/mnt/cdrom	auto		noauto,ro			0 0
proc				/proc		proc		defaults				0 0
shm				/dev/shm		tmpfs		nodev,nosuid,noexec		0 0
#spu                            /spu            spufs           defaults                        0 0
dev                             /dev            tmpfs           rw                              0 0
#SPU is commented out because it is know to have issue with plymouth. Use at your own risk. 

--------------------

13.) mkdir /spu

- Setting timezone

14.) dpkg-reconfigure tzdata

- Configuring networking

15.) echo "Name of your computer here" > /etc/hostname
16.) nano /etc/network/interfaces

Configuration File for /etc/network/interfaces
-----------------------------

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

-----------------------------

17.) nano /etc/resolv.conf
Configuration File for /etc/resolv.conf 
(Note:If you see nameservers already skip this step)
------------------------------

nameserver 192.168.1.1

------------------------------

- Configuring apt
18.) nano /etc/apt/sources.list

Configuration File for /etc/apt/sources.list
---------------------------
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-updates main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ lucid-updates restricted
deb http://ports.ubuntu.com/ubuntu-ports/ lucid universe
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-updates universe
deb http://ports.ubuntu.com/ubuntu-ports/ lucid multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-updates multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-security main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ lucid-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-security universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ lucid-security universe
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-security multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ lucid-security multiverse

---------------------------


19.) apt-get update

- Configuring locales and keyboard

20.) apt-get install locales
21.) dpkg-reconfigure locales
22.) apt-get install console-data
23.) dpkg-reconfigure console-data

- Finishing touches

24.) tasksel install standard
25.) apt-get clean
26.) passwd 
     (Note: This is your password for your root user.)
27.) apt-get install build-essential ncurses-dev git-core gitosis
28.) mkswap /dev/ps3dd1
29.) swapon /dev/ps3dd1

Note: If you compile your kernel on PS3 then make sure you activate swap because
compiling kernel needs much RAM. I used /dev/ps3dd1 as swap which
you have to create with fdisk first of course or some other program.

- Installing kernel

30.) cd /usr/src
31.) git clone --depth=1 git://git.gitbrew.org/ps3/ps3linux/linux-2.6.git
32.) ln -sf linux-2.6 linux
33.) cd linux
34.) cp ps3_linux_config .config
35.) make menuconfig
36.) make
37.) make install
38.) make modules_install


- Creating kboot.conf

39a.) ls /boot/
39b.) Look for vmlinux... in this directory, and user it's field name in the next commmand. Write this down.
40.) edit kboot.conf and replace what you see for > vmlinux-2.6.* for the kboot.conf configuration file below 
(example. vmlinux-2.6.38-gf77c53d)
41.) nano /etc/kboot.conf 

Configuration File for /etc/kboot.conf
---------------------

Ubuntu=/boot/vmlinux-2.6.* root=/dev/ps3dd2 noplymouth nosplash
Ubuntu_hugepages=/boot/vmlinux-2.6.* root=/dev/ps3dd2 hugepages=1 noplymouth nosplash

----------------------

- Creating /dev/ps3flash device (needed for ps3-utils)

42.) nano /etc/udev/rules.d/70-persistent-ps3flash.rules
Configuration File for /etc/udev/rules.d/70-persistent-ps3flash.rules
-----------------------

KERNEL=="ps3vflashf", SYMLINK+="ps3flash"

-----------------------


Another Way to get Ubuntu on you PS3 (Non Stable)
-----------------------------------------------
...is to use an Installer-Disk.

1. Download these ISO
[http://cdimage.ubuntu.com/ports/releases/10.04/release/ubuntu-10.04-alternate-powerpc+ps3.iso Ubuntu.10.04.Alternate.PS3.iso]
These is the alternate-installation for PS3. Its a rudimentary installer. He is faster than the graphical one of 
the normal installtaion. 

2. Burn to disk 
it is needed, to burn these image. An installation from usb-pen is with these installation not possible.

3. Installation.
Put the CD in the drive and reboot to pettitboot. Choose the first normal installation.
Follow the instructions. If you get ask for the partition, my proposal is to use the whole linux-partition.
The assistant should choose a port of it for swap. After the installation you cloud chance the swap to ps3vram
The installation-process take a quite a while. (3-4h)
  
4. Post installation
it could be that you have to chance the fstab. (which described which /dev ubuntu mount to what you want)
From Petitboot go to Terminal. cd /tmp/petitboot/mnt/ps3dd1/etc/ and nano fstab.


Ubuntu should run like a weasel (a handicapped)

Post Installation

After you've set up Linux on your PS3... http://wiki.gitbrew.org/index.php/PS3:Tools

Tools

Information about setting up PS3-specific tools found on git.gitbrew.org[3] can be found at PS3:Tools

Wireless

Setting up wireless requires you to take down networking. You must have a direct connection to your PS3 to continue. More information

Enabling Wireless with the latest Linux kernel

You don't need to use WLAN script with the latest Linux kernel anymore. Add the following boot parameter to your kboot entry:

ps3_gelic.disable_eurus_ctrl_iface=1

Attention: It will work on PS3 PHAT models only.

WiFi with PS3 Slim Models

Useful links:

How to load ps3_jupiter.ko and ps3_jupiter_sta.ko automatically at boot time:

Please report any bugs and problems to me because the driver is still in development and
i would like feedback from you if you want me to continue. Thanks.

SLES

CURRENTLY ONLY TESTED ON 3.15OFW

/tmp/petitboot/mnt/sr0/suseboot/linux64.gz
video=ps3fb:mode:3 quiet sysrq=1 insmod=sym53c8xx insmod=ipr

Enabling Sound

Sound HOWTO by c4pt and durandal


  1. Check to see that the sound driver is installed
  2. sudo lsmod | grep snd_ps3
    • if your output shows snd, snd_pcm, and snd_ps3, then continue to the next step, otherwise
    • sudo modprobe snd_ps3
    • if it installs, you're good to go, otherwise, you neen to compile a new kernel
  3. Connect the ps3 sound device to /dev/sound0
    • sudo ln -s /dev/snd/pcmC0D0p /dev/sound0
  4. Add yourself to the audio group
    • sudo usermod -G audio <username>
  5. Verify that the user was added
    • sudo id <username>
    • If your username shows audio as a group, move on to the next step
  6. Install either mpg123 or alsamixer to test the sound, using whatever install tools your distribution has
    • RHEL, SLES, OpenSUSE, YDL, fc: sudo yum install mpg123 alsamixer
    • Debian, Ubuntu: sudo apt-get install mpg123 alsamixer
  7. Reboot the console
    • sudo reboot
  8. Play an mp3 to test the sound with either
    • mpg123 <some_sound_file.mp3> OR
    • alsamixer <some_sound_file.mp3>

Cleaning up Errors

exim4

Kernel

plymouth

dev /dev tmpfs rw 0 0
ubuntu=/boot/vmlinux root=/dev/ps3dd1 video=ps3fb:mode:133 noplymouth nosplash

Alternative (when all else fails) :
dpkg --force-depends -P plymouth
See also: https://bugs.launchpad.net/ubuntu/+source/mountall/+bug/556372
<tuxuser> fixed the plymouth issue :)
<tuxuser> dhewg, nope :P I first purged plymouth.. then just reinstalled it
<tuxuser> made sure dev /dev mount point is in /etc/fstab, rootdev is first entry and spu is commented out
<tuxuser> now plymouth is actually showing and not throwing errors :)

Locales

en_US.UTF-8 UTF-8

Hostname

127.0.0.1    my-ps3-hostname

Enabling 7th SPU with the latest Linux kernel

Add the following boot parameter to your kboot entry:

spu_base.enumerate_shared=1

To disable it at boot time again, set it to 0.

Attention: Enabling 7th SPU on Linux will make most of SS services unusable because they use the 7th SPU !!!
Screenshot of OpenCL running on 7spu

Linux Kernel v3

http://gitbrew.org/~glevand/ps3/linux/linux-3/ps3-slim-dmesg-3.1.7

http://gitbrew.org/~glevand/ps3/linux/linux-3/ps3-slim-dmesg-3.2.1

http://gitbrew.org/~glevand/ps3/linux/linux-3/ps3-slim-dmesg-3.2.2

http://gitbrew.org/~glevand/ps3/linux/openwrt/ps3-petitboot-dmesg-slim-3.2.2

Personal tools
Namespaces
Variants
Actions
Gitbrew
Navigation
projects
Toolbox