Chapter 2 How to Configure the System
Image
This chapter explains how to create a system image with support for
file systems and related hardware.
Note -
Before attempting to configure any of the features and tunables described
below, check that they are supported by your ChorusOS system. Consult the
appropriate document in the ChorusOS 4.0 Target Family Documentation
Collection to determine which features and tunables your version
supports.
For descriptions of available features and tunables, read the appropriate
sections of the ChorusOS 4.0 Introduction. For more details concerning
features, see ChorusOS man pages section 5FEA: ChorusOS Features.
2.1 What ChorusOS Systems Support
This section reviews the file systems and related media supported for
the ChorusOS 4.0 product. As stated in the note above, support for specific ChorusOS
file systems and hardware devices depends on the target family.
2.1.1 Supported Media
The ChorusOS 4.0 product supports the following hardware, although not
necessarily for all target platforms:
- Flash memory
-
Flash
device support is implemented using Flite 1.2. Flash support allows you to
use only MS-DOS file systems on supported flash devices.
- IDE hard disk drives
-
Supported hard disk drives must be connected
to an IDE, ST506 or ESDI compatible disk controller.
- RAM disk memory
-
RAM disk support allows you to create
disk-like entities and use file systems in random-access memory.
- SCSI hard disk drives
-
Selected SCSI hard disk
drives and SCSI-PCI I/O processors of
the NCR53C8xx family are supported.
ChorusOS 4.0 requires that you use special device driver files in order
to read from and write to these devices. See "2.3 Required Special Device Driver Files"
and special(7S)
for details.
2.1.2 Supported File Systems
The ChorusOS 4.0 product supports the following file systems, although
not necessarily for all target platforms:
- Network File System
(NFS)
-
NFS is the standard among
UNIX operating systems for sharing file systems over the network. ChorusOS
systems can support both NFS client access to shared file
systems and NFS server capabilities to share local file
systems with other systems on the network.
- File Allocation Table (FAT) File System
-
Also known as the MS-DOS file
system, this supports file allocation tables with 12, 16 or 32-bit entries,
making it possible to support long file names.
- UNIX File System (UFS)
-
Also known
as the Fast File System, this supports long file names and links, and is the
required type for file systems exported through NFS.
- Swap File System
-
The ChorusOS 4.0 product also supports the use of
a swap partition on supported local hardware devices.
The following table summarizes which file systems are supported for
which media.
Table 2-1 File System Support By Media
| |
MS-DOS
|
UFS
|
Swap
|
|
Flash
|
X
| | |
|
IDE
|
X
|
X
|
X
|
|
RAM disk
|
X
|
X
| |
|
SCSI
|
X
|
X
|
X
|
2.2 How to Add Support for File Systems and Related Hardware
Adding Support Using the Graphical
User Interface Tool
To configure your system image with support for file systems and related
hardware through the ews graphical user interface, follow
the procedure below.
-
Open your system image configuration in ews:
host% cd build_dir
host% ews conf/ChorusOS.xml &
|
-
Use the hints in the following tables to set features and tunables for
the file system support needed.
The following table lists the feature and tunable settings required
for your ChorusOS system to support the media on which you use file systems.
Table 2-2 Media Support
|
To include support for...
|
Set...
|
Comments
|
|
Flash memory
|
FLASH=true
|
Flash memory supports only FAT
(MS-DOS) file systems.
|
|
IDE hard disk drives
|
IDE_DISK=true
|
Enables support for hard disk drives connected to compatible IDE, ST506 and ESDI controllers.
|
|
RAM disk memory
|
RAM_DISK=true
iom.ramdiskX.size=size_in_hex
iom.ramdisk.sizeMax= max_RAM_disk_size
|
iom.ramdiskX.size, where X is a hexadecimal
digit 0, 1, 2, ..., d, e, f, takes a size in the
same hexadecimal format as the value for iom.ramdisk.sizeMax. For example,
if you want to have one 4MB RAM disk
use iom.ramdisk0.size= 0x40000.
|
|
SCSI hard disk drives
|
SCSI_DISK=true
|
Enables support for SCSI-PCI I/O processors
of the NCR53C8xx family.
|
The following table summarizes the feature and tunable settings required
for your ChorusOS system to support specific file systems.
Table 2-3 File System Support
|
To include support for...
|
Set...
|
Comments
|
|
FAT (MS-DOS) file
systems
|
MSDOSFS=true
iom.nbuf=32 (at
least)
| |
|
NFS client capability (for mounting NFS file
systems)
|
NFS_CLIENT=true
iom.nbuf=8
(at least)
| |
|
NFS server capability (for exporting file systems)
|
NFS_CLIENT=true
NFS_SERVER=true
iom.kmemsize=0x80000
(at least)
iom.nbuf=8 (at least)
|
The ChorusOS system can export only local UFS file systems
through NFS.
MS-DOS file
systems cannot be exported through NFS.
|
|
Swap file
system
|
FS_MAPPER=true
ON_DEMAND_PAGING=
true (except for PowerPC target family architectures)
|
Swap may only be used on local media.
Only one swap device may
be used.
Swap is only available in the VM memory
model, where VIRTUAL_ADDRESS_SPACE =true.
|
|
UNIX (UFS) file systems
|
UFS=true
iom.nbuf=8 (at least)
|
UFS file systems cannot be used on flash media.
|
The iom.nbuf tunable sets the number of buffer
cache entries; the standard buffered entries used for input and output. The
larger the value, the larger the cache available. The iom.nbuf tunable influences the amount of RAM used
by the system.
The iom.kmemsize tunable sets the amount of
memory available to the kernel.
-
Save your changes to the system image configuration.
-
Build the system image.
Adding Support Using Command-Line
Tools
To configure your system image with support for file systems and related
hardware through the configurator(1CC) command-line interface, follow the
procedure below.
-
Change to the directory where you build system images:
-
Use the hints in the tables above (see Step 2)
to set features and tunables for the file system support needed.
configurator(1CC)
commands to set features and tunables take the form:
host% configurator -c conf/ChorusOS.xml -set feature | tunable=value
|
-
Build the system image to include the modifications you have made:
host% make system_image_name
|
2.3 Required Special Device Driver Files
This section reviews the special device driver files required for file
system support.
If your target is an NFS client only (all its files
are physically located on another system, such as the host workstation), you
can skip this section.
2.3.1 What Special Files Are
The ChorusOS system requires you to use special(7S) device driver
files to access the hardware devices where file systems reside. This means
that disk labelling and other operations on uninitialized and unmounted file
systems must be done using special files.
Each disk partition corresponds to at least one special file. Unless
you plan to use a raw partition directly, without a file system, you must
be able to access each partition in both block (buffered) mode and raw (character)
mode, so you must create not just one special file per partition, but two.
Each special file:
-
Refers to either a block or a raw device. Block devices are
used by file systems. Raw devices are used primarily for file system administration.
-
Has a major number. Major
numbers are used by the system to select the corresponding device driver when
several devices are configured. Major numbers are the same for all devices
managed by a given device driver and a given access method (raw or block).
For example, all devices corresponding to hard disk partitions using raw mode
have the same major number.
-
Has a minor number. Minor
numbers are not used directly by the system, but by the selected device driver.
Minor numbers are different for each partition on a device. Their scope is
limited to the device described by the major number, so special files with
different major numbers may share the same minor number. One minor number
corresponds to one partition.
2.3.2 Naming Conventions for Special Files
Special files normally reside in the /dev directory, which is mounted at boot time. By convention, special
file names follow the form /dev/rsuffix
for raw (character) mode and /dev/suffix
for buffered (block) mode.
The suffix is made up of:
-
A string of letters referring to the device driver name, such
as sd for a SCSI disk, rd
for a RAM disk, hd for an IDE disk or flash for flash,
-
Followed by a digit representing the disk unit
number, such as 0, 1, 2
and so forth (except for special files not related to file systems, such as tty device files),
-
Terminated by a single letter referring to the
partition, such as a, b, ... h.

