ChorusOS 5.0 Installation Guide

Building and Booting a System Image on PowerPC SBC8260 Target Systems

You can install ChorusOS on a SBC8260 target using one of the following methods:

Overview of the Process

This section provides an overview of the ways of building and booting a ChorusOS system image on SBC8260 targets in the form of a flowchart.

Figure 8-2 Building and Booting a ChorusOS System for SBC8260 Targets

Graphic

Using the visionXD Tool

For the following procedures, it is assumed that you use the visionXD tool either to boot the target system or to place the bootMonitor image in flash memory on the target system. The URL for the visionXD tool is: http://www.windriver.com/products/html/vxd.html


Note -

For simplicity, it would help if the visionXD tool is installed on the host.


To Build a ChorusOS System Image

The following procedure assumes that the ChorusOS product has already been correctly installed on the host workstation. See Part I, Installing on the Host.

  1. Create and change to a build directory where you will build system images:


    $ mkdir build_dir
    $ cd build_dir
    
  2. Set an environment variable to use with the configure(1CC) command as a shortcut to the base directory.

    For example:


    $ export DIR=/opt/SUNWconn/SEW/5.0-PowerPC/chorus-powerpc
    
  3. The PATH environment variable must be set correctly to include the directory:

    install_dir/chorus-powerpc/tools/host/bin

    where the default install_dir is /opt/SUNWconn/SEW/5.0-PowerPC.

    The PATH environment variable must include /usr/openwin/bin, which contains the imake utility.

  4. Configure the build directory, using the configure(1CC) command:

    • If you are building from a binary distribution:


      $ configure -b $DIR/kernel \ 
      $DIR/os \ 
      $DIR/tools \ 
      -s $DIR/src/nucleus/bsp \ 
      $DIR/src/nucleus/bsp/powerpc/sbc8260
      

      Note -

      The above command configures the build directory to include components installed during a "Default Install". It does not include optional components, such as the X library or code examples, that you decide to install separately on Solaris host workstations. For example, in order to include everything in your build environment:


      $ configure -b $DIR/kernel \
      $DIR/os \ 
      $DIR/opt/X11 \ 
      $DIR/tools \ 
      -s $DIR/src/nucleus/bsp \ 
      $DIR/src/nucleus/bsp/powerpc/sbc8260 \ 
      $DIR/src/opt/examples
      

    • If you are building from the source distribution, see the ChorusOS 5.0 Source Delivery Guide.

    As a result of configuration, build_dir now contains the Makefile, which generates the build environment, and the Paths file, which specifies paths to files required by, and created in, the build environment.

  5. Generate the build environment:


    $ make
    
  6. Configure the system image:


    $ configurator -set ETHER_ADDR=xx:xx:xx:xx:xx:xx
    

    where xx:xx:xx:xx:xx:xx is the target system Ethernet address.

  7. Build a system image:


    $ make chorus
    

    The resulting system image file is located in the build directory, build_dir, and is called chorus.RAM.


    Note -

    You can also make a smaller system image that includes only the operating system microkernel:


    $ make kernonly
    

To Place the System Image on the Boot Server

See the Chapter 5, Setting Up a Boot Server, for instructions on how to configure the boot server.

  1. Copy the system image to the boot server.

    For example, on a Solaris host workstation:


    $ rcp chorus.RAM boot_server:/tftpboot
    
  2. Verify that at least read permissions are available for the system image on the boot server.

    For example:


    $ rlogin boot_server
    Password: password_for_user
    $ ls -l /tftpboot/chorus.RAM
    -rwxr-xr-x   1 user    group     1613824 Dec 15 17:33 chorus.RAM*
  3. (Optional) While logged in to the boot server, create a configuration file for the target.

    For a target system with IP address 129.157.173.199 using a boot server with IP address 129.157.173.144, the configuration file contains the following:

    AUTOBOOT=YES
    BOOTFILE=chorus.RAM
    BOOTSERVER=129.157.173.144

    The configuration file is named /tftpboot/819DADC7.ChorusOS.5.0, which is constructed from the target system IP address 129.157.173.199 as a concatenation of the following:

    • 129 in decimal translates to 81 in hexadecimal.

    • 157 in decimal translates to 9D in hexadecimal.

    • 173 in decimal translates to AD in hexadecimal.

    • 199 in decimal translates to C7 in hexadecimal.

    • (optional) A .ChorusOS.5.0 extension identifies the release, and is appended to the concatenation of the IP address expressed in hexadecimal.


    Note -

    The system first looks for the configuration file with the .ChorusOS.5.0 extension. If no such file exists, the system looks for a configuration file without the .ChorusOS.5.0 extension.


To Set Up the visionXD and visionICE Tools

See the visionXD and visionICE documentation for detailed installation instructions.

  1. Connect visionICE to the target system, plugging the transceiver into the MII connector and switching the transceiver to UP.

  2. Connect the target system to the network.

  3. Connect and configure visionICE and visionNET.

  4. Install the visionXD tool on the host workstation.

  5. Select Configure Global Settings... from the Tasks menu, and use the dialog box displayed to configure the connection to the target system.

