OtherOS++

From PS3 Developer wiki
Jump to navigation Jump to search

OtherOS++[edit | edit source]

This guide is roughly copypasted from Gitbrew wiki and Glevand' documentations

Firmwares[edit | edit source]

With SS Patches[edit | edit source]

coldboot fix[edit | edit source]

CRC16:83BF | CRC32: 595E42FC | SHA1: 1292611131BFCBD4D37FDF68603DC59D7922F5B5 | MD5: CCB69A1D02FDC42267D476076A44CBA5

No SS Patches[edit | edit source]

Documentation[edit | edit source]

Packages[edit | edit source]

Petitboot Images[edit | edit source]

Scripts[edit | edit source]

PS3 Kernels[edit | edit source]

Git[edit | edit source]

http://git.gitbrew.org/

Master Servers[edit | edit source]

Gitweb Mirrors[edit | edit source]

Git Mirrors[edit | edit source]

partial backup[edit | edit source]

gitbrew-backup.zip (1.59 MB)

snaphots[edit | edit source]

juli 22 2011 snapshot by aKoN-Man[edit | edit source]
http://www.multiupload.com/ULBPNLOHJ7 (143.1 MB)
http://www.multiupload.com/MDNVQSFL00 (143.1 MB)
http://www.multiupload.com/O737BH53N6 (143.1 MB)
http://www.multiupload.com/EOG7ABG05F (143.1 MB)
http://www.multiupload.com/CSG2IHRESD (143.1 MB)
http://www.multiupload.com/AL658V0ZUU (143.1 MB)
http://www.multiupload.com/W5BIRAZTUM (143.1 MB)
http://www.multiupload.com/BR410045AK (143.1 MB)
http://www.multiupload.com/RFPAKBP1BD (27.7 MB)
sept 15 2011 (.git's for mirror)[edit | edit source]
  ps3.tar.gz (793.32 MB)
    -or-
  ps3.part01.rar (95.78 MB)
  ps3.part02.rar (95.78 MB)
  ps3.part03.rar (95.78 MB)
  ps3.part04.rar (95.78 MB)
  ps3.part05.rar (95.78 MB)
  ps3.part06.rar (95.78 MB)
  ps3.part07.rar (95.78 MB)
  ps3.part08.rar (68.42 MB)
note: you need to have git installed, and use it e.g.:
 git clone E:\ps3\ps3linux\ps3-jupiter.git
sept 15 2011 (cloned version and site mirror version)[edit | edit source]
  ps3.tar.gz (1.3 GB) (Including wireless slim drivers for linux)
reupped mirror[edit | edit source]
https://mega.co.nz/#!7kESiLKJ!UKITnnPbmRyT-9yhxQgrKvVChLWJccWLmI0Hg3gj4BE ps3.part01.rar 95.8 MB
https://mega.co.nz/#!XpcnTabA!vnv_2dSOm3lh9YtmU3HT-y_9RFKNoE_B4u7kihuhZVE ps3.part02.rar 95.8 MB
https://mega.co.nz/#!npt0SBzK!8rhpoCDtNr8DJVjPFipLpe86EoZBqtQuSui2KHIn1yc ps3.part03.rar 95.8 MB
https://mega.co.nz/#!L5MBzY4K!CDu88krSULhSQJ0a1XP0x46Mjflpha5zqe9Lo2gmd00 ps3.part04.rar 95.8 MB
https://mega.co.nz/#!rtME1AxA!Gau1xr7V45JT22xozq7kmEhfLtLfwMRCl5-lWsVMI6I ps3.part05.rar 95.8 MB
https://mega.co.nz/#!GkMSSQbQ!GsLU6BQzko_sAWkA3o_TZ5kLiVJU8qwV6qf3VL0vD6I ps3.part06.rar 95.8 MB
https://mega.co.nz/#!XkcFkZwI!Sew1EJWvl9ICloDRzDRUz0HHhQ0NgsYqyY_IgIwRngA ps3.part07.rar 95.8 MB
https://mega.co.nz/#!78F3yQrY!CPY4ljpJVJ2Ldvr4nDQQ-TB-HYmJf4-dIIWRR4MT0QA ps3.part08.rar 68.4 MB
Github Files[edit | edit source]

https://github.com/therealfarfetchd/PS3-OtherOS/archive/master.zip 442 MB

^ File Name : PS3-OtherOS-master.zip

^ CRC32 CheckSum : 686510A7

^ CRC64 CheckSum : 65DC1E62D449607E

^ SHA1 CheckSum : 0DF8ABF418869D5B4A0D8FA1EDEC9423F2A64114

^ SHA256 CheckSum : EE97657AC18FBADD3D66FBCE4741561C0F6001C4F4F7F03B2D2FE8BC6671B0C4

^ SHA384 Checksum : A6535C5FCDCE38F5E8C4744A7173CEF2AB0C1AAB783D46404A2C698E099DB8610CC91C5A8F02AE8ADAF12C498A29F05F

^ SHA512 CheckSum : D9B9D7A14EE388BF7E5C7DB48701D5BBAE2ACECDCFAD8C77FF96B41722373CD475500874E7352F7F86EFD9EE049F521E87CA50627AD070AC8A6B170D1F15A512

^ RIPEMD-160 CheckSum : A2CF2C9999E5195D611084D40805A260F932DBCD

^ MD5 CheckSum : E298FFE47C26CF4C45AF26E40BD4B6F4

^ BLAKE2sp CheckSum : A327CF5E8B17A62906EA969E582C204CB6932022214BDBD4D85723A0D51A76E8

^ Zip Comment : 7c9266feec5a062a02d2dcc8f9c8feb48236ef4b

^ Contents : 2 Folders , 46 Files

Features[edit | edit source]

  • Into HV integrated OtherOS bootloader loader (compatible with OtherOS bootloader on 3.15)
  • OtherOS bootloader is booted directly from HV, no GameOS is involved.
  • Process of booting OtherOS bootloader loader is very similar to 3.15 method
  • Booting Linux from HDD/USB/BD/Network
  • Linux with GameOS rights
  • Full access to all HV SS services (Dispatcher Manager) from GameOS or Linux
  • Full access to all System Manager services
  • Ability to create/modify/remove repository nodes in LPAR 1 (e.g. with ps3dm-utils or ps3hvc-utils).
  • This ability gives you much power over the whole system because many layers of PS3 use repository nodes to exchange information.
  • Enabled QA mode in Update Manager
  • Downgrading without USB dongle or Service Mode
  • Ability to deactivate/activate HDD/VFLASH encryption (e.g. with ps3stor-utils)
  • Support for ps3-utils. You can flash new OtherOS bootloader from Linux e.g.

Petitboot building[edit | edit source]

See Petitboot

QA Flag[edit | edit source]

Reports state if you flag your ps3 you will lose all psn .act files making any bought psn content unuseable (warning: these are dev tools, remember this.)

SS Patches[edit | edit source]

Do not use these pups if you play games (either original or via backup managers). You will get trophy errors.

  Registration of the trophy infomation could not be completed.  The game will quit. (80010505)

You need SS patches to use ps3dm,sm, and other ps3 dev tools.

Alternative, you can use a firmware without SS patches and use the script below when you need to patch it on the fly:

 We're currently working on a patch in petitboot so it only runs when you use linux
 and not mess with your GameOS for normal game use -> use dispmgr_access.sh

OtherOS++ How-To[edit | edit source]

Referenced from http://www.gitbrew.org/otheros/

PS3 Models[edit | edit source]

PS3 Fat (NAND):

  • CECHA = 256MB
  • CECHB = 256MB
  • CECHC = 256MB
  • CECHE = 256MB
  • CECHG = 256MB

PS3 Fat (NOR):

  • CECHH = 16MB
  • CECHJ = 16MB
  • CECHK = 16MB
  • CECHL = 16MB
  • CECHM = 16MB
  • CECHP = 16MB
  • CECHQ = 16MB

PS3 Slim (NOR):

  • CECH-20..A = 16MB
  • CECH-20..B = 16MB
  • CECH-21..A = 16MB
  • CECH-21..B = 16MB
  • CECH-250.A = 16MB
  • CECH-250.B = 16MB
  • CECH-251.A = 16MB
  • CECH-251.B = 16MB

256MB = NAND, 16 = NOR. Follow Accordingly


Install OtherOS on HDD (for all PS3 models)[edit | edit source]

   All tools are here: http://gitbrew.org/~glevand/ps3/
    
   NOTICE: All my tools should beep. If you don't get beep during one of the steps below
           then stop doing anything and contact me. I will help.
           OtherOS++ support: irc.gitbrew.org (ssl) #otheros
    
   ALL PS3 MODELS ARE SUPPORTED !!!
    
    1. Install my latest CFW
    2. When installation is finished, reboot in Recovery Mode and choose "Restore PS3 System" (not the Backup/Restore in XMB)
    3. Now your GameOS should use only the half of your HDD
       (Currently working on a better approach)
    4. Run setup_flash_for_otheros.pkg (for all PS3 models)
    5. Reboot (It's important to shut down and turn on your PS3)
    6. Store dtbImage.ps3.bin on USB drive, plug it in and run install_otheros.pkg
       (NAND owners should use dtbImage.ps3.bin.minimal, rename it to dtbImage.ps3.bin).
       Try different USB ports if you don't get any beeps.
    7. Run boot_otheros.pkg
    8. Run reboot.pkg (use the package, not manually reboot!)
    9. You should be in petitboot now.
       Exit from CUI to shell or switch to another virtual console.
   10. Run script create_hdd_region.sh - rem to CHMOD 755
   11. Reboot and boot petitboot again
   12. You should see now new HDD device on petitboot, /dev/ps3dd.
       That's your OtherOS HDD region.
       Don't touch any other HDD regions if you don't know what you are doing. Use only ps3dd
       device for your Linux installation. Use parted to partition it and create GPT partition
       table on ps3dd. GPT is supported by both, Linux and FreeBSD.
    
   Be warned, if you damage your GameOS HDD region, GameOS will reformat HDD and
   remove your Linux HDD region in the process. You have to do the above steps again.
   Don't mess with GameOS HDD region and GameOS won't mess with your OtherOS HDD region.

For users who installed OtherOS on VFLASH region 7 previously[edit | edit source]

You have to restore your VFLASH before doing the above steps.
Be warned, this step is NOT for NAND owners.
1. Install my latest petitboot
2. Boot petitboot
3. Run script restore_vflash.sh
4. Reboot. GameOS should reformat your HDD again.

Partition the PS3 Drive[edit | edit source]

1. parted /dev/ps3dd
2. mklabel gpt
3. mkpart primary 0 2GB
4. print
5. mkpart primary 2GB (the rest of the hard drive here.)
6. quit.

In case you need it: full manual of Parted


You may now continue to Install Linux // (google-cache)




PS3:Linux[edit | edit source]

Example[edit | edit source]

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[edit | edit source]

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)[edit | edit source]

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)[edit | edit source]

  • Put petitboot on a memory stick
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
  • Boot into GameOS
    • XBM>Settings>System Settings>Other OS>
    • Settings>System Settings>Default System>Other OS>Yes


  • Boot into petitboot and load up a dvd with Fedora Core[2] on it :D


