ChorusOS 4.0 x86/Pentium Target Family Guide

How to Build and Boot a System Image on the Target

The procedures below concern x86/Pentium target systems.


Note -

The x86/Pentium configuration for this release differs from that used in previous versions.

Read the procedures below carefully.


Building a ChorusOS System Image

The following procedure assumes that the ChorusOS 4.0 product has already been correctly installed on the host workstation. See the ChorusOS 4.0 Installation Guide for Solaris Hosts for instructions.

  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:

    Set the environment variable... 

    To the family-specific product directory. The default value is... 

    DIR

    /opt/SUNWconn/SEW/4.0/chorus-x86 

  3. Make sure your PATH has been set correctly to include the directory install_dir/4.0/chorus-x86/tools/host/bin, where the default install_dir is /opt/SUNWconn/SEW. Also make sure that your PATH includes /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/drv \ 
    $DIR/src/nucleus/bsp/x86 \ 
    $DIR/src/nucleus/bsp/x86/i386at \ 
    $DIR/src/iom
    

    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 may choose 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/opt/jvm \ 
    $DIR/tools \ 
    -s $DIR/src/nucleus/bsp/drv \ 
    $DIR/src/nucleus/bsp/x86 \ 
    $DIR/src/nucleus/bsp/x86/i386at \ 
    $DIR/src/iom \ 
    $DIR/src/opt/examples
    

    If you are building from the source distribution, see the ChorusOS 4.0 Production Guide.

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

  5. Generate the build environment:


    $ make
    
  6. Build a system image:


    $ make chorus
    

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


    Note -

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


    $ make kernonly
    

Placing the System Image on the Boot Server

See the ChorusOS 4.0 Installation Guide for Solaris Hosts 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.bmon boot_server:/tftpboot
    
  2. 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*
  3. 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.4.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

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


    Note -

    The system first attempts to find the configuration file with the .ChorusOS.4.0 extension. If it fails to find one, however, it attempts to find a configuration file without the .ChorusOS.4.0 extension.


Creating a bootMonitor Diskette

See bootMonitor(1CC) 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 bootMonitor build directory based on the binary distribution:


    $ configure -b $DIR/kernel \ 
    $DIR/os \ 
    $DIR/tools \ 
    -s $DIR/src/nucleus/bsp/drv \ 
    $DIR/src/nucleus/bsp/x86 \ 
    $DIR/src/nucleus/bsp/x86/i386at \ 
    $DIR/src/iom
    
  3. Generate the build environment:


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

    #
    #	Mini Profile
    #
    
    #
    #	Kernel 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 LOADER=lilo
    
  6. (Optional) Configure the build environment for any ISA Ethernet adapters on the target system.

    If you have only PCI Ethernet adapters, you can skip this step.

    ISA 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]]

    The parameters are as follows:

    id

    A decimal value ranging from 0 to 9.

    Up to ten ISA Ethernet adapters can be declared using ETHER_0, ETHER_1, ..., ETHER_9.

    name

    The type of the device: EL3, NE2000 or SMC.

    irq

    A decimal value representing the interrupt request level on the ISA bus.

    io_base

    A hexadecimal value representing the base for I/O ports, such as 0x300.

    mem_base

    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
    
  7. Build a bootMonitor image:


    $ make bootMonitor
    

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

  8. Copy the bootMonitor image to a diskette:


    $ su
    Password: root_password
    # /etc/init.d/volmgt stop
    # fdformat -v /dev/fd0
    Formatting 1.44 MB in /dev/rfd0
    Press return to start formatting floppy.
    ................................................................................
    vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    # cp bootMonitor.image /dev/fd0
    # /etc/init.d/volmgt start
    volume management starting.
    # eject
    /vol/dev/rdiskette0/unlabeled can now be manually ejected
    # exit
    
