Specifications

Loadable Modules
13-11
The $modtype line in the Master file lets you define a character string that helps iden-
tify a driver in error messages. This string can be a maximum of 40 characters long,
including all white spaces.
For a description of the Master file format, refer to the Master(4) manual page.
System File Definitions for Loadable Modules 13
To be configured into a running system, all loadable drivers must identify themselves as
loadable drivers in the System component of their DSP. The System file entry required
for loadable drivers is:
$loadable instructs the idbuild(1M) command to configure the driver
into the system as a loadable driver
If you want to configure your driver as a loadable driver, you must define a $loadable
line in the driver's System file that specifies the name of your driver. This line identifies
your driver as a loadable driver type.
Note also that, in the future, if you want to statically link your loadable driver into the ker-
nel, you need to comment out the driver's $loadable line by inserting the character # in
column one.
For a description of the System file format, refer to the System(4) manual page.
CAUTION
Loadable modules that are shipped with your system cannot be
configured as static modules. Because of limitations involving the
static linking of PIC-based (Position-Independent Code) object by
the PowerUX C linker/loader, a loadable module’s PIC-based
Driver.o file cannot be statically configured or linked into a
kernel. It is recommended that you not comment out the
$loadable option in any shipped loadable module’s
/etc/conf/sdevice.d/xxx file, where xxx represents the
name of the driver. The reason is that you cannot rebuild the ker-
nel.
The same CAUTION applies to loadable modules that you develop locally. If you develop
a loadable module and you then want to configure and link your driver as a static module,
you must rebuild the module without specifying the -Zlink=dynamic and the -Zpic
C compiler options. In addition, you must remember to comment out the $loadable
option in the driver’s xxx.cf/System file (where xxx represents the name of the driver)
prior to running the /etc/conf/bin/idinstall utility for the driver.
Mtune File Definitions for Loadable Modules 13
Loadable drivers can override the kernel's global auto-unload delay parameter values by
supplying their own values in the Mtune component of their DSPs.