copyright: Copyright 2001 Sun Microsystems, Inc.  All Rights Reserved

1. Introduction
   Flash update may have to be done from time to time to
   update code, such as when a bug is fixed, new features
   are added, or a customer may request a unique feature.
   This feature will allow you to update the code on the boards,
   without using any additional programming equipment.

2. Requirements
   a. Network connection. 
      This is needed if the file is not stored locally, but stored
      on the server.
      You will need to make sure that the board you want to update
      can access the server.
   b. Binary file that contains the new code.
      The file name should have .bin suffix and the version number.
   c. Serial port connection to the SPARC side.
      Either on the front panel or on the Transition Card.
   d. Terminal (tip line).
      If using SUN's workstation, for example:
      tip -9600 /dev/ttya, 
      to connect to ttya.
   e. Must be performed at the OBP level, at the ok prompt.

3. Procedure
   1. Bring the board you want to update to the OBP ok prompt.
   2. Type the following:
      smc-flash-update filename
      Where filename is the file name of the 
      binary file that contains the new code.
   The board will automatically perform smc-flash-update, 
   and resets it when it is done.
   
4. Error recovery.
   From time to time, you may run into problems, such as when
   network connection is suddenly broken, or when
   someone accidentally trip the power switch or trip on the
   network cable , or memory error at the SPARC side 
   while flash update is pending,
   that would prevent the new code to be loaded completely.
   We have provided error recovery mechanism.
   If any of these happen, after reset, you will notice that
   the OBP will print the version number other than
   the version number that you intend to program into the board's
   code memory (such as version 0.0.0), furthermore, it may look
   like the OBP does not communicate with the SMC anymore.
   This is normal, since
   when the flash update encounters problems like those described
   above, the OBP will filter any commands, except
   commands to the SMC that are related to flash update.
   Therefore, you should not type any other commands except
   retry smc-flash-update command, by re-typing
   smc-flash-update filename
   at the ok prompt.

5. Compatibility.

   For CP2040:
     If you have boards that have SMC version older than
     3.4.X (i.e: 3.3.X or older), you can't perform smc-flash-update 
     on those boards. SMC version 3.4.X requires more code space that
     older boards can't handle.
     The boards that we support for CP2040 are P1C.
     The boot code must be version 3.15.6.
     (The subject on boot code will be covered in another section).

   For CP2060 or CP2080:
     The boot code must be version 3.15.3

   For each releases, the release note covers in details
   the compatibilities between OBP, SMC, PLD and FPGA
   version. Please refer to the release note.
   Any incompatibilities between two or more of those
   items may cause the boards to fail, and you may have to
   return the boards to SUN

6. For developers and advance users only.
   This section covers how to update the boot code
   WARNING !!!!
     In most cases you will not have to touch the boot code.
   The boot code has been pre-programmed at the factory with
   the latest and correct version.
   Do NOT touch the boot code unless you are
   absolutely sure that you must do so.
   Again, as stated above, you can't perform smc-flash-update
   if your CP2040 boards has SMC version number older than 3.4.X,
   the boot code can't be flash updated either.

   From time to time we were asked how do we know if
   the board has the correct boot version. 
   You have to read the release note for the existing
   version, and compared against the new version to find out
   if the board can be updated in the field, or
   the board must be returned to us for upgrade.
   If the board can't be updated in the field,
   it must be shipped back to SUN, we use
   different equipment to upgrade.
   If it is determined that the boot code must be upgraded
   along with the flash code, here is
   the procedure:
   1. Please make sure that your flash code is working properly.
      If you attempt to update the boot code while your
      flash code is corrupted, your board will fail permanently.
      You can type .version command the the OBP level (at ok prompt),
      If the SMC version number printed is the correct one,
      the flash code is working properly. 
      If you are running from the boot code, that means
      that the main flash code is corrupted, therefore, you must
      do smc-flash-update of the main flash code.
      If .version output does not show SMC version,
      this means you are running from the boot code.
   2. at ok prompt, type:
      smc-flash-update filename
      where filename is the file name of the boot code.
   3. If you must update both the boot code and flash code,
      please update the boot code first, then the flash code.
      Always read the release note, in case of exception.

7. Misc. note.
   It is recommended that customers contact their Sun FAE (Field
   Application Engineer) before attempting to do flash update. 
   Some boards may need hardware upgrade if they have the 
   older version.

