Basic Packaging of Bootable Device DriversPackages, Patches, and DU diskettesAll software products for Solaris, including device drivers, are delivered in a format known as a package. This format is defined by the Application Binary Interface (ABI), which is a supplement to the System V Interface Definition (SVID). Various documents, such as Chapter 3 of the Solaris Porting Guide, or the Application Packaging Developer's Guide, and various applicable man pages, provide detailed information about packages. Note that the package constructed to deliver a device driver must meet all the requirements for a Solaris software product for x86 platforms.The DU diskette is the mechanism to provide a new device driver and software package to the Solaris (Intel Platform Edition) operating environment. The diskette format consists of a simple MS-DOS format directory tree containing the individual bootable device driver components used by the Solaris (Intel Platform Edition) boot subsystem and a compressed archive file containing the software package that will install them onto the root (/) filesystem. The bootable device driver components are passed directly to the boot subsystem in a Tools/Boot subdirectory, along with a special driver.itu(4) configuration file that directs the boot subsystem on how to overlay the driver components onto Solaris install media. The compressed archive file containing the software package is located in a Products/ subdirectory. DU diskette(s) are processed twice during the Solaris (Intel Platform Edition) installation or upgrade, initially during system configuration and then at the end of the process. While configuring your system with the Solaris (Intel Platform Edition) Device Configuration Assistant program, if you select the F4_Driver Update menu choice, you are prompted for the DU diskette(s) so the Configuration Assistant can load in the overlayed bootable device driver components used during the installation or upgrade process. Then, at the conclusion of this process, you are prompted again for the DU diskette(s) containing any bootable device drivers whose hardware devices have been detected on your system. Bootable device drivers on DU diskettes can be added to previously installed Solaris systems at any time simply by running the mandatory install.sh shell script included on the DU diskette. Choosing a Package NameIt is important to choose a unique name for each Solaris package, across all Solaris platforms and releases. When choosing a package name, follow the general restrictions associated with selecting a driver name; but, also capitalize the initial vendor-unique characters, or prefix (for example, "IBMuraid" for an IBM Ultra Raid device driver). Too, search current Solaris releases and perform a more general web search to ensure the uniqueness of the chosen package name, as you did with the device driver name. Note also that the package name and abbreviation are identical for basic packages created by the third-party driver packages and thus have a 9 character maximum length.Introduction to Third-Party Packaging ToolsWhile packages, patches, and DU diskettes may all be constructed manually, several tools are provided to simplify the process:Builds a basic package and DU diskette for a bootable device driver Basic pkg_drv(1M) Usagepkg_drv(1M) is a basic convenience utility that captures the arguments to the add_drv(1M) command (which is the system maintenance command used to add a Solaris driver to a system) and constructs a DU diskette containing the bootable device driver components and also a simple package to install these components. (Writing Device Drivers, available on docs.sun.com, provides detailed information on the required arguments for the add_drv(1M) command). Bootable driver components are searched for in the current directory where the utility is run, and the default output is the diskette drive (/floppy/floppy0).For example, to create a DU diskette for a Solaris 7 Ultra SCSI driver from XYZ corporation, onto a blank diskette, the following would be chosen: # mkdir dir
(gather components)
The pkg_drv(1M) utility notes the add_drv(1M) options that are required to add the bootable device driver to a Solaris system, locates bootable components in the current directory, and builds a basic package containing these components (including a postinstall procedure script that invokes add_drv(1M) when the package is applied). pkg_drv then creates a simple driver.itu(4) that describes the bootable components and copies the constructed driver.itu(4) special file, bootable components, and constructed package to the MS-DOS formatted DU diskette. pkg_drv reports on the bootable components used as input files, the progress of creating package and diskette files, and the location of output files, as well as the count of any warnings and errors encountered, in a format similar to the following: input file: bef=xyzuraid.bef input file: drv=xyzuraid input file: conf=xyzuraid.conf input file: man=xyzuraid.7d ## Building pkgmap from package prototype file. ## Processing pkginfo file. ## Attempting to volumize 11 entries in pkgmap. part 1 -- 460 blocks, 21 entries ## Packaging one part. /tmp/14374/XYZuraid/pkgmap /tmp/14374/XYZuraid/pkginfo /tmp/14374/XYZuraid/reloc/boot/solaris/devicedb/master /tmp/14374/XYZuraid/reloc/boot/solaris/drivers/isa.175/xyzuraid.bef /tmp/14374/XYZuraid/install/copyright /tmp/14374/XYZuraid/install/depend /tmp/14374/XYZuraid/install/i.master /tmp/14374/XYZuraid/reloc/kernel/drv/xyzuraid /tmp/14374/XYZuraid/reloc/kernel/drv/xyzuraid.conf /tmp/14374/XYZuraid/install/postinstall /tmp/14374/XYZuraid/install/postremove /tmp/14374/XYZuraid/install/r.master /tmp/14374/XYZuraid/reloc/usr/share/man/man7d/xyzuraid.7d ## Validating control scripts. ## Packaging complete. output pkg: See package directory XYZuraid in /tmp/14374 output diskette image: See image file /tmp/14374/ITU.3 pkg_drv: 0 warnings 0 errorsIn addition to the standard packaging files associated with a Solaris package, note that pkg_drv creates entries for a special boot subsystem file named "master" and special install scripts known as class action scripts that apply the lines in the package copy of the devicedb/master file to the system's version. This illustrates the preferred method for Solaris packages to make changes to shared system files, with idempotent editing scripts. In general, edits should be made so they are correct if the edit script is run several times, and edits should be reversible. The devicedb(4) man page provides detailed information on the required contents of the master file. The benefit to note is that pkg_drv automatically creates a basic package, driver.itu(4) file, devicedb(4) entry, and DU diskette for the bootable device driver. It also creates a Solaris package name (with a capitalized prefix) from the driver name. Several command-line options and override files can be used to further customize the contents of the package pkg_drv generates, such as specifying the package name. The
pkg_drv command also accepts an overriding package with the -P option so
that an arbitrarily complex package can be delivered.
[Previous | Contents | Next][Return to Driver Tools]Solaris OS on x86 Platforms: Third-Party Packaging Tools (A White Paper) | |||
|
| ||||||||||||