Copyright
©
2006 Sony Computer Entertainment Inc.
Copyright ©
2006 Sony Corp.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version 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.
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 5 as an example.
This section shows how to install Fedora Core 5 on a PS3.
To install Fedora Core 5 on a PS3, you have to execute following steps.
Format
Memory Stick
Format SD Memory Card
Format CompackFlash
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
If
you format, all data on the hard disk will be deleted.
This data cannot be restored.
Are you sure you want to continue?
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'.
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.self
Location USB Device
OK
Note: Path name of Other OS installer and Location information may vary according to your environment.
If the system cannot find Other OS installer, following message is displayed.
No applicable installer was found.
If you see above message, please confirm the data on your flash memory device.
After the system found Other OS installer and you select 'OK', following messages are displayed.
Press
the X button to start the installer.
The screen will temporarily go blank. Please wait until the installer
starts.
Press the X button to start the installer.
To start kboot, you have to change the default system to boot.
PS3
Other OS
Select 'Other OS'.
Turn
off the controller.
Turn off the system.
Select 'Turn off the system'.
You
can select only DVD install.
There is one Hard Disk Drive in the PS3.
After initializing boot loader, one HDD is recognized as follows.
You select 'sda' HDD for install.
DVD install
kboot: install-fc sda
After executing installer, you can see following message.
Please insert Fedore Core install DVD.
Is it OK? (y/n):
After you finish preparing, type 'y'.
1)
Fedora Core minimum install
2) Fedore Core full install"
Select install system?
You select one of them.
Next you can see following message. If you can save the data on HDD, you have to backup them to another device.
Caution!!.
All data in /dev/sda are removed.
Is it OK? (y/n):
To start Fedora Core 5 install, type 'y'.
HDD is initialized as follows.
Partition id | Size | Type | Label |
1 | Max size - 512MB | Linux | / |
2 | 512 MB | swap | SWAP |
After Fedora Core 5 install, Fedora Core 5 install DVD is automatically ejected. Next you can see following messages.
Please
insert a Addon Packages CD.
Is it OK? (y/n)
You insert a Addon Packages CD, type 'y'. Then additional packages are installed.
After Addon Packages install, Addon Packages CD is automatically ejected. And you can see following messages.
Install done.
Type reboot to start Linux or type halt to power off
3) To start Linux, type 'reboot'.
4) You can see Linux messages.
Fedora
Core release 5 (Bordeaux)
Kernel 2.6.16 on an ppc64
localhost login:
After initializing Linux, you log in as root.
localhost
login: root
Password:
Last login: Fri Aug 18 10:09:49 on tty1
[root@localhost ~] #
After you log in, you can execute Linux command.
When you want to log out the Linux, you execute 'logout' command.
[root@localhost ~] # logout
First, you have to make a directory for mount.
[root@localhost ~] # mkdir /mnt/cdrom
After inserting a media to the drive, you execute following command.
[root@localhost
~] # mount /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@localhost ~] # ls /mnt/cdrom
boot doc etc target
If you mount a Fedora Core 5 install DVD, you can use a yum command.
[root@localhost ~] # yum install hogehoge.ppc.rpm
When you want to eject the media, you execute 'eject' command.
[root@localhost ~] # eject
When you want to change from Linux mode to Game OS mode, you execute 'boot-game-os' command.
[root@localhost ~] # boot-game-os
When you want to change from Game OS mode to Linux mode, please refer 3.3.
This section describes the usage of kboot.
Kboot is a Linux boot loader based on kexec. You can load and exec another Linux kernel on the Linux kernel.
Kboot supports the following functions:
You can boot Linux by kboot, which does the following:
Reads in some device driver modules and performs initialization. During the initialization process it waits for a response from each device for 15 seconds. A device that does not respond within this period is ignored.
The udev mechanism creates device files.
First, kboot sends DHCP request to the network. If a DHCP timeout occurs, network is set as follows:
ipv4_addr="192.168.0.10"
ipv4_netmask="255.255.255.0"
ipv4_default=""
ipv4_nameserver=""
dns_domain=""
If the filename parameter is specified from the DHCP server, kboot initializes NFS boot as follows:
E.g. dhcpd.conf
host ps3-1 {
hardware
ethernet 00:13:A9:XX:YY:ZZ;
fixed-address 192.168.0.20;
option root-path "192.168.0.30:/tftpboot/linux";
next-server 192.168.0.30;
filename "/linux/boot/vmlinux-nfs";
}
NFS boot configuration is written in /etc/kboot.conf.
default=nfsboot
timeout=10
root=/dev/nfs
nfsboot='tftp://$next-server$filename ip=on
nfsroot=$nfshost:$path
root=/dev/nfs '
The kboot bootloader searches for file systems to be mounted on '/' in the following order:
Supported file systems are as follows:
vfat, ext3, ext2, udf, iso9660
After mounting the file system, etc/kboot.conf, etc/fstab, etc/hosts on the mounted file systems are copied to the /etc/kboot.conf, /etc/fstab, and /etc/hosts on the kboot RAM disk.
See the next section, "How to Use kboot", for details.
kboot:
After
starting, kboot displays its prompt on the system console.
If a timeout is set, a key producing input (e.g., [Space], a
letter, [Del], etc., but not [Shift], [Alt], and such) must be
pressed in time to keep kboot from automatically proceeding with
the default.
A kernel is booted by specifying its name, followed by any
arguments that should be passed on the boot command line.
The kernel name can have the following forms:
kboot recognizes the following "internal" commands:
Any other command is handed to the shell for execution. In particular, a shell with command-line editing and file name completion can be be obtained by simply typing "sh".
When the kboot starts, it looks for a file kboot.conf, which contains variable assignments. The syntax is the same as in shell scripts. (In fact, kboot.conf is a shell script.) The following variables have a special meaning:
Any other variables define a command line, which is expanded when the variable name (which we then call a "label") is entered as a command at the kboot prompt.
Example:
b26131="/boot/vmlinux root=/dev/sda7"
With this defined, "b26131 init=/bin/sh" will be expanded as follows:
/boot/vmlinux root=/dev/sda7 init=/bin/sh
You can specify a following special boot parameter on the PS3.
<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
kboot.conf sample is as follows.
default=linux
timeout=10
root="LABEL=/"
linux="/boot/vmlinux-2.6.16
initrd=/boot/initrd.img video=ps3fb:mode:3"
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 "sda1":
ext2, ext3)
# mke2fs -j -L / /dev/sda1
xfs)
# mkfs.xfs -L / /dev/sda1
reiserfs)
# mkreiserfs -l / /dev/sda1
FAT)
# mkfs.vfat -n / /dev/sda1
(Note) The number of characters for a label specified with mkfs.vfat must be 11 or less.
swap)
# mkswap -L SWAP /dev/sda2
To put a "/" label on an existing partition named "sda1":
ext2, ext3)
# e2label /dev/sda1 /
xfs)
# xfs_admin -L / /dev/sda1
reiserfs)
# reiserfstune -l / /dev/sda1
Some of the commands may also be used to display the current file system label.
ext2, ext3)
# e2label /dev/sda1
xfs)
# xfs_admin -l /dev/sda1
The following labeing procedure assumes that the built-in HDD is seen as /dev/sda1.
First, initialize /dev/sda1 with ext3 adding a "/" label.
# mke2fs -j -L / /dev/sda1
/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/sda1 / 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/sdb2 swap swap
defaults
0 0
With labels used
LABEL=/
/
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
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.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.16-20061108.ppc64.rpm
- Root partition: ext3 file system
- Contents of /etc/modprobe.conf:
alias
scsi_hostadapter ps3pf_storage
alias usb-controller ehci-hcd
alias usb-controller1 ohci-hcd
.
- Command executed to generate the image
# /sbin/mkinitrd --preload=ps3pf_storage --with-usb --with=ehci-hcd --with=ehci-hcd --with=ohci-hcd --with=usb-storage --with=usbhid initrd.img 2.6.16
This section shows an internal structure of install-fc scripts.
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.
hwclock -w -u
FLASHDEV=`find-other-os-flash`
CLOCKDIFF=`other-os-flash-util -d ${FLASHDEV}` # get the difference of
clock time between game os and linux
date -s ${CLOCKDIFF}Sec
hwclock -w -u
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 and '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=/
/
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
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
/etc/hosts
#
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 5 RPM on the Hard Disk.
15) Remove old RPM on the Hard Disk.
16) Eject Fedora Core install DVD.
17) Mount Additional CD.
18) Install some PS3 specific RPMs.
19) Create and change some configuration files for PS3.
/etc/kboot.confdefault=linux
timeout=10
root=LABEL=/
linux='/boot/vmlinux-$KERNELVER initrd=/boot/initrd.img '
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
ppc64-redhat-linux
/etc/rpm/macros%_transaction_color 3
/etc/modprobe.confalias
scsi_hostadapter ps3pf_storage
alias usb-controller ehci-hcd
alias usb-controller1 ohci-hcd
You should use xorg.conf file for virtual fram buffer
/etc/init.d/kudzuYou should use xorg.conf file for virtual fram buffer
20) Unmount all partitions
21) Eject Additional CD.
22) Remove work files.
---