ChorusOS 5.0 Board Support Package Developer's Guide

Overview of ChorusOS Boot Process

There are three stages to booting ChorusOS on the target system:

Power-up Initialization

When the board is powered up or reset, the processor starts executing code at a fixed address. This code sets up the minimum hardware environment required by the system loader. The initialization code (the initial loader) is stored in non-volatile physical memory.

Loading the System Image

The last action of the power-up initialization code is to hand control to the initial loader which loads the system image into physical memory and jumps to the image entry point.

If the system image is already stored in non-volatile memory on the board, the initial loader is not required, and the initialization code terminates by jumping to the entry point of the system image.

The initial loader may either be the firmware provided by the board, or the ChorusOS Boot Monitor (see bootMonitor(1M)).

Most development boards are provided with a standard firmware power-up initialization code and loader in PROM. This firmware is able to download a system image from a local device or from the network (for example, PPC-Bug firmware on platforms in the PowerPC target family). Sun Embedded Workshop provides tools that build the ChorusOS system image in the format required by the firmware loaders supported.

For some target families it is also possible to use bootMonitor (instead of the board firmware) as the initial loader. It downloads the ChorusOS system image from a local device or from the network. See the ChorusOS 5.0 Installation Guide.

The bootMonitor utility is implemented as an application on top of a minimal ChorusOS configuration.

The Initialization of the ChorusOS Microkernel and OS

The ChorusOS operating system boots from the system image. The system image contains binary executable files of the bootstrap program, debug agent, microkernel, drivers, OS servers and applications. It can also contain a set of data files such as networking configuration files.

System image files are organized in one or more memory banks. Each memory bank can be formatted as a file system volume (for example, FAT12) and exported through the microkernel API as a memory device. Thus a system image file can be viewed as a file in a file system volume on a memory device.

The ChorusOS operating system is initialized in two stages:

  1. microkernel initialization

  2. OS service initialization

The microkernel is the minimal ChorusOS operating system comprising the microkernel and the built-in drivers. The bootstrap program starts the microkernel. The microkernel then starts the built-in drivers.

The operating system (OS) is implemented on top of the microkernel as a set of actors that provide services such as file systems and networking protocols. ChorusOS actors are defined and detailed in "Using Actors" in ChorusOS 5.0 Application Developer's Guide.

The microkernel starts the OS services by creating the initial subset of OS actors from the system image binary files. The OS can then activate additional system services by loading actors from files located on the system image memory, or from local or remote devices.