NAND 3.15 Notes before Tweaks

  • Your hdd is ps3da. Pay attention to the guide and substitude ps3dd with ps3da
  • Know which partitions are which and don't go mkswap'ing your root partition
  • Do not use hdd_access to configure your hdds
  • You must patch your kernel with glevand's patch / obtain a patched kernel in order to do certain things and compile certain tools.

Tweaks[edit | edit source]

  • umount /dev/ps3dd2
  • mkdir /mnt/fedora
  • mount /dev/ps3dd2 /mnt/fedora
  • nano /mnt/fedora/etc/yaboot.conf
    • rename "linux" to "Fedora"
    • remove UUID=* from arguments and save
    • NAND 3.15 ONLY:change boot from /dev/sdd (or whatever) to ps3da (or whichever drive yours shows up as, not the partition)
    • NAND 3.15 ONLY:add root=/dev/ps3da1
    • NAND 3.15 ONLY:Example yboot.conf[3]
  • nano /mnt/Fedora/etc/sudoers
    • append your user under root
    • If you cannot write to sudoers file:
      • chmod u+w /mnt/Fedora/etc/sudoers
      • edit
      • chmod 0440 /mnt/Fedora/etc/sudoers.
 
root     ALL=(ALL) ALL
snowy    ALL=(ALL) ALL
  • each time you boot in petitboot, press e on "Fedora" and change ps3da2 to ps3dd2 for both vmlinuz and ramdisk. (temporary)
    • Unless you followed the NAND 3.15 ONLY step previously.
  • when you boot into fedora for the first time, make the user (same as you did in sudoers) account now.
  • when prompted to login hit alt + ctrl + f1
  • log in
  • sudo su
  • nano /etc/udev/rules.d/10-ps3da1swap.rules
