Configuring HP-UX For Peripherals
286 AppendixC
Major and Minor Numbers
Associating a Custom Driver with a Peripheral
format (which resembles that of the DRIVER_INSTALL portion of
/usr/conf/master.d/core-hpux):
$DRIVER_INSTALL
<driver_name> -1 -1
$$$
For example, here is a file for the disco driver.
$DRIVER_INSTALL
disco -1 -1
$$$
d. Verify that the driver you are installing has been built into a library
that can be found by the mk_kernel utility.
If you have been provided this driver from a third-party company,
their engineers are likely to have compiled the driver into a library
which you will have loaded into /usr/conf/lib when you loaded
their tape onto your system.
To examine an archive, run the ar command with the -t option,
giving the library as an argument. Hopefully, you will see the file
(such as disco.o, or whatever file name the driver is stored in)
among the files included in the output from the command.
/usr/ccs/bin/ar -t /usr/conf/lib/libdisco.a
If you do not find the file, you will need to add the driver into a library
in /usr/conf/lib. Do this with the -r option of the ar command. For
example, to add disco.o to /usr/conf/lib/libhp-ux.a, execute the
following:
/usr/ccs/bin/ar -r /usr/conf/lib/libhp-ux.a disco.o
Once you have verified that the .o file is present in a library
accessible to mk_kernel, you are ready to build your kernel to include
the new driver.
e. Make sure you returned to the /stand/build directory. Build the
kernel by invoking the mk_kernel command. This action creates
/stand/build/vmunix_test, a kernel ready for testing.
/usr/sbin/mk_kernel -s system
f. Verify that everything built correctly by executing the nm command
and greping for the driver name. The command string should return
at least one entry, such as that shown below.
/usr/ccs/bin/nm vmunix_test | grep disco