<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
          "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<article>
 <title>Playstation 2 RTE Bootloader HOW-TO</title>
 <articleinfo>
  <author>
   <firstname>Gray</firstname>
   <surname>Carper</surname>
   <affiliation>
    <jobtitle>Director of Technology</jobtitle>
    <orgname>xRhino, Inc.</orgname>
    <address>
     <email>gcarper@xrhino.com</email>
    </address>
   </affiliation>
  </author>
  <revhistory>
   <revision>
    <revnumber>1.0</revnumber>
    <date>May 29th, 2002</date>
    <authorinitials>gc</authorinitials>
    <revremark>Initial version.</revremark>
   </revision>
   <revision>
    <revnumber>1.1</revnumber>
    <date>June 3rd, 2002</date>
    <authorinitials>ms</authorinitials>
    <revremark>
     Converted entire document to docbook format and added a section on
     the p2lboot.opt file.
    </revremark>
   </revision>
   <revision>
    <revnumber>1.2</revnumber>
    <date>June 14th, 2002</date>
    <authorinitials>gc</authorinitials>
    <revremark>
     p2lboot.opt (the <emphasis>display</emphasis> and <emphasis>prevent
     </emphasis> sections) and p2lboot.cnf (the <emphasis>initrd_image
     </emphasis> and <emphasis>sbios_version</emphasis> sections) information
     has been updated.
    </revremark>
   </revision>
  </revhistory>
  
  <abstract>
   <para>
    This HOW-TO describes the different bootloader configuration options 
    available to Sony Playstation 2 Linux users. This document is intended to
    provide information on configuration and now the bootloading process, 
    which remains a proprietary and closed process. 
   </para>
  </abstract>
  
  <legalnotice>
   <title>Copyright Notice</title>
   <copyright>
    <year>2002</year> Manu Sporny, Gray Carper, Jonathan Turner
    <holder>
     Gray Carper
     <ulink url="mailto:gcarper@xrhino.com">gcarper@xrhino.com</ulink>
    </holder>
    <holder>
     Manu Sporny
     <ulink url="mailto:msporny@xrhino.com">msporny@xrhino.com</ulink>
    </holder>
    <holder>
     Jonathan Turner
     <ulink url="mailto:jturner@xrhino.com">jturner@xrhino.com</ulink>
    </holder>
   </copyright>
   <para>
    Permission is granted to copy, distribute and/or modify this document under
    the terms of the GNU Free Documentation License, Version 1.1 or any later
    version published by the Free Software Foundation; with the Invariant 
    Sections being Copyright, with no Front-Cover Texts and with no Back-Cover
    Texts.
   </para>
   <para>
    A copy of the GNU Free Documentation License is available on the World Wide
    Web at <ulink url="http://www.gnu.org/copyleft/fdl.html">
    http://www.gnu.org/copyleft/fdl.html</ulink>.

    You can also obtain it by writing to the
    <address>
     Free Software Foundation, Inc.
     <street>59 Temple Place - Suite 330</street>
     <city>Boston</city>
     <state>MA</state>
     <postcode>02111-1307</postcode>
     <country>USA</country>
    </address>
   </para>
  </legalnotice>
 </articleinfo>
 
 <sect1>
  <title>The boot configuration file - p2lboot.cnf</title>
  <para>
   A typical p2lboot.cnf file may look something like this:  

   <screen>
    "Linux" vmlinux "" 203 /dev/hda1 "crtmode=ntsc3,60" PS2 Linux
    "Linux - initrd" vmlinux  initrdgz.img   203 /dev/hda1 "crtmode=ntsc3,60" PS2 Linux with bootstrapping initrd
    "Linux - single user"   vmlinux "" 203 /dev/hda1 "crtmode=ntsc3,60 single" PS2 Linux in single user mode
    "Linux - emergency"    vmlinux "" 203 /dev/hda1 "crtmode=ntsc3,60 emergency" PS2 Linux in recovery mode
   </screen>
  </para> 

  <para>
   The entries (which are limited to 52 within a single p2lboot.cnf file), have
   a very specific format:
  </para>
  
  <screen>
    menu_display_name kernel_image initrd_image sbios_version root_device kernel_command_line boot_description
  </screen>
  
  <variablelist>
   <title>Configuration file options</title>
   <varlistentry>
    <term>menu_display_name</term>
    <listitem>
     Specifies the text to use as a menu item in the bootable configurations 
     list. This should be less than 12 characters in length and may contain 
     spaces.
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>kernel_image</term>
    <listitem>
     The name of the file on the memory card that is the bootable kernel 
     image.
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>initrd_image</term>
    <listitem>
     If you are using an initial ramdisk, the name of the ramdisk image should
     be specified. 
     <warning>
      As of the 2.2.x series kernels, once the initial ramdisk image is loaded
      into memory, it is <emphasis>never</emphasis> freed. Therefore, if you 
      have a compressed image of 5MB and it uncompresses to 10MB, you will only
      have 18MB available to you in Linux (32MB - 10MB - 5MB = 18MB).
     </warning>
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>sbios_version</term>
    <listitem>
     It appears that this is the SBIOS version to use for Linux kernel IOP 
     interaction. More testing must be done for verification, though. The 
     typical value is "203".
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>root_device</term>
    <listitem>
     The device node that specifies the root filesystem. This
     works much like most Linux distributions and is passed in as a kernel
     command line option.
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>kernel_command_line</term>
    <listitem>
     If you want to pass kernel options to configure the kernel during boot, 
     you can place them here. Options are in the key=value pair form common to
     the Linux kernel.
    </listitem>
   </varlistentry>
   <varlistentry>
    <term>boot_description</term>
    <listitem>
     A more verbose bootable configuration description than the 
     menu_display_name allows can be placed as the last section of each line.
    </listitem>
   </varlistentry>
  </variablelist>
 </sect1>
 
 <sect1>
  <title>The PS2RTE bootloader options file - p2lboot.opt</title>
  <para>
   A typical p2lboot.opt file may look something like this:
  </para>
  
  <para>
   <screen>
    timeout=
    display=ntsc
    prevent=Linux%mc0:/BWLINUX/vmlinux%
   </screen>
  </para>
  
  <para>
   <variablelist>
    <varlistentry>
     <term>timeout</term>
     <listitem>
      The timeout value gives the number of seconds to wait before
      booting the option that is described by the <emphasis>prevent</emphasis>
      field.
     </listitem>
    </varlistentry>
    <varlistentry>
     <term>display</term>
     <listitem>
      The display signal format. This is used to initialize the bootloader 
      screen and, via the <emphasis>crtmode</emphasis> kernel parameter, the
      Linux console. Possible values are vga, ntsc, and pal.  
     </listitem>
    </varlistentry>
    <varlistentry>
     <term>prevent</term>
     <listitem>
      The default boot option. The first part of the '%' separated value is the 
      <emphasis>menu_display_name</emphasis> in the p2lboot.cnf file followed by 
      the absolute path to the <emphasis>kernel_image</emphasis>.
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </sect1>
 
 <sect1>
  <title>Other files</title>
  <para>
   There are usually two other files that are kept on the memory card along
   with the bootloader configuration files; icon.sys and penguin.ico
   The format and purpose of both files are covered by Sony Non-Disclosure 
   and thus cannot be discussed.
  </para>
 </sect1>
</article>
