'\"macro stdmacro
.if n .pH g1a.cunix @(#)cunix	40.13 of 10/10/89
.\" Copyright 1989 AT&T
'\"macro stdmacro
.nr X
.if \nX=0 .ds x} cunix 1M "Essential Utilities" "\&"
.if \nX=1 .ds x} cunix 1M "Essential Utilities"
.if \nX=2 .ds x} cunix 1M "" "\&"
.if \nX=3 .ds x} cunix "" "" "\&"
.TH \*(x}
.SH NAME
\f4cunix\f1 \- configure a new bootable operating system
.SH SYNOPSIS
\f4cunix\f1
[\f4\-a\f1 \f2"ld_args"\f1]
[\f4\-b\f1
.IR boot_dir ]
[\f4\-c\f1
.IR config_dir ]
[\f4\-d\f1]
[\f4\-f\f1
\f4system\fP]
[\f4\-g\f1]
.br
[\f4\-i\f1
.IR loader_directive_file ]
[\f4\-l\f1
.IR link_ed ]
[\f4\-o\f1
.IR outfile ]
[\f4\-r\f1
.IR raw_disk ]
[\f4\-v\f1]
.SH DESCRIPTION
The \f4cunix\f1 command creates a new bootable operating system file
from the object files (drivers) specified in the given \f4system\f1 file.
.P
The configuration of a new bootable operating system is usually done
when new hardware or software is added to or removed from the system;  most
frequently it is done during a powerup or reboot of the system.
The \f4cunix\f1 command allows this procedure to be performed at the
user level, without a powerdown or system reboot.
The options to \f4cunix\f1 also allow the user to create customized input
files for the configuration process, and to choose the location
for the resulting bootable operating system.
.P
Both COFF and ELF format object files can be used as input to
\f4cunix\fP.
.P
The options to \f4cunix\f1 are as follows:
.IP \f4\-a\f1 0.5i
Pass the specified \f2ld_args\f1 as arguments to the link editor;  the entire
set of arguments must be enclosed in double quotes, with each
argument surrounded by white space.
By default (no \f4\-a\f1 specified),
\f4\-x\f1 is passed to the link editor as an argument for COFF format
object files (directs the link
editor to omit local symbols from the output symbol table, saving some
space in the output file);  if one or more object files is in ELF
format, then no loader arguments are passed by default.
The link editor \f4ld\f1 is used by default, unless
another is specified with the \f4\-l\f1 option (see below).
.IP \f4\-b\f1
\f2boot_dir\f1 specifies the
directory where driver object files reside;  the default is \f4/boot\f1.
.IP \f4\-c\f1
\f2config_dir\f1 specifies the
directory that contains working files for \f4cunix\f1;  the default is
\f4/config\f1.
.IP \f4\-d\f1
Build the operating system with debug mode on;  the default is debug mode off.
Debug mode populates the \f4sys3bsym\f1 symbol table with symbols
from the kernel object file and drivers specified in the \f4system\f1 file.
The \f4\-d\f1 option causes \f4cunix\f1 to use more disk space and time.
The \f4sys3bsym\f1 table is accessible through the \f4sys3b\f1 system call.
.IP \f4\-f\f1 0.5i
\f4system\fP specifies the
file that contains configuration information;  the default
is \f4/stand/system\f1.
.IP \f4\-g\f1
Do not remove \f2config_dir\f4/conf.o\f1 file after the bootable operating
system has been created;  the default is to remove \f4conf.o\f1.
The directory \f2config_dir\f1 is either \f4/config\f1 or the directory
specified by \f4\-c\f1, above.
.IP \f4\-i\f1 0.5i
\f2loader_directive_file\f1 to be used for configuration;  a
\f2loader_directive_file\f1 specifies
memory locations for loading the operating system at boot time.
A \f2loader_directive_file\fP for a COFF system is called an
\f4ifile\fP, while a \f2loader_directive_file\fP for an ELF system is
called a \f4mapfile\fP.
Normally, it is not necessary to specify a \f2loader_directive_file\f1.
Only use the \f4\-i\f1 option with a custom \f2loader_directive_file\f1.
.IP \f4\-l\f1
Use the \f2link_ed\f1 link editor to bind object files;  the link
editor \f4ld\f1 is used by default.
See NOTES.
.IP \f4\-o\f1 0.5i
\f2outfile\f1 specifies the
output file name for the bootable operating system;  the default is
\f4/stand/unix_test\f1.
.IP \f4\-r\f1
The \f2raw_disk\f1 where the root file system resides;  the default is
\f4/dev/rSA/disk1\f1.
.IP \f4\-v\f1
Verbose mode on;  \f4cunix\fP displays all the modules and drivers
being linked.
The default is verbose mode off.
.SH NOTES
Do not execute a separate \f4ld ... -o /stand/unix\f1 command for the
operating system;  the output file is processed by \f4cunix\f1
after loading.
.SH FILES
.PD 0
.IP \f4/\fP\f2boot_dir\fP\f4/*\fP 1.5i
drivers to be configured into the operating system
.IP \f4/\fP\f2config_dir\fP\f4/conf.o\fP
object file created by \f4cunix\f1
.IP \f4/\fP\f2config_dir\fP\f4/ifile*\fP
loader directive file(s) for COFF system
.IP \f4/\fP\f2config_dir\fP\f4/mapfile*\fP
loader directive file(s) for ELF system
.IP \f4/stand/system\fP
\f4system\f1 file
.IP \f4/stand/unix\fP
bootable operating system
.IP \f4/usr/bin/ld\fP
default link editor
.IP \f4/dev/rSA/disk1\fP
default location of root file system
.PD
.SH SEE ALSO
\f4buildsys\fP(1M),
\f4mkboot\fP(1M),
\f4rc6\fP(1M),
\f4system\fP(4).
.br
\f4ld\fP(1), \f4sys3b\fP(2) in the \f2Programmer's Reference Manual\f1.
.br
\f2System Administrator's Guide\f1.
