This chapter describes how to install ChorusOS 5.0 for the MPC8xx processor family. For information on the system requirements and the packages available with MPC8xx targets, see ChorusOS 5.0 Target Family Guide (MPC8XX Platform Edition).
Use one of the following methods to install ChorusOS on an MPC8xx target:
This section describes the process for building and booting a ChorusOS system image on MPC8xx targets.
mpc8bug
Host DebuggerThe following procedure assumes that the ChorusOS product has already been correctly installed on the host workstation. See Chapter 1, Installing on the Host, for instructions.
For simplicity, it would help if the mpc8bug
tool is installed on the host.
Create and change to a build directory where you will build system images:
$ mkdir build_dir $ cd build_dir |
The file system containing the build_dir directory must be accessible by NFS from the remote ChorusOS target.
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-MPC8xx/chorus-mpc8xx |
The PATH environment variable must be set correctly to include the directory:
install_dir/chorus-mpc8xx/tools/host/bin
where the default install_dir is /opt/SUNWconn/SEW/5.0-MPC8xx.
The PATH environment variable must include /usr/openwin/bin, which contains the imake utility.
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/mpc8xxADS \ |
The preceding 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, 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/mpc8xxADS $DIR/src/opt/examples |
If you are building the system image from a 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.
Generate the build environment:
$ make |
$ configurator -set ETHER_ADDR=xx:xx:xx:xx:xx:xx |
where xx:xx:xx:xx:xx:xx is the target system Ethernet address.
Build the system image:
$ make chorus |
The resulting system image file is located in the build directory, build_dir, and is called chorus.RAM.
You can also make a smaller system image that includes only the operating system microkernel:
$ make kernonly |
Generate the NFS root file system:
$ make root |
This command creates a root directory in the build directory. The root directory contains binary and configuration files that are accessed by the target system.
See Chapter 5, Setting Up a Boot Server, for instructions on how to configure the boot server.
Copy the system image to the boot server. For example:
$ rcp chorus.RAM boot_server:/tftpboot |
Verify that everyone has at least read access to 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* |
(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.
The system first attempts to find the configuration file with the .ChorusOS.5.0 extension. If it fails to find one, however, it attempts to find a configuration file without the .ChorusOS.5.0 extension.
mpc8bug
Host DebuggerThe following procedure concerns MPC8xx[F]ADS reference target boards.
Install Motorola's ADI host debugger (mpc8bug
) on the boot host.
The MPC8XX ADS Software (MPC8bug version 1.5)
package contains the mpc8bug
monitoring tool, configuration
files for all reference targets, and documentation explaining how to install
and use the tool. This package is provided with the hardware.
For details about installation, see the mpc8bug
installation manual.
Append a ChorusOS load macro to the .mpctcl.cfg configuration file.
The following TCL
macro should be appended at the end of the .mpctcl.cfg
file that is provided as part of the mpc8bug
package:
a chload reset :h \; load \$1 \; rms der decie 0 \; rms der extie 0 \; rms der prie 0 \; rms der sysie 0 \; rms der trie 0 \; rms der mcie 0 \; rms der itlbmse 0 \; rms der dtlbmse 0 \; rms der itlbere 0 \; rms der dtlbere 0 \; go
The preceding rms der xx 0 commands allow the ChorusOS microkernel to handle the corresponding exceptions.
Connect the host ADI and target debug ports.
The MPC8xx[F]ADS board must be installed and configured to operate in Host Controlled configuration mode by way of its ADI port. Therefore, you must plug an ADI board into one of the SBus or ISA slots of the boot host and connect to the MPC8xx[F]ADS through a 37-pin flat cable.
For details about installing the ADI board and configuring the target to boot from the Debug port, see the section "Installation Instructions" in the MPC8xx[F]ADS User's Manual.
After this is done, you can now start the mpc8bug
monitor utility on the boot host.
Connect the RS32 ports of the target system and of the boot system.
Connect the target system RS232 port on SMC1 to the boot system serial port for the ChorusOS debug agent link and system console.
Restart the target system.
Start the mpc8bug
monitor:
$ mpc8bug ADI ADS |
ADI is the number, from 0 through 3, of the SBus expansion slot for the ADI board on the UltraSPARC host system, or the address of the ADI card divided by 0x100 for a PC/AT host.
ADS is the ADI address, from 0 through 3, of the MPC8xx[F]ADS target board, as determined by the ADDR switches on the DS1 Dip-Switch of the MPC8xx[F]ADS board.
When started, the mpc8bug
monitor automatically executes the commands included in the configuration
files:
mpc8bug version 1.5 May 18 98 Copyright 1998 Motorola, Inc. All Rights Reserved. Initializing memory controller and UPM for 50MHZ DRAM delay set to 60ns DRAM size set to 16Mbytes Executing .mpctcl.cfg file from the current directory. Executing .mpc8xx.cfg file from the current directory. Executing .mpc860.cfg file from the current directory. Executing .mpcsdram.cfg file from the current directory. f860Bug> |
Check that the MPC8xx[F]ADS hardware is functioning properly by running the diagnostic tests T1, T2, T3, and T4 that are provided by the mpc8bug monitor.
For details about using mpc8bug
and associated diagnostic programs, see the mpc8bug
documentation.
Load the
system image through mpc8bug
:
f860Bug> chload full_path/chorus.RAM ( reset :h ; load chorus.RAM ; rms der decie 0 ; rms der extie 0 ; rms der prie 0 ; rms der sysie 0 ; rms der trie 0 ; rms der mcie 0 ; rms der itlbmse 0 ; rms der dtlbmse 0 ; rms der itlbere 0 ; rms der dtlbere 0 ; go ) Initializing memory controller and UPM for 50MHZ DRAM delay set to 60ns DRAM size set to 16Mbytes Loading ELF file . . . Entry point set to 001cf000 Loading section 1 (.ChorusO) : 001ce000 bytes at 00004000 Heap start address set to 00000001 No symbol table r3 and r5 are set to 0 Use Ctrl-C to abort execution ! |
The following messages are displayed on the target system console:
..... Booting Chorus ..... ChorusOS r5.0 for PowerPC - Motorola MPC8xx[F]ADS Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved. Kernel modules : CORE SCHED_FIFO SEM MIPC IPC_L MEM_PRM KDB TICK MON ENV ETIMER LOG LAPSAFE MUTEX EVENT UI DATE PERF TIMEOUT LAPBIND DKI MEM: memory device 'sys_bank' vaddr 0x7ec22000 size 0x1ce000 /cpu: sun:powerpc-(timebase,dec)-timer driver started /quicc-8xx: sun:powerpc-mpc8xx-(bus,quicc) driver started /quicc-8xx/smc-2: sun:quicc-smc-uart driver started /quicc-8xx/scc-1: sun:quicc-scc-ether driver started /quicc-8xx/scc-1: Ethernet address 08:00:3e:00:00:06 /quicc-8xx/on-board-flash: error -- wrong (unsupported) CHIP/VENDOR ID /flash-emul: started as 'One bank of AMD29F040x4 (64k erase block)' DATE: warning -- svDeviceLookup(rtc) failed (-7) IOM: SOFTINTR DISABLED (-31). Using an Interrupt thread IOM Init cluster space from: 0x7ebff000 to: 0x7ec1f800 [65 items of size: 2048] IOM Init io-buf pool from: 0x7ec1f850 to: 0x7ec1fd70 [8 items of size: 164] IOM Init raw io-buffer pool from: 0x7ec1fd70 to: 0x7ec211f0 [32 items of size: 164] Copyright (c) 1992-1998 FreeBSD Inc. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. max disk buffer space = 0x10000 /rd: sun:ram--disk driver started /quicc-8xx/on-board-flash: error -- wrong (unsupported) CHIP/VENDOR ID C_INIT: started C_INIT: /image/sys_bank mounted on /dev/bd00 C_INIT: found /image/sys_bank/sysadm.ini C_INIT: executing start-up file /image/sys_bank/sysadm.ini bpf: ifeth0 attached IOM: ifnet ifeth0 bound to device /quicc-8xx/scc-1 bpf: lo0 attached C_INIT: Internet Address: 129.157.173.199 ifeth0: flags=88437<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 129.157.173.199 netmask 0xffff0000 broadcast 129.157.255.255 ether 08:00:3e:00:00:06 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 C_INIT: rshd started |
bootMonitor
To boot the target from flash memory using bootMonitor
, perform the following procedures.
bootMonitor
ImageFor details about how bootMonitor
works, see bootMonitor(1M).
Build a ChorusOS system image. See Building the System Image.
Create a directory where you will build a bootMonitor
image:
$ mkdir bootmon $ cd bootmon |
This directory is different from build_dir, the directory where you build system images.
Configure the bootmon directory based on the binary distribution:
$ configure -b $DIR/kernel \ -s $DIR/src/nucleus/bsp \ $DIR/src/nucleus/bsp/powerpc/mcp8xxADS \ |
Generate the environment:
$ make |
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
Configure the
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.
For details about the BOOTCONF environment variable and available options, see the bootConfig(1M) and bootAgent(1M) man pages.
Build a bootMonitor
image:
$ make bootMonitor |
The resulting image file is located in the bootmon directory, and is called bootMonitor.ROM.
bootMonitor
ImageRestart the target system.
Start the mpc8bug
tool.
See Step 6 for details.
Use the loadf command to flash the bootMonitor
:
f860Bug> reset :h ; loadf full_path/bootMonitor.ROM 0x100000 Initializing memory controller and UPM for 50MHZ DRAM delay set to 60ns DRAM size set to 4Mbytes loadf: Loading ELF file . . . Loading flash mapped sections to ram memory buffer: Loading section 1 () : 00039000 bytes at 00100000 Programming flash :00039000 bytes at 02800000-02838fff Flash programming completed |
Power off the target board.
Unplug the ADI cable.
Restart the target system.
For an example of the messages displayed on the target system console, see Step 7.
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.