[Cbe-oss-dev] Boot Loader

Geoff Levand geoffrey.levand at am.sony.com
Sat Feb 14 15:24:23 EST 2009


On 02/13/2009 06:26 PM, Brandon Ros wrote:
> Currently, the PS3 "firmware" allows users to supply a file
> "PS3/otheros/otheros.bld".

That is just what the game OS expects.  The linux utility
ps3-flash-util will accept any file name.

> Is there any other solution for this other than the kboot
> implementation by Geoff?

Yes, there is petitboot:

  http://www.kernel.org/pub/linux/kernel/people/geoff/cell/ps3-petitboot/

You can actually right anything you want to flash, there are
no checks done to the actual content of the files.

> The current otheros.bld includes an entire
> Linux kernel itself, which allows for mounting and reading and loading
> of other kernels.

Yes, kboot/petitboot do that.

> I would like to create my own boot loader, one that is more simple.

Sure, you can just put a linux kernel or other program in there and
boot it directly if you want.  There can be nothing simpler that no
bootloader at all.

> What format is the otheros.bld file? Is it raw representation for the
> instructions that will be executed by the processor?

No, but almost.  It is a gziped binary memory image.  The other-os
loader in the PS3 firmare unzips it to memory addrees zero (0), then
start both threads running at the reset vector (address 0x100).

Look in here:

  http://git.kernel.org/?p=linux/kernel/git/geoff/ps3-linux.git;a=tree;f=arch/powerpc/boot;hb=HEAD

__system_reset_overlay in ps3-head.S is where execution starts.

The script file 'wrapper' creates a flash rom image from a linux kernel.
The 'wrapper program' is a 32 bit program is what is written to flash.
It prepares the linux kernel for execution then jumps to the kernel's
entry point.

Just FYI, it is very difficult to develop this kind of low level stuff
on ps3 because you need to get a lot of code working correctly just to
get some debug output.

-Geoff





More information about the cbe-oss-dev mailing list