This chapter describes how to install ChorusOS for the x86/Pentium processor family. For information on the system requirements and the packages available with x86/Pentium targets, see ChorusOS 5.0 Target Family Guide (Intel Platform Edition).
For the procedure explained in this chapter, you will need a terminal-type serial cable whose wires 2 and 3 are crossed and 7 (ground) is straight.
This section describes the process for building and booting a ChorusOS system image on x86/Pentium targets.
The following procedure assumes that the development environment has already been correctly installed on the host workstation. See Chapter 1, Installing on the Host, for instructions.
Create and change to a build directory where you will build the system image:
$ mkdir build_dir $ cd build_dir |
The file system containing the build_dir directory must be accessble 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-x86/chorus-x86 |
The PATH must be set correctly to include the directory:
install_dir/chorus-x86/tools/host/bin,
where the default install_dir is /opt/SUNWconn/SEW/5.0-x86.
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/x86/pc |
The preceding command configures the build directory to include components installed during a "Default Install". This command does not include optional components, such as the X library or code examples, that you may choose to install separately on Solaris host workstations. For example, to include everything in your build environment:
$ configure -b $DIR/kernel \ $DIR/os \ $DIR/tools \ $DIR/opt/X11 \ -s $DIR/src/nucleus/bsp \ $DIR/src/nucleus/bsp/x86/pc \ $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 is used to generate 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 |
(Optional) Configure the system image:
If you have only PCI Ethernet adapters, skip this step.
ISA Ethernet adapters require that you provide configuration information by setting an ETHER_id environment variable in the system image configuration with a command of the form:
$ configurator -setenv ETHER_id=name,irq,io_base,mem_base |
where:
A decimal value ranging from 0 to 9.
Up to ten ISA Ethernet adapters can be declared using ETHER_0, ETHER_1, ...ETHER_9
The type of the device: EL3, NE2000, or SMC
A decimal value representing the interrupt request level on the ISA bus
A hexadecimal value representing the base for I/O ports, such as 0x300
A hexadecimal value representing the base for shared memory, such as 0xD0000
The memory base parameter is required for SMC Ethernet adapters only.
For example, the following command configures the build environment for one SMC Ethernet adapter with IRQ 9, I/O base at 0x240, and memory base at 0xD0000:
$ configurator -setenv ETHER_0=SMC,9,0x240,0xD0000 |
The following command configures the build environment for a system with both an NE2000 adapter and an EL3 adapter:
$ configurator -setenv ETHER_0=NE2000,5,0x300 $ configurator -setenv ETHER_1=EL3,7,0x300 |
Build the system image:
$ make chorus |
The resulting system image file is located in the build directory, build_dir, and is called chorus.bmon.
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 that contains binary and configuration files to be 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, on a Solaris host workstation:
$ rcp chorus.bmon 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.bmon -rwxr-xr-x 1 user group 1613824 Dec 15 17:33 chorus.bmon* |
While logged in to the boot server, create a configuration file for the target.
For a target system with IP address 129.157.197.88 using a boot server with IP address 129.157.197.144, the configuration file contains the following:
AUTOBOOT=YES BOOTFILE=chorus.bmon BOOTSERVER=129.157.197.144
The configuration file is named /tftpboot/819DC558.ChorusOS.5.0, which is constructed from the target system IP address 129.157.197.88 as a concatenation of the following:
129 in decimal translates to 81 in hexadecimal
157 in decimal translates to 9D in hexadecimal
197 in decimal translates to C5 in hexadecimal
88 in decimal translates to 58 in hexadecimal
The system first attempts to find the configuration file with the .ChorusOS.5.0 extension. If no such file exists, the system attempts to find a configuration file with the .ChorusOS.4.0 extension.
bootMonitor
DisketteFor details about how bootMonitor
works, see bootMonitor(1M).
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 the system image.
Configure the bootmon directory based on the binary distribution:
$ configure -b $DIR/kernel \ -s $DIR/src/nucleus/bsp \ $DIR/src/nucleus/bsp/x86/pc \ |
Generate the environment:
$ make |
Edit the special mini profile, bootmon/conf/mini, so that it reads:
# # Mini Profile # # # Microkernel features # -set USER_MODE=false -set POSIX_SHM=false # add manually -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 LOADER=lilo $ configurator -setenv BOOTCONF=RARP |
For details about the BOOTCONF environment variable and available options, see the bootConfig(1M) and bootAgent(1M) man pages.
(Optional) Configure the environment for any ISA Ethernet adapters on the target system.
See Step 6 of the procedure "To Build the System Image" for examples on how to configure the environment for different adapters.
Build a bootMonitor
image:
$ make bootMonitor |
The resulting image file is located in the directory bootmon, and is called bootMonitor.image.
Copy the bootMonitor
image
to a diskette:
$ su Password: superuser_password # /etc/init.d/volmgt stop # fdformat -v /dev/fd0 Formatting 1.44 MB in /dev/rfd0 Press return to start formatting floppy. ................................................... vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv # cp bootMonitor.image /dev/fd0 # /etc/init.d/volmgt start volume management starting. # eject /vol/dev/rdiskette0/unlabeled can now be manually ejected # exit |
bootMonitor
DisketteShut down the system.
To view console output, connect a serial line from the first serial line port on the target system to the host workstation.
Use a terminal-type serial cable, whose wires 2 and 3 are crossed and 7 (the ground) is straight.
A serial cable in which all wires are parallel does not work.
Add a line to the host workstation /etc/remote file to make it possible to connect through the serial line using the tip(1) utility.
For example:
target_hostname:dv=/dev/cua/a:br#9600
Connect to the target system using the tip(1) utility:
$ tip target_hostname connected |
Place the bootMonitor
diskette
in the drive.
Reboot, making sure the BIOS causes the system to boot first from the diskette.
If the system boots correctly, messages similar to the following are displayed on the console in the terminal where you issued the tip(1) command:
RAM size: 0xc48000 bytes CPU: i486DX (486-class CPU) Adding ETHER_0 (SMC,9,0x240,0xD0000) in the device tree ChorusOS r5.0.0 for Intel x86 - Intel x86 PC/AT Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved. Sun Proprietary/Confidential US Government Rights Use, duplication, or disclosure by the U.S. Government is subject to restrictions set forth in the Chorus Software License Agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DRAS 252.227-7013(c)(ii) (OCT 1988), FAR 12.212(a)(1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. Sun Microsystems, Inc. Kernel modules : CORE SCHED_CLASS [ FIFO RR RT ] MEM_FLM KDB TICK ENV BLACKBOX MUTEX PERF TIMEOUT LAPBIND DKI /pci/i8259: sun:pci-i8259-pic driver started /pci: sun:x86-bios-(bus,pci,mngt) driver started /pci/pci-isa: sun:pci-bios-(bus,isa) driver started /pci/pci-isa/smc1660-0: Ethernet address : 00:00:c0:cb:9f:65 /pci/pci-isa/smc1660-0: sun:isa-smc1660-ether driver started /pci/pci-isa/i8254: sun:bus-i8254-timer driver started TICK: using timer device /pci/pci-isa/i8254/i8254, at 100 Hz Boot Monitor Loader v1.3 (env BOOTCONF) env BOOTCONF: 'RARP' *** booting using 'RARP' agent Unit: 0 device name: smc1660-0 Using unit 0 My IP 129.157.173.209, RARP Server IP 129.157.173.59 Loading file 819DADD1.ChorusOS.5.0 on server 129.157.173.59: loaded! Loading file chorus.sitar on server 129.157.173.59: loaded! Boot new image ... DebugAgent: trying to sync with DebugServer... RAM size: 0x2000000 bytes CPU: Pentium/P55C (586-class CPU) Origin = "GenuineIntel" Id = 0x543 Stepping = 3 Adding ETHER_0 (SMC,9,0x240,0xD0000) in the device tree ChorusOS r5.0.0 for Intel x86 - Intel x86 PC/AT Copyright (c) 2001 Sun Microsystems, Inc. All rights reserved. Sun Proprietary/Confidential US Government Rights Use, duplication, or disclosure by the U.S. Government is subject to restrictions set forth in the Chorus Software License Agreement and as provided in DFARS 227.7202-1(a) and 227.7202-3(a) (1995), DRAS 252.227-7013(c)(ii) (OCT 1988), FAR 12.212(a)(1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable. Sun Microsystems, Inc. Kernel modules : CORE SCHED_CLASS [ FIFO RR RT ] SEM MIPC IPC_L MEM_VM KDB TICK MON ENV ETIMER LOG BLACKBOX LAPSAFE VTIMER MUTEX EVENT MEM_DFPXM RTMUTEX UI DATE PERF TIMEOUT LAPBIND DKI MONITOR MKSTAT MEM: memory device 'sys_bank' vaddr 0x7ba9f000 size 0x31c000 /pci/i8259: sun:pci-i8259-pic driver started /pci: sun:x86-bios-(bus,pci,mngt) driver started /pci/pci-isa: sun:pci-bios-(bus,isa) driver started /pci/pci-isa/smc1660-0: Ethernet address : 00:e0:29:12:84:de /pci/pci-isa/smc1660-0: sun:isa-smc1660-ether driver started /pci/pci-isa/i8254: sun:bus-i8254-timer driver started /pci/pci-isa/mc146818: sun:bus-mc146818-(rtc,timer) driver started /pci/pci-isa/ns16550-2: sun:bus-ns16550-uart driver started /pci/pci8086,7100@0,0: device node is created by sun:pci-enumerator- /pci/pci8086,7110@1,0: device node is created by sun:pci-enumerator- /pci/pci8086,7111@1,1: device node is created by sun:pci-enumerator- /pci/pci8086,7112@1,2: device node is created by sun:pci-enumerator- /pci/pci8086,7113@1,3: device node is created by sun:pci-enumerator- /pci/pci102b,51b@b,0: device node is created by sun:pci-enumerator- /pci/pci8086,7111@1,1: sun:pci-piix-ata driver started TICK: using timer device /pci/pci-isa/i8254/i8254, at 100 Hz DATE: using rtc device /pci/pci-isa/mc146818 MEM: VM resource manager daemon starts MEM: PXM mapper daemon starts (site 0x1) MEM: PXM fs flush daemon starts C_OS Init Copyright 1997, 1998, 1999, 2000, 2001 Sun Microsystems C_OS Init FreeBSD 4.1-RELEASE C_OS Init malloc space from: 0x7b8df000 to: 0x7b9cf000 [240 items of size: 4096] C_OS Init cluster space from: 0x7b9cf000 to: 0x7ba8f800 [129 items of size: 2048] C_OS Init callout pool from: 0x7ba8f890 to: 0x7ba90c10 [208 items of size: 24] C_OS Init callwheel from: 0x7ba90c10 to: 0x7ba91410 [256 items of size: 8] C_OS Init io-buf pool from: 0x7ba91410 to: 0x7ba94610 [64 items of size: 200] C_OS Init raw io-buffer pool from: 0x7ba94610 to: 0x7ba95f10 [32 items of size: 200] C_OS Init pid hash table from: 0x7ba95f50 to: 0x7ba95f90 [16 items of size: 4] C_OS Init pgrp hash table from: 0x7ba95f90 to: 0x7ba95fd0 [16 items of size: 4] C_OS Init ui hash table from: 0x7ba95fd0 to: 0x7ba95fe0 [4 items of size: 4] C_OS Init Current date: Thu Sep 6 14:12:55 GMT 2001 C_OS Init maxsockets 128 maxfiles 128 nmbclusters 128 C_OS Init max disk buffer space = 0x120000 DISK: warning -- svDeviceLookup(disk) failed (-7) CDROM: warning -- svDeviceLookup(cdrom) failed (-7) /rd: sun:ram--disk driver started C_OS warning: Initialization of DEV_NVRAM feature fails sysevent: system events configured. sysevent: default queues: 0:(1,128) 1:(1,128) 2:(64,512) 3:(1,128) C_OS Init Real-time signals on: posix_sigqueue_max 32 C_OS Init initproc created pid=1 (init) C_OS Init initproc created pid=1 (init) C_OS Init initproc created pid=1 (init) C_INIT: console 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 iomMakeDevHandler name = bpf iomMakeDevHandler name = bpf iomMakeDevHandler name = ifeth bpf: ifeth0 attached C_OS: ifeth0 bound to device /pci/pci-isa/smc1660-0 iomMakeDevHandler name = lo bpf: lo0 attached ifeth0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet 129.157.173.109 netmask 0xffff0000 broadcast 129.157.255.255 ether 00:e0:29:12:84:de lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet 127.0.0.1 netmask 0xff000000 C_INIT: rshd started |
Issue a command to the target system.
For example:
$ rsh target_hostname mount root_device on / (pdevfs) devfs on /dev (pdevfs) devfs on /image (pdevfs) /dev/bd00 on /image/sys_bank (msdos) |
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.