KERNEL=="ps3da1", ACTION=="add", RUN+="/sbin/mkswap /dev/ps3da1", RUN+="/sbin/swapon -p 1 /dev/ps3da1"
  • nano /etc/udev/rules.d/10-ps3vram.rules

# 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[edit | edit source]

### 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
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[edit | edit source]

  • Problem: You can't use network devices.
  • Reason: There is a fixed MAC address in this release that will work only for devices with that particular MAC.
  • Solution: Boot this system and then
    • Adjust your persistent net rules.
    • nano /etc/udev/rules.d/70-persistent-net.rules
    • For PHAT: wlan0 and eth0 are one device, so they have same MAC.
    • For SLIM: wlan0 and eth0 are two devices, so they have different MACs [NOT TESTED]
    • For both: if you're not using additional network cards, it's okay to remove wlan1 and eth1 entries.
    • reboot
  • Problem: You are stuck at boot, FC12 can't find root partition.
  • Reason: The old udev version installed needs devtmpfs mounted after the kernel decompress at boot to mount root partition.
  • Solution: Append a parameter to kexec, e.g.: kexec -l /tmp/petitboot/mnt/ps3dd2/boot/vmlinux-3.2.23 --append="root=/dev/ps3dd2 devtmpfs.mount=1"

Debian[edit | edit source]

Debootstrap HOWTO by glevand ([email protected])
-------------------------------------------------------

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

- Setting timezone

1. vi /etc/default/rcS
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
deb-src http://security.debian.org/ squeeze/updates main

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 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[edit | edit source]

Debootstrap HOWTO by glevand ([email protected]) 
(Redone by snowy)
(Updated by thom)
-------------------------------------------------------
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 and Vi are the preferred text editors

- 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

- Mounting partitions
if you want to use nano editor you will need to type "apt-get install nano" without quotes

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

- Setting timezone

1. 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://ports.ubuntu.com/ubuntu-ports/ lucid main restricted
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

OR (Use the following if you have trouble with above sources.)

deb http://ports.ubuntu.com/ubuntu-ports/ lucid main restricted
deb-src http://ftp.usf.edu/pub/ubuntu/ lucid main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-updates main restricted
deb-src http://ftp.usf.edu/pub/ubuntu/ lucid-updates main restricted
deb http://ports.ubuntu.com/ubuntu-ports/ lucid universe
deb-src http://ftp.usf.edu/pub/ubuntu/ lucid universe
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-updates universe
deb-src http://ftp.usf.edu/pub/ubuntu/ lucid-updates universe
deb http://ports.ubuntu.com/ubuntu-ports/ lucid multiverse
deb-src http://ftp.usf.edu/pub/ubuntu/ lucid multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-updates multiverse
deb-src http://ftp.usf.edu/pub/ubuntu/ lucid-updates multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-backports main restricted universe 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
deb http://ports.ubuntu.com/ubuntu-ports/ lucid-proposed restricted main multiverse universe


