ChorusOS 5.0 Board Support Package Developer's Guide

Introduction to Porting ChorusOS Operating System

The Sun Embedded Workshop software provides reference implementations of the ChorusOS operating system as a set of binary products, one for each of the supported target families of processors. The processors on the boards in each target family are electronically different but are identical in their interactions with the operating system.

The binary product for a given family consists of:

The generic runtime is compiled for the given family of processors. For example, the ChorusOS operating system for PowerPC generic runtime will work with the PowerPC 750 and 7400 processors. The generic runtime needs additional board-specific components in order to produce a system that can boot and do useful work. In particular, you need to add a boot program and a set of device drivers.

The set of items that you need to add to support a specific board is called the Board Support Package (BSP).

The set of boot programs and device drivers provided with the binary product will work with the reference platforms. However, you may need to customize these components to, for example, optimize your system. The BSP source for the target family that you have installed is included in the binary product, therefore allowing you to modify it. In addition the BSP source for the other supported processor families is provided in a separate package for you to refer to (see the corresponding ChorusOS Target Family Guide) .

When you have selected the board that you wish to port ChorusOS to, you will need to identify the reference implementation from the supported BSP source that most closely resembles your target board. Use this reference implementation as the basis for your BSP, porting the components as necessary.

To create a BSP for a specific target board, you need to provide four components:

The boot program is heavily dependent on the board and will need to be adapted or rewritten. Whereas the host bus driver is dependent on the target family and therefore may be used for boards in the same target family (maybe with some adaptation). You may be able to reuse existing drivers for managing the board's other devices, using the Sun Embedded Workshop device driver framework. For more information on writing device drivers and using the device driver framework see section "Overview of Creating a New Device/Bus Driver".

In Figure 1-1, the elements drawn with dotted lines are the elements that must be modified or replaced when porting a ChorusOS operating system. The elements shown in gray with dotted lines may need to be modified or replaced. Finally the elements shown with unbroken lines are not usually changed when porting the system to another target board.

Figure 1-1 Component Architecture

Graphic

The figure also shows the interfaces between each of the component layers. DDI stands for the device driver interface. DKI stands for the device-kernel interface. BKI stands for the boot-kernel interface. For more information on these interfaces see "Device Driver Interface (DDI)", "Driver/Kernel Interface (DKI)" and "The Boot-Kernel Interface".