Caution -
Special care must be taken with partition c. Partition c represents the whole disk and therefore must not be
used to support a file system.
As file systems are based on BSD 4.4
as implemented in FreeBSD 2.2.7,
the same limitations found in FreeBSD 2.2.7 apply to ChorusOS file system management. According to limitations
imposed by FreeBSD, a disk can
be divided into a maximum of eight different partitions for IDE
and SCSI devices, two partitions for RAM
and flash devices. Partitions can be left undefined. Partitions are named
using a single character in the range from a to h, each letter corresponding to one of the eight partitions for IDE and SCSI devices. For RAM
and flash devices, only partitions a and c
are available.
2.4 How to Create Special Files
You create special files using mknod(1M) on the ChorusOS system. Generally, you
create the special files you need at boot time by including commands in the
system initialization file, sysadm.ini(4CC).
Note -
Unlike earlier releases that used special device driver files created
on the host, the ChorusOS 4.0 product only lets you create special files on the
target.
Previous releases allowed you to create special files on the host because
no /dev directory was available at
boot time. As the ChorusOS 4.0 product mounts a /dev directory at boot time, it is no longer necessary to create
special files on the host.
Creating Special Files at Boot
Time
To create special files at boot time using the sysadm.ini(4CC) file embedded
in the system image, follow the procedure below:
-
Change to the directory containing sysadm.ini:
-
Include commands of the following form in sysadm.ini
using the C_INIT(1M)
built-in command mknod(1M):
mknod /dev/name [b|c] maj_nbr min_nbr
where name follows the pattern described
above in "2.3.2 Naming Conventions for Special Files", b
represents a buffered (block) device, c represents a character
(raw) device, maj_nbr is the major number of the
device and min_nbr is the minor number of the partition
on the device. The following table lists memory devices by major number:
|
Major Number
|
Device
|
Mode
|
|
3
|
ISA/IDE disk
|
character
(raw)
|
|
4
|
ISA/IDE disk
|
block
(buffered)
|
|
7
|
Flash device
|
character (raw)
|
|
8
|
Flash device
|
block (buffered)
|
|
9
|
SCSI disk
|
character (raw)
|
|
10
|
SCSI disk
|
block (buffered)
|
|
13
|
RAM disk
|
character (raw)
|
|
14
|
RAM disk
|
block (buffered)
|
Note that RAM disk devices used for memory banks
conventionally have major numbers 11 and 12
and are used internally by the system to make the contents of the memory banks,
including the system image, available for use at boot time.
-
Build the system image to include modifications to sysadm.ini:
host% cd ..
host% make system_image_name
|
Creating Special
Files Manually
To create special files manually on a running ChorusOS target system:
Run commands on the target of the type:
host% rsh target mknod /dev/name [b|c] maj_nbr min_nbr
|
Where name follows the pattern described
above in "2.3.2 Naming Conventions for Special Files", b
represents a buffered (block) device, c represents a character
(raw) device, maj_nbr is the major number of the
device and min_nbr is the minor number of the partition
on the device.