Specifications
D
evice Driver Programming
14-2
for these commands are provided in the Command Reference. Details about the DSP com-
ponent files (such as the Driver.o, Master, and so on) are covered later in this chapter.
idbuild 14
idbuild builds a UNIX system base kernel and/or configures loadable kernel modules
using the current system configuration in $OBJ/etc/conf.
NOTE
$OBJ is a shell environment variable that you must set and export.
It must expand to a UNIX pathname of the directory in which
/etc/conf directory can be found. For example, if the complete
pathname for /etc/conf is /usr/local/etc/conf you
need to add export OBJ=/usr/local to your environment.
Building a UNIX system kernel consists of three steps.
1. Configuration tables and symbols, and module lists are generated from the
configuration data files.
2. Configuration-dependent files are compiled, and then are linked together
with all of the configured kernel and device driver object modules.
3. If the loadable kernel module feature or a kernel debugger is enabled, ker-
nel symbol table information is attached to the kernel.
The kernel is, by default, placed in $OBJ/etc/conf/cf.d/unix.
If the kernel build is successful and $OBJ is null or /, idbuild sets a flag to instruct the
system shutdown/reboot sequence to replace the standard kernel in /stand/unix with
the new kernel. Then, another flag is set to cause the environment (device special files,
/etc/inittab and so on) to be reconfigured accordingly.
If one or more loadable kernel modules are specified with the -M option, idbuild con-
figures only the specified loadable kernel modules and puts them into the
$OBJ/etc/conf/mod.d directory. Otherwise a UNIX system base kernel is rebuilt
with all the loadable modules reconfigured into the $OBJ/etc/conf/modnew.d
directory, which is changed to /etc/conf/mod.d at the next system reboot if $OBJ is
null or / (see modadmin(1M)).
If a loadable module has already been loaded, you can either unload the module and then
use idbuild with the -M option, or use idbuild without the -M option and reboot the
system. (This assumes that $OBJ is null or /). If you attempt to use the -M option for a
module already loaded, idbuild fails.
When loadable kernel modules are configured with the -M option, idbuild also creates
the necessary nodes in the /dev directory, adding and activating /etc/inittab entries
if any Init file is associated with the modules, and registering the modules to the running
kernel. This makes them available for dynamic loading without requiring a system reboot.