Compiling Petitboot

Rip Cord

Administrator
Staff member
Developer
one way to compile petitboot is using openwrt. The openwrt README explains how to test the compiled petitboot:
Code:
OpenWRT on the Sony PS3 Game Console

The OpenWRT build will create both a 1st stage PS3-Linux image
suitable for programming into the PS3 flash memory, and a 2nd
stage PS3-Linux image suitable for loading via bootloaders or
the kexec utility.

The 2nd stage image is convenient for testing new builds.  It can
be loaded from disk, USB device, or the network by an existing
Other OS bootloader.  After the 2nd stage image is tested and
found to be good, the 1st stage image can then be programmed into
flash memory.  It is recommended to use this method during
development to avoid corrupting the flash memory contents, which
requires a reboot to the Game OS to repair.

Known good Other OS bootloader images and installation information
can be found here:

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

The 2nd stage image file is bin/openwrt-ps3-vmlinux.elf.  It can
be loaded with an entry in the bootloader config file.  It has
no initrd file.

The 1st stage image is named bin/otheros.bld.  It can be programmed
into flash memory either from Linux or the Game OS.

here is the version of openwrt/petitboot I used:
Code:
https://mega.nz/#!oqJgSaqQ!TpVpoiIacWHjkIqbpSmyaxlzwkIZq9YpfRKLiBlTklQ

unpack the openwrt archive somewhere under your home directory.
cd to the openwrt directory and change the name of ps3_petitboot_minimal_config to .config

I cross-compiled on Fedora 12. Here are the other sources I had to download to build with the ps3 minimal config:
Code:
https://mega.nz/#!xjhiQbBL!dm_G7JtUg7E3w259Nd9icFP9lEAg8SJ1XjdqlinFWCA

to use the extra sources from the 2nd link, just unpack the archive somewhere under your home directory. You should get a folder with lots of smaller archives.

cd to the openwrt directory and run:
Code:
make menuconfig
in the menuconfig window, for local repository enter the directory path for the extra sources, something like:
Code:
file:///home/unit/openwrt1390/dl
"unit" is my username--home directory
exit menuconfig, saving changes.

it should have added an entry to your .config file something like this:
Code:
CONFIG_LOCALMIRROR="file:///home/unit/openwrt42025/dl"
then run:
Code:
make V=99
the first time it will take a long time making because it has to build the tool chain. a couple of hours on the old pc I had for Fedora 12, about 12 years ago.
 
Last edited:

Rip Cord

Administrator
Staff member
Developer
thanks.

I forgot to explain that this version of openwrt contains instructions to build a specific version of ps3-utils:

ps3-utils-20090320.tar.bz2

I couldn't find this version, so the version, in the archive linked above, is ps3-utils-master.tar.bz2 that is renamed it to ps3-utils-20090320.tar.bz2.
That was in 2013, and I can't remember the one other change I had to make to build with ps3-utils. So I uncheck the ps3-utils option in make menuconfig. Therefore, I use the shell command "reboot" instead of "boot-game-os" to quit petitboot.

Here are the files I put on usb memory stick to test a newly compiled petitboot:
/boot/vmlinux.elf
/etc/kboot.conf
 

Attachments

  • usbdrive.zip
    2.8 MB · Views: 0

Rip Cord

Administrator
Staff member
Developer
here is the output folders (except some intermediary files such as ipkg's, etc.) plus the main folder with the .config that I used.
I did not add/link any of extra pkgs that were listed in the ps3_petitboot_howto.

I used the ps3_petitboot_minimal_config with 2 changes using make menuconfig:
1. added local repository as detailed in the post above.
2. removed build ps3-utils in the pkg configuration section (though it's still in the main section?)

IIRC, both repositories linked above are necessary to build with this .config
 

Attachments

  • openwrt.zip
    4.9 MB · Views: 0
Top