mkboot(1M) mkboot(1M)
NAME
mkboot - convert an object file to a bootable object file
SYNOPSIS
/usr/sbin/mkboot [ -m master ] [ -d directory ] -k kernel_obj [-f
kernel_master ]
/usr/sbin/mkboot [ -m master ] [ -d directory ] obj_file
DESCRIPTION
The mkboot command is used to create a new object file from a
previous object file and its associated master file; the new object
file can be used by the cunix program to configure a new bootable
operating system.
Typically, a user makes changes to one or more files in the directory
/etc/master.d [files in this directory are called master files, and
are in the format specified in the master(4) manual page].
Then, the user executes a mkboot command (with appropriate options)
from the /boot directory; the /boot directory is used to hold all
device driver object files that must be configured into the bootable
operating system so that the operating system correctly reflects the
current configuration of the machine.
One mkboot command must be executed for each master file changed.
The mkboot command updates the existing object file in /boot with the
changes made to its associated master file.
After executing all necessary mkboot commands, the user then either
configures a new bootable operating system from firmware mode and
reboots the system, or uses the cunix command to configure a new
bootable operating system at the user level.
The user must specify either the -k option with the kernel object
file name (usually KERNEL), or the name of another object file to be
changed (usually a file in /boot). The object file name used can be
a relative or full pathname, and can have an optional .o suffix.
If the -k option is used, the master file name kernel is assumed; -f
can be used to specify a master file other than kernel to build the
kernel_obj object.
If obj_file is specified instead of -k, the named obj_file must have
an associated file in /etc/master.d; the name of the associated
master file is the name of the obj_file in lowercase letters, without
any path prefix or .o suffix.
If you are making a new object file for the kernel, you must use the
-k option to specify the kernel object file; if you process a kernel
object file without the -k option, the resulting object file will be
unusable by cunix (an error is returned by cunix that says that no
8/91 Page 1
mkboot(1M) mkboot(1M)
object was flagged as the kernel; this flag is added to the object
file only when -k is specified).
The -m and -d options are used to specify alternate locations for
master files and object files output by mkboot:
-m master This option specifies the directory containing the
master files to be used for the object file. The
default master directory is /etc/master.d.
-d directory This option specifies the directory to be used for
storing the new object file. The default output
directory is /boot.
To create a new object file, the applicable master file is read and
the configuration information is extracted. Then, the old object
file is read from the current directory, and changed to reflect the
new configuration information. The resulting new object file is
written to the output directory specified by the -d option or to
/boot. It is given the same name as specified by obj_file or
kernel_obj, in uppercase letters and without any .o suffix.
Note that if the output directory is the same as the current working
directory when mkboot is executed, then the output object file
overwrites the previous object file residing in the directory.
EXAMPLE
mkboot -m newmaster gentty.o
This will read the file named gentty from the directory newmaster for
the gentty device configuration data, take the file gentty.o from the
current directory, and create the object file /boot/GENTTY for use in
configuring a new operating system.
cd /boot; mkboot -k KERNEL
This will read the file named kernel from the directory /etc/master.d
for the new kernel configuration data, take the file KERNEL from the
current directory, and create the /boot/KERNEL object file.
cd /boot; mkboot sem
This will read the file named sem from the /etc/master.d directory,
take the file SEM from the current directory (/boot), and place the
output file in /boot/SEM.
DIAGNOSTICS
mkboot FILE (FILE does not exist)
mkboot: FILE: cannot open: No such file or directory
mkboot -d dir SEM (dir does not exist)
Page 2 8/91
mkboot(1M) mkboot(1M)
mkboot: dir: cannot open: No such file or directory
mkboot: SEM; not processed
SEE ALSO
cunix(1M), master(4)
System Administrator's Guide
8/91 Page 3