This is an example program demonstrating how to make a program running directly under the hypervisor, using the otheros.bld mechanism. A number of important techinques are included:
The demo can be compiled on the PS3 (or any other PPC machine) running Linux. In order to compile on a different system, modify the Makefile to use your cross compiler.
The compilation results in two binaries, demo.elf and otheros.bld. These contain the same code, the difference is only in the binary format (the former is in ELF format, the latter is a raw gzipped binary). Both can be used to run the demo, but the methods to start it differ.
In order to use the ELF file, you need to have kboot (or another kexec capable linux kernel) installed on your PS3. You can either add the demo.elf to your kboot.conf (e.g. demo='sda1:/boot/demo.elf'), or you can simply run "./demo.elf" in the directory where you put the ELF file (on the harddrive, a USB memory, an NFS partition, whatever, just make sure it's mounted first). Note that you need to do this from the kboot prompt, the demo can not be started from a regular Linux shell.
The otheros.bld file can be installed directly from GameOS as an "Other OS" (which is the main point of this example). Note that if you already have kboot installed, installing the demo otheros.bld will replace kboot. The contents of your harddrive will not be affected, so you will not lose kboot.conf or anything, but you'll need to reinstall kboot afterwards to get back into Linux, so make sure to have a copy of the kboot otheros.bld handy.
First, you need to put otheros.bld on a USB memory (or memory stick, SD card etc) in the folder PS3/otheros. (Earlier versions of the system software also required you to put the OtherOS installer otheros.self, which was provided by Sony, in this folder, but it appears that this is no longer necessary, and otheros.self is no longer provided.) Next, insert the storage medium into the PS3, go to Settings/System Settings/Install Other OS and start the installation. Afterwards, selecting "Other OS" as default system will start the demo.
If you have read and understood the previous sections, you may now download the source and binaries.