How to Boot the Target System Using a bootMonitor Diskette
  1. Shut down the system.

  2. Connect a serial line from the first serial line port on the target system to the host workstation in order to view console output.

    You can use a terminal-type serial cable, where wires 2 and 3 are crossed and 7 (the ground) is straight. However, a serial cable in which all wires are parallel will not work.

  3. 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
  4. Connect to the target system using the tip(1) utility:


    $ tip target_hostname
    connected
  5. Place the bootMonitor diskette in the drive.

  6. 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:


    DebugAgent: trying to sync with DebugServer... 
    RAM size: 0x8000000 bytes
    
    ChorusOS r4.0.0 for Intel x86 - Intel x86 PC/AT
    Copyright (c) 1999 Sun Microsystems, Inc. All rights reserved.
     
    Kernel modules : CORE SCHED_FIFO MEM_FLM KDB TICK ENV LAPSAFE MUTEX PERF \ 
    TIMEOUT LAPBIND DKI 
    /pci/i8259: sun:pci-i8259-pic driver started
    /pci: sun:x86-bios-(bus,pci) driver started
    /pci/pci8086,7190@0,0: device node is created by sun:pci-enumerator-
    /pci/pci8086,7191@1,0: device node is created by sun:pci-enumerator-
    /pci/pci8086,7110@4,0: device node is created by sun:pci-enumerator-
    /pci/pci8086,7111@4,1: device node is created by sun:pci-enumerator-
    /pci/pci8086,7112@4,2: device node is created by sun:pci-enumerator-
    /pci/pci8086,7113@4,3: device node is created by sun:pci-enumerator-
    /pci/pci10b8,5@a,0: device node is created by sun:pci-enumerator-
    /pci/pci-isa: sun:pci-bios-(bus,isa) driver started
    /pci/pci-isa/i8254: sun:bus-i8254-timer driver started
    /pci/pci10b8,5@a,0: sun:pci-epic100-ether device started
    /pci/pci10b8,5@a,0: Ethernet Address 00:e0:29:3c:6c:7f
    
    Boot Monitor Loader (v1.0)
    
    Searching for adapters...
    Unit: 0  device name: pci10b8,5@a,0
    
    Using unit 0
    
    My IP 129.157.197.88, RARP Server IP 129.157.197.144
    
    Loading file 819DC558.ChorusOS.4.0 on server 129.157.197.144: loaded!
    
    Loading file chorus.bmon on server 129.157.197.144: loaded!
    
    Booting downloaded file.
    
    Boot new image ...
    DebugAgent: trying to sync with DebugServer... 
    RAM size: 0x8000000 bytes
    
    ChorusOS r4.0.0 for Intel x86 - Intel x86 PC/AT
    Copyright (c) 1999 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 0x7bc43000 size 0x189000
    /pci/i8259: sun:pci-i8259-pic driver started
    /pci: sun:x86-bios-(bus,pci) driver started
    /pci/pci8086,7190@0,0: device node is created by sun:pci-enumerator-
    /pci/pci8086,7191@1,0: device node is created by sun:pci-enumerator-
    /pci/pci8086,7110@4,0: device node is created by sun:pci-enumerator-
    /pci/pci8086,7111@4,1: device node is created by sun:pci-enumerator-
    /pci/pci8086,7112@4,2: device node is created by sun:pci-enumerator-
    /pci/pci8086,7113@4,3: device node is created by sun:pci-enumerator-
    /pci/pci10b8,5@a,0: device node is created by sun:pci-enumerator-
    /pci/pci-isa: sun:pci-bios-(bus,isa) 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/pci-isa/generic-ide: sun:bus-generic-ide driver started
    /pci/pci10b8,5@a,0: sun:pci-epic100-ether device started
    /pci/pci10b8,5@a,0: Ethernet Address 00:e0:29:3c:6c:7f
    IOM: SOFTINTR DISABLED (-31). Using an Interrupt thread
    IOM Init cluster space from: 0x7bc1f000 to: 0x7bc3f800 [65 items of size: 2048]
    IOM Init io-buf pool from: 0x7bc3f850 to: 0x7bc3fd70 [8 items of size: 164]
    IOM Init raw io-buffer pool from: 0x7bc3fd70 to: 0x7bc411f0 [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
    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 /pci/pci10b8,5@a,0
    bpf: lo0 attached
    C_INIT: Internet Address: 129.157.197.88
    C_INIT: RARP Network Initialization OK
    ifeth0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            inet 129.157.197.88 netmask 0xffff0000 broadcast 129.157.255.255
            ether 00:e0:29:3c:6c:7f 
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
            inet 127.0.0.1 netmask 0xff000000 
    C_INIT: rshd started
  7. Issue a command to the target system to make sure things are working properly. 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)