To Boot the SBC8260 Target System Using the visionXD Tool
  1. Start the visionXD tool.

  2. Select Connect from the Target menu to connect the visionXD tool to the target system.

  3. Click the terminal button to display a terminal window with the BKM prompt.

  4. Enter in at the BKM prompt to set initialization values for the target system registers:


    >BKM> in  
    
  5. Select Load Executable... from the File menu.

  6. Select the chorus.RAM system image and click Load.

  7. After the target system has finished downloading the system image, click Run.

Using bootMonitor

The following procedures describe how to build and boot a ChorusOS system using bootMonitor.

To Create a bootMonitor Image

See bootMonitor(1M), bootConfig(1M), and bootAgent(1M) for details about how bootMonitor works.

  1. Create a build directory where you will build a bootMonitor image:


    $ mkdir bootmon
    $ cd bootmon
    

    Note that this build directory is different from the directory where you build system images.

  2. Configure the bootmon directory based on the binary distribution:


    $ configure -b $DIR/kernel \
    -s $DIR/src/nucleus/bsp \
    $DIR/src/nucleus/bsp/powerpc/sbc8260
    
  3. Generate the build environment:


    $ make
    
  4. Edit the special bootmon/conf/mini profile so that it reads:

    #
    # Mini Profile
    #
    
    #
    # Microkernel features
    #
    -set USER_MODE=false
    -set VIRTUAL_ADDRESS_SPACE=false
    -set SEM=false
    -set EVENT=false
    -set MONITOR=false
    -set TIMER=false
    -set DATE=false
    -set RTC=false
    -set PERF=false
    -set IPC=false
    -set MIPC=false
    -set LAPBIND=true # Change this from 'false' to 'true'
    -set LAPSAFE=true # Change this from 'false' to 'true'
    -set MON=false
    -set LOG=false
  5. Configure the build environment for bootMonitor:


    $ configurator -p conf/mini
    $ configurator -set BOOT_MODE=ROM
    $ configurator -set ETHER_ADDR=xx:xx:xx:xx:xx:xx
    $ configurator -setenv BOOTCONF=RARP
    

    where xx:xx:xx:xx:xx:xx is the target system Ethernet address.


    Note -

    For details about the BOOTCONF environment variable and available options, see the bootConfig(1M) and bootAgent(1M) man pages.


  6. Build a bootMonitor image:


    $ make bootMonitor
    

    The resulting image file is located in the build directory, bootmon, and is called bootMonitor.ROM.

To Flash the bootMonitor Image in the Flash SIMM

The SBC8260 target system provides two flash devices:

SBC8260 can boot from either flash device depending on the configuration of jumper-24:

To boot from one of the two flash devices, the appropriate configuration word must be stored at the beginning of that device. Refer to the section "Reset Configuration", of the SBC8260 Hardware Reference Manual for the procedure to restore the configuration word in any of the two flash devices. You can use the following command:


BKM> SY RSTCONF configuration_word port_size

where the port_size is 8 for the LOCAL Flash and 32 for the Flash SIMM.


Note -

The visionXD emulator cannot "get" the state of the target by itself, after some registers have been modified by running ChorusOS. Typically, the IMMR value and memory translations set by ChorusOS are not automatically supported by visionXD.

Therefore, the register contents of the emulator and the target must be synchronized.

Enter the following commands in the Terminal window when starting a session with the emulator:


>BKM> sc default
>BKM> in

The preceding commands restore and set the registers to their default values.

It should also be noted that after these commands are executed, the boot flash device selected by JP-24 is visible at address 0xfe000000 causing the configuration word to be visible at this address (one byte at each double-word boundary).


The following example is for AMD 29F080 (1024x8) 4 devices Flash type.

  1. Verify JP-24 is 1-2 and 3-4 (CS0 selects Flash SIMM).

  2. Reset the target and the emulator.

  3. Start visionXD and connect to the target (Target > Connect).

    If at this point the emulator is always in error and cannot connect to the target, you certainly erased the configuration word. Perform the procedure to restore the configuration word, described in the section "Reset Configuration" of the SBC8260 Hardware Reference Manual. Reset the target and the emulator and then try again.

  4. Open a terminal window (Tasks > Terminal)

  5. In the terminal window enter:


    >BKM> sc default
    >BKM> in
    

  6. Configure the CS0 for 32 bits wide:

    1. Select Target > Registers > OR0 > + > Detail.

    2. Select Size > 32 bits and click Set.

    3. Click Detail again and then Set in Emulator.

  7. Program the flash (Tasks > Program Flash) with the following configuration:

    Name         : bootmon/bootMonitor.ROM
    Device(s)    : AMD 29F080 (1024x8) 4 devices
    Start address: 0xfff00000
    End address  : 0xffffffff

    This will convert the bootMonitor.ROM (built in the procedure "To Create a bootMonitor Image") into a bootMonitor.bin file.

    Then click Erase and Program to write the bootMonitor image to flash memory.

  8. Click Extract in the dialog box that is displayed.

  9. Click OK to confirm the download into flash memory.

To Boot the Target System

    Restart the target system to boot from flash memory.

The ChorusOS system image is running on the target.

For information on what to do next, see About ChorusOS 5.0 Documentation, which will guide you to the appropriate information for your task.