STREAMS/UX for the HP 9000 Reference Manual

114
How to Compile and Link STREAMS/UX Drivers, Modules, and Applications
Linking STREAMS/UX Drivers and Modules into the Kernel
For more details on driver headers and driver install routines, please read the
HP-UX Driver Development Guide (P/N 98577-90000-E1).
Dynamically-Assigned Major Numbers and lsdev(1)
When using the dynamic major number facility, you will need to determine
which major number was assigned to your driver during bootup, by
consulting lsdev(1). Once the system is booted with your new kernel, run the
lsdev(1) command. See the lsdev(1) manpage for all the option details, but in
brief you can use lsdev(1) as shown below.
NOTE: For STREAMS-clonable devices, use 72 for the major and your driver’s assigned
major number for the minor number.
lsdev -h -d <
your_driver_name_here
>
(the -h means that lsdev does not print a header)
and use the result for your mknod(1M):
mknod /dev/<device_file_name> c 72 0x<dyn_major result>
mknod /dev/<device_file_name> c <dyn_major result> 0x0
The first mknod command is for a clonable device. The second is for a
non-clonable device.