Skip to content

Instantly share code, notes, and snippets.

@retpolanne
Created March 20, 2020 01:02
Show Gist options
  • Save retpolanne/cdfd8045e2723210687512d5ef623a21 to your computer and use it in GitHub Desktop.
Save retpolanne/cdfd8045e2723210687512d5ef623a21 to your computer and use it in GitHub Desktop.
Linux Notes

These are some notes regarding PS3 Linux (how to boot it)

  • You need Rebug/Rebug Toolbox for that
  • You need the dtbImage file on a USB drive (plugged on the right-most USB port). Resize VNAND, Install petitboot.
  • According to this doc
   dtbImage.%:		Similar to zImage, except device tree blob is embedded
			inside the image instead of provided by firmware.  The
			output image file can be either an elf file or a flat
			binary depending on the platform.

			dtbImages are used on systems which do not have an
			interface for passing a device tree directly.
			dtbImages are similar to simpleImages except that
			dtbImages have platform specific code for extracting
			data from the board firmware, but simpleImages do not
			talk to the firmware at all.

			PlayStation 3 support uses dtbImage.  So do Embedded
			Planet boards using the PlanetCore firmware.  Board
			specific initialization code is typically found in a
			file named arch/powerpc/boot/<platform>.c; but this
			can be overridden by the wrapper script.

Which is this file here

Also interesting for future Wii research https://elixir.bootlin.com/linux/latest/source/arch/powerpc/boot/wii.c

  • How do I build this dtbImage file?

This may be interesting:

The boot wrapper is built from the makefile in arch/powerpc/boot/Makefile and
it uses the wrapper script (arch/powerpc/boot/wrapper) to generate target
image.  The details of the build system is discussed in the next section.

...

The 'wrapper
script' (found in arch/powerpc/boot/wrapper) is called by the Makefile and
is responsible for selecting the correct wrapper bits for the image type.

...

However, it is worth mentioning that the script
uses the -p (platform) argument as the main method of deciding which wrapper
bits to compile in.  Look for the large 'case "$platform" in' block in the
middle of the script.  This is also the place where platform specific fixups
can be selected by changing the link order.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment