
Date: 12/03/2009


A. Overview

The purpose of the IOS SRC SDK is to provide all the necessary source files
to build boot1, boot2 loader, compat boot, mini IOS, IOS kernel, and other 
BroadOn Resource Managers such as DI, FS, and SDI.  It contains some source 
codes, header files, libraries, and tools to build the following main
components:

   1) Various libraries
      - System library
        * This is the main library that contains all the hardware 
          initialization routines.
      - EEPROM library
      - ISFS library
      - SDI library
      - Libc library
   2) boot1 for diag
   3) boot2 for development
   4) Loader (loader.bin, loader_boot2.bin)
   5) GC compat mode boot (bc.wad)
   6) SD app for manufacturing
   7) Mini-IOS
   8) IOS Kernels
   9) ISFS Resource Manager
  10) ES Resource Manager
      * Only object files (*.o) are provided but can be used to build ES RM
        using a different address map.
  11) DI Resource Manager
  12) SDI Resource Manager


B. SDK Structure

The SDK has the following directory structure:
  - usr/
      - bin/
          - x86/
              - Cygwin-based tools
          - rvl/
              - Pre-built IOP-based programs
      - include/
              - Header files required to build programs and libraries
      - lib/rvl/
              - Pre-built IOP-based libraries
      - src/
          - apps/
               - common/
                      - Source to build libapputils.a (used by minimon0).
               - eemon/
                      - Source to build eemon.elf.
               - iossh/
                      - Source to build libiossh.elf (used by IOS shell).
               - minimon0_sram/
                      - Source to build minimon0_sram.elf.
          - boot/
               - boot1.diag/
                      - Source to build development various boot1 images:
                        - boot1_dev.flash
                          * This image can be used on existing NDEV systems
                        - boot1_prod_diag.flash
                          * This image can be used on NDEV systems to debug
                            production boot2.
                        - boot1_ati.flash
                          * This image is for old ATI diag (3 blocks) boot.
                        - boot1_nintendo.flash
                          * This image is for old Nintendo diag boot.
               - boot2/
                      - Source to build boot2.wad.
               - compat/
                      - Source to build GC compat boot (bc.wad).
               - loader/
                      - Source to build loader.bin and loader_boot2.bin.
               - sdapp/
                      - Source to build SD app for manufacturing.
          - lib/
              - ee/
                 - Source to build EEPROM library (libee.a).
              - fs/
                 - Source to build ISFS library (libfs.a).
              - iosc/
                 - Source to build crypto interface library (libiosc.a).
              - ioslibc/
                 - Source to build IOS libc (libioslibc.a).
              - sdi/
                 - Source to build SDI library (libsdi.a).
              - sys/
                 - Source to build libsys.a and contains all the hardware 
                   initialization routines used on IOP.
          - os/
              - di/
                 - Source to build DI RM.
              - es/
                 - Object files, link file and Makefile to build ES RM.
              - fs/
                 - Source to build ISFS RM.
              - ios/
                 - Source to build IOS kernels and IOS shell.
              - mini_ios/
                 - Source to build Mini-IOS.
              - sdi/
                 - Source to build SDI RM.
          - signum/
                 - Contains various definition and macro files to be used
                   with Chameleon JTAGJet program.


C. Installing & Building SDK

To install the SDK:
   - Start a Cygwin shell window
   - Unpack the SDK image (unzip) onto a temporary directory 
     For example:
        $ cp IOS_SRC_SDK_128_x.zip /tmp
        $ cd tmp; unzip IOS_SRC_SDK_128_x.zip
   - Create the installed directory and set the ROOT variable.
     NOTES:
       * Make sure that the ROOT path contains the case-sensitive pattern "RVL".
       * Make sure that the ROOT path has the Linux/Cygwin format (i.e. /home/x)
     For example (using bash):
        $ mkdir -p /home/test/IOS_SRC_SDK/RVL_128
        $ export ROOT=/home/test/IOS_SRC_SDK/RVL_128
   - Set the environment variable RVL_MEM to 128 (for 128MB) and 64 (for 64MB).
     For example (using bash):
        $ export RVL_MEM=128
   - Unset the environment variable REVOLUTION_SDK_ROOT 
     For example (using bash):
        $ unset REVOLUTION_SDK_ROOT
   - Run the install.sh script to install the image to $ROOT
        $ ./install.sh

To build the SDK:
   - Go to $ROOT/usr/src
   - Type the followings to build libraries and programs AND installing them
     to $ROOT/usr/lib/rvl and $ROOT/usr/bin/rvl:
       * make clobber
       * make headers
       * make exports
       * make install

