News
Features
A) uClinux kernel 2.6.22-uc1. There have been substantial improvements
from kernel 2.4 to 2.6 (one of which is the preemptible kernel that
performs low latency operations). However, MIPS machines with no mmu
(like Allegrex) are not yet official supported by the latest uClinux
distribution. Therefore the kernel needs some serious patch up before
it can be loaded on PSP.
B) A configurable loader. The loader's behavior is controllable through
a config file, similar to vivi or uboot. However, it only runs on the
1.5 kernel/firmware thus users may experience problems with firmware
3.71 m33 or higher without applying the 1.5 kernel patch (3.71 m33-2).
C) Busybox 1.7 armed with loads of utilities running on linux. Again,
the original version needs to be patched up before it can run on PSP.
D) A serial driver controlling UART3 (the remote control port on fat
PSP) allowing you to open a SIO console on the PSP or to use any
terminal program on your PC to act as an emulate keyboard when you are
using virtual terminal. Up to 6 virtual terminals are available on PSP.
Use +/- buttons to switch between terminals.
E) A simple Framebuffer driver enabling virtual terminals to be displayed on PSP's LCD screen.
F) A new block device driver giving you accessibility to the Memory
Stick (Cool!). By default, disk ms0 will be mounted to /ms0 after
system startup, and there could be ms1 or more had you Memory Stick
been divided into multiple partitions.
G) A joypad driver allowing linux applications to acquire input from PSP buttons.
H) An On-Screen Keyboard facilitating fast input in the linux
environment, and also serving as an example of how to use the joypad
driver.
I) A patched mips toolchain capable of building both the uClinux kernel and other applications running on PSP.
Installation
Download the latest pre-compiled package
here. Extract the package and copy the entire folder of uClinux/ folder to PSP/GAME and run the loader from XMB.
Though unsatisfactory but it seems true that the old loader that runs
on 150 firmware does deliver more stable performance than the new
slim-compatible loader. Thus, if the new loader doesn't work for your
PSP and you still have the 150 add-ons, try the old one by replacing
the EBOOT.PBP with the on in FW150/, and moving the whole uClinux/
folder to PSP/GAME150 as well.
Build the Toolchain
Unlike the previous one, a new MIPS(el) toolchain with the gcc 4.2.1
and uClibc 0.9.29 is now in place capable of building both the kernel
and other apps. To construct or customize your own toolchain, recommend
you to use buildroot (20071216 or any version close to it) available at
http://buildroot.uclibc.org/. More details can be found in the following section:
Build PSPBoot
PSPBoot (latest version 0.22 now supporting 2.0+ firmware and slim PSP)
is PBP program just like other PSP homebrews. To compile it, you need
to install the PSPSDK which is available at
http://ps2dev.org/. Download the source
here, unpack it and run the following command under the directory you extract the package to:
make INSTALL_DIR="your_desired_location" install
To build the version that runs in 150 firmware, use the following command instead:
make INSTALL_DIR="your_desired_location" FW150=1 install
Build the Kernel
With the new toolchain, build the kernel is easy. Just unpack the
tarball of the kernel source of version 2.6.22-uc1 (or versions close
to it) and apply
this new patch, then run the following commands to start the build:
make ARCH=mips menuconfig (or simply copy my config file to overwrite the .config file of the kernel)
make ARCH=mips CROSS_COMPILE=mipsel-linux- vmlinux.bin
And then compress the image with gzip and modify the bootload script accordingly.
NOTE: Since the new toolchain has changed some code related to argument
passing to conform to the standard MIPS ABI, the kernel/executable
built by this new toolchain is not binary compatible with the
executable/kernel built by the old toolchain.
Build Busybox
Unpack the tarball of busybox which is available at
http://busybox.net/, and apply
this new patch before running the following command:
make CROSS_COMPILE=mipsel-linux- LDFLAGS="-static -Wl,-elf2flt" CFLAGS="-fno-jump-tables" menuconfig (or simply copy my config file to overwrite the .config file of busybox)
make CROSS_COMPILE=mipsel-linux- LDFLAGS="-static -Wl,-elf2flt" CFLAGS="-fno-jump-tables" install
After that, all the content will be installed in the
$YOUR_BUSYBOX_DIR/_install folder. To embed busybox inside the kernel
as an initramfs for system init (which is not the only way of booting
the kernel as some may favor constructing the rootfs on other storage,
like ms0), you may need to pack the _install folder into a cpio package
and specify its location during kernel compilation. If you are not
familiar with this, google "initramfs" for more technical details.
Build Your Own Application
With the new toolchain installed, building your own application to run
on PSP is almost as easy as building one for your desktop pc, except
that there are a few details you need to pay attention to. Here is an
example of build a hello world program:
mipsel-linux-gcc -static -Wl,-elf2flt -fno-jump-tables hello.c -o hello
Here, -static is needed because no share library is supported in nommu
systems. -Wl,-elf2flt tells the linker to convert the ELF image into a
FLAT executable at the final phase of linking. And -fno-jump-tables is
essential too as it tells gcc not to generate relocation entries of
GPREL32 frequently used in jump tables. Others are just regular stuff.
Download
Buildroot patch 0.22 to create the unified toolchain:
buildroot_patches-0.22.tar.bz2
uClinux on PSP-0.22 pre-built: uclinux_on_psp-0.22.zip
Prebuilt unified toolchain for uClinux on PSP: toolchain-uclinux_on_psp-0.22.tar.bz2
Kernel-0.22 config file:
kernel-0.22.config.gz
Kernel-0.22 patch:
kernel-0.22.patch.gz
Kernel-0.20 pre-built:
uClinux.zip
Kernel config file:
kernel.config.gz
Kernel-0.21 patch:
kernel-0.21.patch.gz
Busybox-0.22 config file:
busybox-0.22.config.gz
Busybox-0.21 config file:
busybox.config.gz
Busybox-0.21 patch:
busybox-0.21.patch.gz
PSPBoot-0.22 source:
pspboot-0.22.tar.bz2
PSPBoot-0.22 pre-built:
pspboot-0.22-prebuilt.zip (obsolete)
PSP OSK2.2 source:
psposk2.2.tar.bz2
PSP OSK2.1 source:
psposk2.1.tar.bz2
PSP Mouse Daemon 0.1 source:
pspmd-0.1.tar.bz2
The old mips-toolchain pre-built:
toolchain-mips.tar.bz2
The old mips-toolchain patch:
toolchain-mips.patch.gz
Other Downloads:
(Many thanks to danzel again for the porting)
danzel's port of PSPBoot pre-built:
http://localhost.geek.nz/psplinux/ucboot340.tar.bz2
danzel's port of PSPBoot source:
http://localhost.geek.nz/psplinux/ucboot340_src.tar.bz2
Links
http://uclibc.org/
http://ps2dev.org/
http://www.uclinux.org/
http://www.psp-linux.org/
http://www.hitmen-console.org/
...