Purpose
#######
This directory contains the GCC 4.9.0
toolchain and tools for building the Linux 2.6 kernel
for the Sony Playstation 2.
The files are pretty stable, but still in development phase.
Status - System is usable
#########################
The 32-Bit kernel can start a full Debian 5.0
mipsel and can also start Buildroot. Most stuff is working.
The 32 bit kernel can execute ABI n32 ELF files,
but some structures in syscalls are different.
Most stuff is working, maybe something will not work.
With ABI o32 ELF files there is no problem.
Easy Build Script
#################
For easy building run the following script:
./build-all.sh
You need at least kernelloader 2.4. Otherwise
RPC can crash (alignment bug) and initrd is not
detected.
Toolchain
#########
The toolchain is installed to:
linux/toolchain-ps2-root/
To enable it, use the following command in the shell (bash):
source ./simple-toolchain/build/PS2-mips64r5900el-linux-gnu.sh
The file PS2.sh was created by build-all.sh.
The toolchain can build the Linux kernel and
programs for PS2 Linux. The toolchain uses
uClibc.
The toolchain requires a Linux to be installed
on the host computer. A Debian like system is
recommended (e.g. Kubuntu).
The files in simple-toolchain are currently
developed.
linux-2.6.35.4-mipsel-ps2
#########################
The linux kernel is stored in a git repository, you can get it with the commands:
git clone https://github.com/jur/linux.git
cd linux
git checkout ps2-master
This is a Linux kernel for the PS2.
To build the kernel, you need to
have the toolchain installed and
execute the following steps:
cd linux
cp ../kernelconfig-linux-2.6.35.4-mipsel-ps2.txt .config
source ../simple-toolchain/build/PS2-mips64r5900el-linux-gnu.sh
make oldconfig
make vmlinux
The resulting file vmlinux need to be
stripped with the command:
source ../simple-toolchain/build/PS2-mips64r5900el-linux-gnu.sh
${CROSS_COMPILE}strip vmlinux
Then it can be compressed:
gzip vmlinux
You need also an initrd for testing.
This generated with:
cd simpleinitrd
./createinitrd.sh
For starting you need at least
kernelloader 2.4.
This also supports the initrd.
You need to compile it from CVS.
Buildroot
#########
Buildroot is an environment that can build a Linux distribution.
It is pretty easy to use.
See buildroot/readme.txt for more details.
Debugging Output via Network
############################
To get debug messages from the Linux kernel when the
graphic is not usable or should not be used, you need
to start kernelloader 2.7
with ps2link and stay connected for
debugging, because the early kernel
messages will be printed.
You need to select the vmlinux.gz as
kernel and the initrd.gz as initial
RAM disk.
To debug you need to add the kernel parameter:
console=ttyS0
This is only working with the fat PS2 and if
you use the stable version of kernelloader 2.7.
The complete startup of the kernel
can be seen.
To debug all modules in kernelloader need to be
disabled, except the following must be
enabled:
rom0:SIO2MAN
host:ioptrap.irx
host:iomanX.irx
host:poweroff.irx
host:ps2dev9.irx
host:ps2ip.irx
host:ps2smap.irx
host:ps2link.irx
host:sharedmem.irx
Console
#######
The output of the kernel console can
be seen with ps2link or a connected
serial cable.
The early boot console uses this
method. There is also a PS2 SBIOS
console driver which takes over
after the early boot phase.
The following additional kernel
parameter is required for debugging with
ps2link:
console=ttyS0
You need a fat PS2 and kernelloader 2.7.
This doesn't work when using FMCB for booting.
It will hang during boot.
You need to use the old memory card exploit or
the reload with the offical Linux RTE disc.