© 2008 Sony Computer Entertainment Inc.
© 2006,2007,2008 Sony Corporation
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
DISCLAIMER
THIS
DOCUMENT IS
PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO
REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE
DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF
SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS
WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL
DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE OR
IMPLEMENTATION OF THE CONTENTS THEREOF.
TRADEMARK NOTICE
"PLAYSTATION" and "PS3" are registered trademarks of Sony Computer
Entertainment Inc. "Cell Broadband Engine" is a trademark of
Sony Computer Entertainment Inc. Linux® is the registered
trademark of Linus Torvalds in the U.S. and other countries.
Other company, product and service names
may be registered trademarks, trademarks or service marks of others.
As a hint of enabling your own distribution, we’ll show how to install existing free Linux distribution for PPC64. We’ll explain this using with Fedora Core 6 as an example.
This section shows how to install Fedora Core 6 on a PS3.
To install Fedora Core 6 on a PS3, you have to execute following steps.
For the person who have installed FC5 according to Distro Kit v1.1, install procedure described in this material will over writes and erase entire HDD with FC6.
Format
Memory Stick
Format SD Memory Card
Format CompactFlash
Format Hard Disk
To allocate a Linux partition on the Hard Disk, select "Format Hard Disk".
Do you want to format the hard disk?
Yes No
Select a partition setting for the hard disk.
Use
All for the PS3 System
Custom
To
allocate a Linux partition on the Hard Disk, select "Custom".
After selecting "Custom", following messages are displayed.
Select a partition setting for the hard disk.
Use
All for the PS3 System
Allot 10GB to the Other OS
Allot 10GB to the PS3 System
To allocate a Linux partition on the Hard Disk, select one of following items.
Allot
10GB to the Other OS
Allot 10GB to the PS3 System
If your hard disk size is 20GB, you have to select 'Allot 10GB to the Other OS'.
Select the hard disk format method.
Quick
Format
Full Format
If
you format, all data will be deleted.
This data cannot be restored.
Are you sure you want to continue?
Yes No
Format
Complete.
Press the X button to restart the system.
After pressing the X button, restart the system software and you can see GameOS menu.
The following installer items were found:
Title
/PS3/otheros/otheros.bld
Location Disc
Start
If the system cannot find Other OS image, following message is displayed.
No applicable installer was found.
If you see above message, please confirm the data on your CD.
After the system found Other OS image and you select 'Start', install process is started.
Install
completed.
To start another system, go to [Settings] >
[System Settings] >
[Default System] and set to [Other
OS]. Then restart the system.
After pressing the O button, you can see the XMB menu
To start kboot, you have to change the default system to boot.
PS3
Other OS
Do
you want to quit the PS3 system and start the other system
now?
Yes
No
After selecting 'Yes', kboot is automatically started.
kboot: install
Starting PS3 Linux installer
1) ps3da
Select device to install?
There is one built-in hard disk drive in the PS3.
After initializing boot loader, this drive is recognized as 'ps3da'.
If you connected external USB hard disk drives with the PS3, these drives
are recognized as scsi devices. And you can see see the following messages.
Starting PS3 Linux installer
1) ps3da
2) sda
Select device to install?
You
can select one of the hard disk drive for install. In this document, we assume that
Linux is installed on the built-in hard disk drive(= ps3da).
Please
insert Fedora Core install DVD.
Is it OK? (y/n):
1)
Fedora Core 6 minimum install
2) Fedora Core 6 full install
Select install system?
You can select one of them.
Caution!!
All data in /dev/ps3da are removed.
Is it OK? (y/n):
HDD is initialized as follows.
Partition id | Size | Type | Label |
1 | Max size - 512MB | Linux | /1 |
2 | 512 MB | swap | SWAP-ps3da2 |
Please
insert a PS3 Linux Distributor's Starter Kit CD.
Is it OK? (y/n)
Install done.
Please type any key to restart :
Fedora
Core release 6 (Zod)
Kernel 2.6.24 on an ppc64
localhost login:
default=install
root=/dev/sr0
install='/boot/vmlinux initrd=/boot/initrd.bin video=safe'
This section shows
an
internal structure of install-fc script. This scripts install the Fedora Core 6
files to the hard disk drive connected with a PS3.
1) Check command arguments.
2) Check Hard Disk size. If disk size is smaller then 9GB, you can not install linux.
3) Calculate disk partition size.
4) Disable screen saver.
5) Synchronize a linux clock with a game clock.
GAMETIME=`/sbin/ps3-flash-util -s | grep 'p\.rtc_diff' | grep -o '[0-9]*$'
/sbin/ps3-flash-util -F
/sbin/ps3-flash-util -D 2 1 ${GAMETIME}
hwclock -s
6) Mount Fedora Core install DVD and copy stage2.img file to ramdisk.
7) Mount stage2.img file and create install environment.
8) Select either 'minimum' install or 'full' install.
9) Delete All partitions on the Hard Disk.
10) Create Linux and swap partition on the Hard Disk.
11) Mount Linux and swap partition.
12) Create some configuration files.
/etc/fstabLABEL=/1
/
ext3 defaults 1 1
/dev/devpts /dev/pts
devpts gid=5,mode=620 0 0
/dev/shm
/dev/shm tmpfs defaults 0 0
none
/spu
spufs defaults 0
0
/dev/proc
/proc proc
defaults 0 0
/dev/sys
/sys
sysfs defaults 0 0
LABEL=SWAP-ps3da2
swap
swap defaults 0 0
/etc/sysconfig/keyboard
KEYTABLE="us"
/etc/sysconfig/i18nLANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
hvc0
/etc/sysconfig/networkNETWORKING=yes
HOSTNAME=localhost.localdomain
#
Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
USEWINBINDAUTH=no
USEHESIOD=no
USESYSNETAUTH=no
USEKERBEROS=no
USESHADOW=yes
USESMBAUTH=no
USELDAPAUTH=no
USELOCAUTHORIZE=no
USEWINBIND=no
USEDB=no
USEPASSWDQC=no
USEMD5=yes
USELDAP=no
USECRACKLIB=yes
USENIS=no
13) Initialize RPM database.
14) Install Fedora Core 6 RPM on the Hard Disk.
15) Remove old RPM on the Hard Disk.
16) Eject Fedora Core install DVD.
17) Mount PS3 Linux Distributor's Starter Kit CD.
18) Install some PS3 specific RPMs.
19) Create and change some configuration files for PS3.
/etc/kboot.confdefault=linux
timeout=10
root=LABEL=/1
safe='/boot/vmlinux-$KERNELVER initrd=/boot/initrd.img-$KERNELVER video=safe'
linux='/boot/vmlinux-$KERNELVER initrd=/boot/initrd.img-$KERNELVER '
ZONE="Asia/Tokyo"
UTC=true
ARC=false
cp /usr/share/zoneinfo/Japan /etc/localtime
/etc/sysconfig/modules/ps3pf.modules#!/bin/sh
for i in snd_ps3pf;do
modprobe \$i >/dev/null
2>&1
done
PS3 sound configuration
/etc/rpm/platformppc64-redhat-linux
/etc/rpm/macros%_transaction_color 3
/etc/modprobe.confalias
scsi_hostadapter ps3disk
alias scsi_hostadapter1 ps3rom
alias scsi_hostadapter2 ps3flash
alias usb-controller ehci-hcd
alias usb-controller1 ohci-hcd
You should use xorg.conf file for virtual frame buffer
/etc/init.d/kudzudisable X configuration
20) Unmount all partitions
21) Eject PS3 Linux Distributor's Starter Kit CD.
22) Remove work files.
To address the problem that the device name of an USB storage device cannot uniquely identify the device, kboot and Linux commands identify file systems by their labels instead of their device names. The labeling convention is as follows:
Mount Directory | Label Name |
/ | / |
/boot | /usr |
/var | /var |
/home | /home |
/tmp | /tmp |
There are some ways to label a file system.
To put a "/" label on a partition to be named "ps3da1":
ext2, ext3)
# mke2fs -j -L / /dev/ps3da1
xfs)
# mkfs.xfs -L / /dev/ps3da1
reiserfs)
# mkreiserfs -l / /dev/ps3da1
FAT)
# mkfs.vfat -n / /dev/ps3da1
(Note) The number of characters for a label specified with mkfs.vfat must be 11 or less.
swap)
# mkswap -L SWAP /dev/ps3da2
To put a "/" label on an existing partition named "ps3da1":
ext2, ext3)
# e2label /dev/ps3da1 /
xfs)
# xfs_admin -L / /dev/ps3da1
reiserfs)
# reiserfstune -l / /dev/ps3da1
Some of the commands may also be used to display the current file system label.
ext2, ext3)
# e2label /dev/ps3da1
xfs)
# xfs_admin -l /dev/ps3da1
The following labelling procedure assumes that the built-in HDD is seen as /dev/ps3da1.
First, initialize /dev/sda1 with ext3 adding a "/" label.
# mke2fs -j -L / /dev/ps3da1
/etc/fstab
At startup of Linux, file systems are mounted according to /etc/fstab.
To address the problem that the device name of an USB storage device cannot uniquely identify the device, a storage device must be identified with its label instead of the device name in the /etc/fstab file.
Usual
/dev/ps3da1 / ext3
defaults
1 1
/dev/devpts
/dev/pts devpts gid=5,mode=620
0 0
/dev/shm /dev/shm tmpfs
defaults
0 0
none
/spu spufs
defaults
0 0
/dev/proc
/proc proc defaults
0 0
/dev/sys /sys sysfs
defaults
0 0
/dev/ps3da2 swap swap
defaults
0 0
With labels used
LABEL=/1
/
ext3 defaults
1 1
/dev/devpts /dev/pts
devpts gid=5,mode=620 0 0
/dev/shm
/dev/shm tmpfs defaults
0 0
none
/spu
spufs defaults
0
0
/dev/proc
/proc proc
defaults 0 0
/dev/sys
/sys
sysfs defaults
0 0
LABEL=SWAP-ps3da2
swap
swap defaults
0 0
/etc/blkid.tab
This file acts as cache for mapping between labels/UUIDs and device names. This file should be removed when a device name is changed to avoid the use of the old cache file for the mapping.
# rm /etc/blkid/blkid.tab
The kernel and intrd should be placed in /boot with the file names specified in kboot.conf. The initrd must contain modules necessary to mount the root partition. See man mkintrd for details. This release includes a bootloader/initrd.img file, which is created in the environment described below.
Generation Environment
- Kernel: the one included in kernel-2.6.24-20080131.ppc64.rpm
- Root partition: ext3 file system
- Contents of /etc/modprobe.conf:
alias
scsi_hostadapter ps3disk
alias
scsi_hostadapter1 ps3rom
alias scsi_hostadapter2 ps3flash
alias usb-controller ehci-hcd
alias usb-controller1 ohci-hcd
- Command executed to generate the image
# /sbin/mkinitrd --preload=ps3disk --preload=ps3rom --preload=ps3flash --with-usb initrd.img-2.6.24 2.6.24
# tar jxf kboot-YYYYMMDD.tar.bz2
# cd kboot-YYYYMMDD
# yes "" | make
# cd kboot-11
# ls -l otheros.bld
-rw-r--r-- 1 root root 2416930 Jun 28 16:20 otheros.bld
1.7 | Mar 25 2008 | Correct kboot build command |
1.6 | Feb 1 2008 | Update PS3 System software version for PS3 Linux |
1.5 | Oct 26 2007 | Update PS3 System software version for PS3 Linux |
1.4 | Aug 17 2007 | Change built-in HDD device name. Update kboot kernel version |
1.3 | Apr 25 2007 | Support PS3 System Software 1.60. Update to Fedora Core 6 |
1.1 | Dec 8 2006 | Added "Revision History" and "About This Document" |
1.0 | Nov 11 2006 | Initial Revision |