1. apt-get update

- Configuring locales and keyboard

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

- Finishing touches

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

- Installing kernel

1. cd /usr/src
2. git clone 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/
(After running ls /boot/, look for vmlinux... in this directory, and user it's fiel name in the next commmand.)
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
---------------------

Ubuntu=/boot/vmlinux-2.6.* root=/dev/ps3dd2
Ubuntu_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"
Another Way to get Ubuntu on you PS3
-----------------------------------------------
...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[edit | edit source]

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

Tools[edit | edit source]

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

Wireless[edit | edit source]

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

  • git and build ps3hvc utils
  • Download glevand's wlan script for your PS3 type: FAT/NAND[4] SLIM/VFlash[5]. You want this in the same directory ps3hvc-utils is in.
  • Take down current driver
    • sudo rrmod ps3_gelic
  • Run enable_wlan_on_*.sh
    • chmod +x enable_wlan_on*.sh
    • ./enable_wlan_on*.sh
  • Bring up new driver
    • sudo modprobe ps3_gelic
    • sudo /etc/init.d/networking restart
  • Test wireless card (by seeing available networks)
    • sudo iwlist scan

Enabling Wireless with the latest Linux kernel[edit | edit source]

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[edit | edit source]

  • PS3 SLIM models have a totally different WiFi, USB based
  • You have to compile your own kernel first if you haven't done it previously. Also make sure you enable wireless extensions. In my kernel config from GIT repo it's enabled by default.
  • Then clone my ps3-jupiter git repository and compile kernel modules: ps3_jupiter.ko and ps3_jupiter_sta.ko
  • Load both modules, first ps3_jupiter.ko and then ps3_jupiter_sta.ko
  • Install wireless-tools and wpa_supplicant
  • Configure wpa_supplicant
  • Run wpa_supplicant
  • Currently only STA mode (infrastructure) and WPA/WPA2 are supported

Useful links:

  • Debian WiFi HOWTO: [6]
  • Using wpa_supplicant on Debian/Ubuntu: [7]

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

  • Copy both modules to /lib/modules/`uname -r`/kernel/drivers/net
  • Run depmod -a as root
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[edit | edit source]

CURRENTLY ONLY TESTED ON 3.15OFW

  • Boot the SLES 11 SP 1 disc in otherOS
  • Highlight the install option and press 'e' to edit the entry
  • Edit the image= line so it says:
/tmp/petitboot/mnt/sr0/suseboot/linux64.gz
  • Change the append line to read the following:
video=ps3fb:mode:3 quiet sysrq=1 insmod=sym53c8xx insmod=ipr
  • boot this option
  • hit control-c when yast tries to start
  • select expert mode, then start shell
  • Enable ps3vram swap:
    • mkswap /dev/ps3vram; swapon /dev/ps3vram
    • if you happen to have any other swap partitions, mount them now
  • start the install from DVD and go through it normally.
  • Enjoy an actually up-to-date system that's IBM SDK compatible

Enabling Sound[edit | edit source]

Sound HOWTO by c4pt and durandal

  • Check to see that the sound driver is installed
    • 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
  • Connect the ps3 sound device to /dev/sound0
    • sudo ln -s /dev/snd/pcmC0D0p /dev/sound0
  • Add yourself to the audio group
    • sudo usermod -G audio <username>
  • Verify that the user was added
    • sudo id <username>
    • If your username shows audio as a group, move on to the next step
  • 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
  • Reboot the console
    • sudo reboot
  • Play an mp3 to test the sound with either
    • mpg123 <some_sound_file.mp3> OR
    • alsamixer <some_sound_file.mp3>


Cleaning up Errors[edit | edit source]

exim4[edit | edit source]

  • Error: IPv6 socket creation failed: No such file or directory
  • Solution: Edit "/etc/exim4/update-exim4.conf.conf" so that it has dc_local_interfaces='127.0.0.1' instead of dc_local_interfaces='127.0.0.1 ; ::'
  • Error: ALERT: exim paniclog /var/log/exim4/paniclog has non-zero size
  • Solution: rm -rf /var/log/exim4/paniclog

Kernel[edit | edit source]

  • Error: Make error 137 while compiling vmlinux.o
  • Solution: Activate/make a swap partition


plymouth[edit | edit source]

  • Error: You are receiving this error message as the new udevd in Ubuntu Lucid no longer supports mounting its own /dev mount point.
  • Solution:
    • Edit your fstab and add:
dev /dev tmpfs rw 0 0
  • Add noplymouth nosplash to your kernel options in /etc/kboot.conf. Example:
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[edit | edit source]

  • Error: perl: warning: Setting locale failed.
  • Solution:
    • Edit /etc/locale.gen and uncomment any Locales you want the OS to support.
    • Example:
en_US.UTF-8 UTF-8
  • Re-run dpkg-reconfigure locales (Select packages to install using the spacebar.)
  • Solution 2:
    • Define it yourself
    • Example:
localedef -v -c -i en_US -f UTF-8 en_US.UTF-8 

Hostname[edit | edit source]

  • Error: unable to resolve host (none) or something like it.
  • Solution:
    • Make sure your hostname is set in /etc/hostname and it doesn't have any spaces or symbols.
    • Edit /etc/hosts and add your hostname:
127.0.0.1    my-ps3-hostname

Enabling 7th SPU with the latest Linux kernel[edit | edit source]

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


Alternate precompiled Debian kernels[edit | edit source]

Origin: https://github.com/DirtyJerz/PS3-Debian-Kernels

install: dpkg -i ./*.deb
modify kboot.conf as needed
that is all.



FreeBSD OtherOS++[edit | edit source]

Crossreference: gitbrew.org::PS3:FreeBSD

FreeBSD can be run on PS3 Slim models from HDD with OtherOS++.

All the freebsd related files should be available here: http://gitbrew.org/~glevand/ps3/freebsd/


Cross-Compiling[edit | edit source]

You can skip this step and use my precompiled FreeBSD world and kernel: (World: [8]) / (Kernel: 480p[9] 720p[10] 1080p[11]) / (Loader: 480p[12] 720p[13] 1080p[14])

You need a running FreeBSD system to cross-compile your PS3 FreeBSD world and kernel, you don't need a PS3 for that, it may be a different architecture. Once this step is done and you have a running FreeBSD system on your PS3 , you can build FreeBSD world and kernel on PS3 itself.

# git clone git://git.gitbrew.org/ps3/ps3freebsd/freebsd.git
# cd freebsd
# make buildworld buildkernel installkernel installworld distribution TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=$HOME/ps3_world

When it's finished then you will have a complete FreeBSD world with kernel in directory $HOME/ps3_world.


Edited note: "I removed my git repo because there is no need currently. All my patches are officially in HEAD FreeBSD repository. Just use the official SVN repository or GIT mirrors. Here e.g. http://gitorious.org/freebsd"

Rebuilding Loader[edit | edit source]

If you want to recompile ONLY FreeBSD loader then after you finished compiling FreeBSD world and kernel, do this:

# cd freebsd
# make buildenv TARGET=powerpc TARGET_ARCH=powerpc64
# cd sys/boot
# make all install DESTDIR=$HOME/ps3_world

Rebuilding Kernel[edit | edit source]

If you want to recompile ONLY FreeBSD kernel then after you finished compiling FreeBSD world and kernel, do this:

# cd freebsd
# make buildkernel TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3
# make installkernel TARGET=powerpc TARGET_ARCH=powerpc64 KERNCONF=PS3 DESTDIR=$HOME/ps3_world

Installation[edit | edit source]

To install a FreeBSD world on your PS3, you will need a running Linux system first currently. Once i build a LiveCD for PS3 FreeBSD you won't need that anymore. I used Debian to install my FreeBSD on PS3.

First create UFS2 filesystem for your FreeBSD. I assume that there is already a free partition on the HDD of your PS3.

# apt-get install ufsutils
# mkfs.ufs /dev/ps3dd3

Then mount it on Debian and copy your PS3 FreeBSD world to this partition, like this:

# mount -t ufs -o ufstype=ufs2 /dev/ps3dd3 /mnt
# cd /mnt
# tar xvzf /root/ps3_freebsd_world.tar.gz
# cp /root/ps3_freebsd_kernel/kernel /mnt/boot/kernel/
# cp /root/ps3_freebsd_kernel/kernel.symbols /mnt/boot/kernel/
# cd
# umount /mnt

Booting[edit | edit source]

FreeBSD on PS3 is booted by the FreeBSD loader which can be executed by petitboot with kexec. The FreeBSD loader is built during cross-compiling of the FreeBSD world and kernel or you can use my precompiled version. It supports booting of FreeBSD from HDD. My precompiled version boots a FreeBSD kernel from ps3dd3. The HDD partition from which it boots a FreeBSD kernel is hardcoded, if you want to use another HDD partition then you have to change it in the loader and recompile it.

Store your FreeBSD loader on a Linux partition, i stored mine in Debian in /boot directory, and added a new kboot.conf entry on Linux, like this:

# cp /root/loader-1920x1080.ps3 /boot
# cat /etc/kboot.conf
...
...
...
freebsd_loader_hdd=/boot/loader-1920x1080.ps3
...
...
#
  • Latest FreeBSD loaders support booting from CD/DVD, so make sure you don't have any CD inserted into PS3 if you want to boot from HDD. Because the FreeBSD loader will always try to boot from CD first.

/etc/fstab[edit | edit source]

  • Make sure you set root device properly else FreeBSD kernel won't be able to mount it
  • You can reuse Linux swap partition on FreeBSD.
/dev/ps3disk3p3         /       ufs     rw      1 1
/dev/ps3disk3p1         none    swap    sw      0 0
proc                    /proc   procfs  rw      0 0

/boot/loader.conf[edit | edit source]

  • You can tell FreeBSD loader which kernel to load at boot time
autoboot_delay="-1"
kernel="/boot/kernel"
#kernel="/boot/kernel_test"

/etc/rc.conf[edit | edit source]

hostname="freebsd-hdd"

ifconfig_glc0="SYNCDHCP"    # for DHCP

Now you can boot your PS3 FreeBSD. Boot petitboot first and choose FreeBSD loader in CUI.

Once, you have a running PS3 FreeBSD system, you can build FreeBSD world and kernel or compile ports on your PS3 itself.

One of the advantages of FreeBSD on PS3 is write access to the GameOS HDD region and the possibility to create valid GameOS HDD partitions.

Ports[edit | edit source]

Ports allow us to install many useful programs on your FreeBSD.

Extracting ports:

# cd /root
# fetch ftp://ftp7.freebsd.org/pub/FreeBSD/ports/ports-stable/ports.tar.gz
# cd /usr
# tar xvzf /root/ports.tar.gz

Useful programs you will need first:

  • wget
  • git
  • screen
  • sudo
  • elinks

Live CD[edit | edit source]

Compiling World[edit | edit source]

  • Change screen resolution in loader and kernel before compiling
  • Change frame buffer size in kernel if needed
# cd /usr
# git clone git://git.gitbrew.org/ps3/ps3freebsd/freebsd.git src
# cd src
# make buildworld buildkernel installkernel installworld distribution TARGET=powerpc TARGET_ARCH=powerpc64 \
       KERNCONF=PS3 DESTDIR=/root/ps3_world

Compiling Ports[edit | edit source]

# cd /root/ps3_world/usr
# fetch ftp://ftp7.freebsd.org/pub/FreeBSD/ports/ports-stable/ports.tar.gz
# tar xvzf ports.tar.gz
# mount -t devfs devfs /root/ps3_world/dev
# cp /etc/resolv.conf /root/ps3_world/etc/
# chroot /root/ps3_world /bin/csh
# cd /usr/ports
# cd shells/bash
# make install clean BATCH=yes

Configuring System[edit | edit source]

/boot/loader.conf[edit | edit source]

boot_cdrom="YES"

autoboot_delay="-1"

/etc/rc.conf[edit | edit source]

root_rw_mount="NO"

hostname="freebsd-livecd"

ifconfig_glc0="SYNCDHCP"

keyrate="fast"
keymap="us.iso"
#keymap="fr.iso"
#keymap="german.iso"
scrnmap="NO"
font8x16="iso15-8x16"
font8x14="iso15-8x14"
font8x8="iso15-8x8"

update_motd="NO"
syslogd_enable="NO"
newsyslog_enable="NO"
cron_enable="NO"
hostid_enable="NO"

sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

cleanvar_enable="NO"
crashinfo_enable="NO"
virecover_enable="NO"

/etc/fstab[edit | edit source]

/dev/cd0        /       cd9660  ro      0       0

Changing Login Shell[edit | edit source]

# chroot ps3_world
# chsh

Creating ISO Image[edit | edit source]

  • Exit chroot
# umount /root/ps3_world/dev
# cd ps3_world
# rm -f etc/resolv.conf
# mkisofs -R -l -ldots -allow-lowercase -allow-multidot \
   -V 'PS3 FreeBSD LiveCD' -volset 'PS3 FreeBSD' -hide boot.catalog \
   -o ../freebsd_livecd.iso .

Booting Live CD with OtherOS++[edit | edit source]

Use CUI or

boot FreeBSD loader from petitboot manually:

# First mount CD if it's not mounted already

# kexec -l /mnt/cdrom/boot/loader.ps3 (or loader-720x480.ps3 or loader-1280x720.ps3)
# reboot

Installing FreeBSD on HDD from Live CD[edit | edit source]

installing freebsd 9.0 beta 2 to the hard drive by c4pt

step 1 download and burn the freebsd 9.0 beta 2 iso for ppc64 you can get it from here

ftp://ftp.freebsd.org/pub/FreeBSD/releases/powerpc/powerpc64/ISO-IMAGES/9.0/FreeBSD-9.0-BETA3-powerpc64-release.iso

step 2 remove all your partitions on your internal drive and make the drive gpt

boot into petitboot

##umount /dev/ps3dd1
##umount /dev/ps3dd2
##umount /dev/ps3dd
## using parted will delete any linux partition on ps3dd


##parted /dev/ps3dd
##mklabel GPT
##mkpart ext2 1 158000M                  (158000M here is 158G on my drive if you have 320G you would enter 320000M)
##p
##q
##umount /dev/sr0

##mount /dev/sr0 /mnt
##cd /mnt/boot
##ps3-video-mode -2

##kexec -l loader.ps3
##reboot

when the freebsd dmesg boots you are going to get to a mountroot> prompt this is normal because freebsd is trying to load the cd from acd0 which doesnt exist so we have to tell the mountroot> prompt /dev/cd0 which is our sr0 or cdrom drive with the burned iso on disk

##mountroot>cd9660:/dev/cd0 ro       (hit enter here)

this will continue to load the freebsd 9.0 beta 2 disc

once in the installer make sure you only format and partition ps3disk3 this is important you dont want to write to gameos or another partition this guide is assuming you are using ps3dd as your linux or freebsd drive and that you are *NOT* using vflash for ps3vflashh partition the disk and on my setup i am using a 154G root and and 4G swap (you can select auto on ps3disk3 and it should setup a swap and root for you) then select whatever you want to install , base , src , ports, doc this is important if you burned the iso you should have done a slow burn for some reason if any of these things fail the checksum test you need to run the installer again and not select anything that failed in order to continue with the installation for me ports.txz and src.txz failed so i could only select base.txz doc.txz and a couple of others then the install finished properly after installing the .txz's files setup your networking and root and user password eventually you will setup everything in the installer accordingly and you will be presented with a 3 choice options (installer) (livecd)

choose livecd

you should drop to a prompt and type

shutdown -h now

that takes care of the install but now how to boot the install?

reboot the ps3 after shutdown -h now is completely done it should say press a key to reboot when it is done

go into petitboot or telnet to petitboot whatever you want to do

then type

##umount /dev/ps3dd
##umount /dev/ps3dd1
##ps3-video-mode -m 2
##mount -t ufs -o ufstype=ufs2,rw /dev/ps3dd1 /mnt
##cd /mnt/boot

##kexec -l loader.ps3
##reboot

and you should now be in 480p booting the freebsd install from the hard drive


some side notes (the installer will only boot in 480i or 480p that is why we use ps3-video-mode also the loader.ps3 and kernel can be fixed to 1920x1080p using glevand's loader.ps3 and glevand's kernel, you can still use glevand's freebsd work on the kernel and loader sources once in the freebsd install on the hard drive it is recommended to setup networking and install ports to /usr/ports in order to boot the from the hard drive you have to run the last 5 commands from the guide or 6 commands if you havent't fixed loader.ps3) also note that /usr/sbin/sysinstall will not install freebsd to the hard drive since the partition utility does not work with /usr/sbin/sysinstall

##ps3-video-mode -m 2  (sets the screen to 480p for the stock loader.ps3 file)
##umount /dev/ps3dd
##umount /dev/ps3dd1
##mount -t ufs -o ufstype=ufs2,rw /dev/ps3dd1 /mnt
##kexec -l /mnt/boot/loader.ps3
##reboot

Links[edit | edit source]

FreeBSD Handbook: [15]

FreeBSD AvgLiveCD: [16]

FreeBSD LiveCD: [17]

Gitorious - FreeBSD Wiki: [18]

Setting Up A new FreeBSD System: [19]


FreeBSD Development[edit | edit source]

Crossreference: gitbrew.org::FreeBSD Development


Get in touch with me if you want to help with FreeBSD development because there are only 2 developers currently working on FreeBSD PS3 support :(

Till now 0 applications :( Date: 09/20/2011

TODO List[edit | edit source]

  • VUART support in bootloader
  • VUART support in kernel (work in progress)
  • System Manager, AV and Dispatcher Manager support in kernel (work in progress)
  • UDF support for BD movies
  • RSX driver
  • Sound driver
  • Use CAM framework for HDD driver like in Blu-Ray driver
  • FLASH/VFLASH drivers (work in progress)
  • WiFi driver (work in progress)

VUART (Bootloader)[edit | edit source]

  • Should be very simple
  • Implement common ps3vuart interface which can be used by VUART port drivers
  • Implement AV VUART only for now in order to be able to read screen size

VUART (Kernel)[edit | edit source]

  • What existing kernel framework to use or create a new one ??? Maybe UART framework. UART framework is NOT suitable !!!
  • Implement ps3vuart_bus.c module which handles VUART interrupts and distributes events to VUART port drivers. ps3vuart_bus should be the child of nexus.
  • Each VUART port is a child of ps3vuart_bus module.
  • Use siis driver as an example how to implement device children.
  • http://fxr.watson.org/fxr/source/dev/siis/siis.c
  • VUART port drivers for: System Manager, AV and Dispatcher Manager
  • What is the best way to provide access for user space applications ??? Create character devices for each VUART port. But how to synchronize kernel/user space accesses ?
  • Provide IOCTL interface for all VUART ports

WLAN[edit | edit source]

RSX[edit | edit source]

  • I decided to implement RSX driver for FreeBSD first and then for Linux (sorry Linux fans), not because i don't like Linux but because FreeBSD has no X11 driver and it will be easier to test.
  • FreeBSD DRM framework supports PCI devices only currently :-( Platform devices are NOT supported by FreeBSD's DRM framework.
  • No choice as to use kernel module with my own user space interface. Yeah, hate me kernel developers, i know, it's ugly but NVIDIA does it too (/dev/nvidia, /dev/nvidiactl and nvidia.ko).

DRM Device File[edit | edit source]

  • On FreeBSD, it's cdev.
  • si_drv1 points to struct drm_device

Memory[edit | edit source]

  • There are several types of memory: VRAM (video RAM or memory on GPU), GART (system memory mapped into GPU address space) and CPU (system memory but NOT mapped into GPU address space)
  • Implement memory heap managers
  • Radeon driver is a good example how to manage VRAM and GART memory heaps. The user specifies memory type, alignment and size. The driver returns the offset of allocated memory region to user. The offset is the handle of allocated memory block.
  • http://fxr.watson.org/fxr/source/dev/drm/radeon_mem.c
  • Radeon driver supports memory types: VRAM and GART
  • Nouveau driver supports memory types: VRAM, GART and CPU
  • mmap syscall is used to map memory buffers into user-space. offset passed to mmap syscall is the handle of a memory map created previously with IOCTL DRM_IOCTL_ADDMAP. The handle is returned to user from IOCTL that creates the map.
  • http://fxr.watson.org/fxr/source/dev/drm/drm_vm.c
  • drmMap just calls mmap syscall and passes map handle as offset.
  • Interesting discussion about DRM map handles: http://comments.gmane.org/gmane.comp.video.dri.devel/19657
  • FreeBSD DRM framework uses alloc_unr to allocate unique map handles

FLASH/VFLASH[edit | edit source]

  • Use CAM framework to implement flash drivers, it has more advantages over block device drivers
  • The drivers are very similar to CDROM driver but they should handle ATA IO commands and SCSI like ps3cdrom driver
  • Kernel modules: ps3flash for FLASH/VFLASH and ps3nflash for NOR flash only

Links[edit | edit source]

  • The Design and Implementation of the FreeBSD SCSI Subsystem: [20]
  • Writing a CAM SCSI controller driver: [21]
  • FreeBSD Kernel Reference: [22]
  • UDF 2.6: [23]
  • The VFS/VNODE interface in the FreeBSD kernel: [24]
  • FreeBSD DRI: [25]
  • FreeBSD Device Drivers: [26]
  • FreeBSD Kernel Modules: [27] [28]
  • NEWBUS Intro: [29]
  • Character Driver: [30] [31]
  • NVIDIA Kernel Interface: [32]

Cellminer[edit | edit source]

Auto Installer[edit | edit source]

Debian: http://git.gitbrew.org/~stackable/script/cellminer-run-ONCE-to-install.sh

Git repository[edit | edit source]

https://github.com/verement/cellminer




PS3:Tools[edit | edit source]

General[edit | edit source]

To ease compilation and finding libraries (which will prevent you from having to edit every Makefile):

  • sudo ln -s /usr/src/linux-2.6/include/* /usr/local/include/

Development[edit | edit source]

Dependencies[edit | edit source]

Almost all tools require git make libc libc-dev libc6-dev-ppc64

  • sudo apt-get install git make libc libc-dev libc6-dev-ppc64

For Debian Squeeze (and possibly other Distros as well?)

  • sudo apt-get install git make libc6 libc6-dev libc6-dev-ppc64 libX11-dev

python[edit | edit source]

  • aptitude install python python-pytools
    • this installs python and pyopencl

Enable RSX RAM as SWAP[edit | edit source]

  • sudo su -
  • swapon -s
    • Check current SWAP
  • mkswap /dev/ps3vram
  • swapon /dev/ps3vram
  • vim /etc/udev/rules.d/10-ps3vram-swap.rules
# 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"
  • reboot
  • sudo swapon -s
    • Verify additional SWAP space

Notes[edit | edit source]

Higher priority means the system will use that SWAP sooner than lower priority SWAP. You want RSX RAM to have highest priority.


OpenSSL for ppc64[edit | edit source]

Check and make sure you're getting the latest source of OpenSSL[33]

Installation[edit | edit source]

  • wget http://www.openssl.org/source/openssl-1.0.0d.tar.gz
  • tar -xvzf openssl*.tar.gz
  • cd openssl*
  • vim Makefile or see 'General' section
    • You need to add this option to the end of the CFLAGS option list: -I/usr/src/linux-2.6/include
  • ./Configure linux-ppc64
  • make
  • make test
  • sudo make install

Notes[edit | edit source]

  • Modification of header files is needed for non-current kernels.


ps3dm-utils[edit | edit source]

Dependencies[edit | edit source]

Installation[edit | edit source]

  • git clone git://git.gitbrew.org/ps3/ps3linux/ps3dm-utils.git
  • cd ps3dm-utils/
  • sudo cp /usr/src/linux-2.6/arch/powerpc/include/asm/ps3dmproxy.h /usr/include/asm/
  • vim Makefile
    • Append -L /usr/local/ssl/include -L /usr/local/ssl/lib -ldl to the end of LDFLAGS
  • make

Attention: With the latest version of ps3dm-utils you don't need OpenSSL anymore !!!

Notes[edit | edit source]

  • ps3dm-utils requires DEVICE to get information from. Normally, /dev/ps3dmproxy is used.
    • If /dev/ps3dmproxy does not exist: sudo modprobe ps3dmproxy


IBM Cell SDK 3.1[edit | edit source]

This works only on Debian & Ubuntu on PS3 All Tools need download form ibmsdk31.tar.gz

Installation[edit | edit source]

wget -r -H -A.tar.gz http://www.multiupload.com/T6IFLL5SGD
mv */*/*/ibmsdk31.tar.gz ./
rm *multiupload.com* -rf
tar -xvzf ibmsdk31.tar.gz
cd deb/
dpkg -i openrpm/*.deb
dpkg -i devel/*.deb
dpkg -i extra/*.deb

Some of these packages have a newer version, You may want to hold (keep back) these packages:

echo ppu-gcc hold | sudo dpkg --set-selections
echo spu-gcc hold | sudo dpkg --set-selections

Java 6 IBM[edit | edit source]

Download from: http://goo.gl/ngV0b

mkdir /opt/ibm/java-ppc64-60/
cd /opt/ibm/java-ppc64-60/

Put ibm-java-sdk-6.0-5.0-linux-ppc64.tgz in /opt/ibm/java-ppc64-60/

tar -zxvf ibm-java-sdk-6.0-5.0-linux-ppc64.tgz
chcon -R -t texrel_shlib_t /opt/ibm/java-ppc64-60/jre
chcon -R -t texrel_shlib_t /opt/ibm/java-ppc64-60/bin
chcon -R -t texrel_shlib_t /opt/ibm/java-ppc64-60/lib


ps3mfw[edit | edit source]

Dependencies[edit | edit source]

Installation[edit | edit source]

Read up on any notes on any experimental options/tasks you shouldn't be using. Ask in #otheros if you are unsure.

You should be able to run the program with ./ps3mfw --gui "false"