Sun Java Solaris Communities My SDN Account Join SDN
 
Downloads

Downloads

 


Maintenance Commands                                  pkg_drv(1M)

NAME
     pkg_drv - 3rd-party driver packaging utility

SYNOPSIS
     /opt/SUNWspro/bin/pkg_drv  [ -add_drv-options ]  [ -a arch ]
     [  -A  ]  [ -d descriptive-string ]  [ -D vendor-string ]  
     [-h ]  [  -L devlink.tab-entry  ]   [  -N package-name  ]   
     [-o output-directory    ]    [   -P override-package   ]    
     [-r solaris-release-level ]  [ -t bus-type ]   [  -V package-
     version ] kernel-module

DESCRIPTION
     pkg_drv   creates  a  Driver  Update  (DU)   MS-DOS   format
     diskette,  which  is used to install Solaris (Intel Platform
     Edition), using bootable device drivers and modules that are
     not  on  the Solaris installation media. pkg_drv formats and
     populates the DU diskette with bootable driver components, a
     driver  description  file (see driver.itu(4)) describing the
     bootable driver components for use  by  the  Solaris  (Intel
     Platform  Edition)  Device  Configuration Assistant program,
     and a simple Solaris package, which is used to  install  the
     bootable driver components at the conclusion of Solaris ins-
     tallation or upgrade.

     The process of installing with a  DU  diskette  begins  with
     choosing  ``F4_Driver Update'' from the Configuration Assis-
     tant menu to read in the unbundled bootable drivers required
     at  install boot time. The device drivers on the DU diskette
     augment drivers on the Solaris boot media. At the conclusion
     of  the Install/Upgrade process, the DU diskette(s) are pro-
     cessed again to add the packages containing the new bootable
     driver components to the newly installed system.

     The types of modules and files the pkg_drv  command  accepts
     are  those  associated  with  device  drivers, miscellaneous
     modules, and other kernel modules. Device driver modules are
     typically  accompanied  by  associated files, such as confi-
     guration files (driver.conf), Solaris (Intel  Platform  Edi-
     tion) realmode drivers (driver.bef), device driver man pages
     (driver.7D), and driver description files (driver.itu).  The
     pkg_drv  command  selects  whichever of these files are sup-
     plied in the current directory and produces  a  DU  diskette
     that  can  be  used  to  install or upgrade a Solaris( Intel
     Platform Edition) system with hardwire  devices  newly  sup-
     ported   by   the   unbundled   device   driver.   (See  the
     driver.conf(4) and driver.itu(4) man pages for more informa-
     tion.)

     The pkg_drv command automatically formats and creates  a  DU
     diskette using /floppy/floppy0. The following options modify
     this default behavior. (Note that most of these options  can
     be  overridden  when  a  manually created driver.itu file is
     supplied.)

OPTIONS
     -A        Appends the bootable files and the package to  the
               diskette image. This allows multiple drivers to be
               delivered on a single diskette.

     -a arch   An alphanumeric token that indicates  the   archi-
               tecture    associated    with   the  package  (see
               pkginfo(4)). If not specified, arch is taken  from
               the  system  on  which the pkg_drv utility is exe-
               cuted.

     -d descriptive-string
               Uses descriptive_string in place  of  the  default
               string for devicedb/master file entries (see devi-
               cedb(4)) and for package description strings  (see
               pkginfo(4)).

     -D vendor-string
               Uses vendor_string in place of the default  vendor
               string    in    the   package   description   (see
               pkginfo(4)).

     -h        Prints the usage statement.

     -L devlink-tab-entry
               Adds  the  specified  devlink_tab_entry   to   the
               /etc/devlink.tab file (see devlinks(1m)).

     -N package-name
               Substitutes package-name in place  of  the  driver
               name  and  package  abbreviation for the generated
               package. Should be  a  vendor-unique  alphanumeric
               string,  with  first  letters capitalized (see the
               definition of the PKG parameter in pkginfo(4)).

     -o output-directory
               Writes output  to  output-directory,  rather  than
               /floppy/floppy0. output-directory can be an alter-
               nate diskette name or a directory name.

     -P override-package
               Use override-package as  the  package  on  the  DU
               diskette,  which installs the bootable driver com-
               ponents. override-package is a package in  cpio(1)
               format  and  should be compressed via compress(1).
               This option permits arbitrarily  complex  packages
               to  be  supplied to install driver software, over-
               riding the simple package  pkg_drv(1M) is able  to
               create.

     -r solaris-release-level
               Use  release  to  specify  the  operating   system
               release level (see the uname(1) -r option) for the
               DU diskette  image.  If  not  specified,  solaris-
               release-level  is  taken  from the system on which
               the pkg_drv utility is executed.

     -t bus-type
               Use  the   given   bus-type   in   the   generated
               devicedb/master  file  (see  devicedb(4)  for more
               information)  instead  of   the   bus-type   value
               automatically determined by pkg_drv(1M).

     -V package-version
               Use the pkg-version option instead of generating a
               new package version when creating the driver pack-
               age (see pkginfo(4)).

OPERANDS
     kernel-module
               A path name of  a  kernel  module  and  associated
               files to be packaged.

NOTES
     If a manually created driver.itu(4) file or package is to be
     supplied to  pkg_drv(1M), it's best to run the utility first
     and modify the generated package and .itu file.

     The  boot  subsystem  provides  a  configuration  flag  (see
     eeprom(1M))  that  can  be set to display detailed debugging
     information about the DU diskette process.  This includes an
     extensive  parser  for  driver.itu(4)  file format.  To use,
     edit the confflags property via the boot subsystem menu sys-
     tem, or via editing the /boot/solaris/bootenv.rc file on the
     boot diskette. The -d option displays  extended  information
     on the processing of the DU diskette and driver.itu(4) file,
     for example:

     setprop confflags="-f -0xd8fffffff"

     Aliases may require quoting (with   double-quotes)  if  they
     contain numbers. See add_drv(1M) for more information.

     pkg_drv will not accept a driver without  a  matching  .conf
     file,  or  vice-versa, due to boot subsystem restrictions on
     some Solaris releases.

     pkg_drv should generally be run on the same release  as  the
     delivery target for the kernel module or driver.

     pkg_drv is able to identify some device types and bus  types
     while creating the driver description file, which is used to
     build boot subsystem device  database  entries  for  devices
     (see  devicedb(4)  and  driver.itu(4)).  pkg_drv  is able to
     identify devices that use the PCI and MCA buses, but the bus
     types  of  other  devices  are designated with bus_type=all,
     which should be sufficient. pkg_drv also attempts  to  iden-
     tify  msd  and  net device types, but all other device types
     are designated with dev_type=oth. If your device type or bus
     type  cannot  be  identified  precisely,  modify  the driver
     description file generated by  pkg_drv  to  contain  precise
     bus_type  and  dev_type  values. Use the -o output-directory
     option to create a modifiable version of the  driver.itu(4),
     and modify as needed.

EXAMPLES
     Example 1: Simple Device Driver Package and the DU Diskette

     The following example illustrates how to create  the  abcxyz
     driver  DU  diskette on /floppy/floppy0, with alias names of
     pci1234,1  and pci5678,5. A driver name should  be  no  more
     than  eight  characters in length and use alphabetic charac-
     ters. (The required naming convention is to  use  a  vendor-
     unique  string,  such as the company stock symbol (ABC), for
     the first three or four characters of the driver name and to
     specify  the  driver  (xyz) with the remaining  characters.)
     Any add_drv(1M) options specified  on  the  pkg_drv  command
     line  are  passed  to  add_drv, which  installs  the driver.
     pkg_drv assumes at least one of the driver files is present:

     abcxyz device driver (should be accompanied by the .conf file)

     abcxyz.conf device driver driver.conf file (must be accompanied
     by the device driver)

     abcxyz.bef realmode driver

     abcxyz.7d kernel module or device driver man page

     are in the current directory.

     # ls
     abcxyz abcxyz.bef abcxyz.conf
     # pkg_drv -m '* 0666 bin bin' -i '"pci1234,1" "pci4567,5"' -N ABCxyz abcxyz

     Example 2: Appending to a DU Diskette

     The following example illustrates  how  to  add  the  kernel
     module  abcmod  to the DU diskette created above, allowing a
     single diskette to hold multiple drivers  and  packages.  It
     also  substitutes  the  previously  created, compressed cpio
     archive of a  Solaris  package,  abcmod.cpio.Z,  instead  of
     automatically  generating  a  package  and  substitutes  the
     abcmod.itu  driver.itu(4)   file   for   the   automatically
     generated .itu file.

     # ls
     abcmod abcmod.7d
     # pkg_drv -A -P abcmod.cpio.Z -N ABCmod abcmod

     Example 3: Modifying the Generated Package and driver.itu(4) File

     The following example illustrates how to generate the  pack-
     age  and .itu file in an output directory, where they can be
     examined and used as a basis for more  complex  packages  or
     .itu files.

     # ls
     abcmod abcmod.7d
     # pkg_drv -o /tmp/output -N ABCmod abcmod

     Example 4: Advanced Options

     # ls abcdisk abcdisk.conf abcdisk.man # pkg_drv -t  eisa  -i
     'ABC4000' -c scsi -c dada -N ABCdisk abcdisk

ENVIRONMENT VARIABLES
     See environ(5) for descriptions of the following environment
     variables  that  affect the execution of pkg_drv : LC_CTYPE,
     LC_MESSAGES, and NLSPATH.

EXIT STATUS
     0         Successful completion.

     >0        An error occurred.

FILES
     /boot/solaris/devicedb/master
               Solaris (Intel Platform  Edition)  boot  subsystem
               devicedb/master file

     /boot/solaris/drivers
               Solaris (Intel Platform  Edition)  boot  subsystem
               realmode boot device drivers

     /kernel/drv
               boot device drivers

     /etc/driver_aliases
               driver aliases file

ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:
     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWpkgd                    |
    |_____________________________|_____________________________|
    | CSI                         | Enabled                     |
    |_____________________________|_____________________________|
    | Interface Stability         | Evolving                    |
    |_____________________________|_____________________________|

SEE ALSO
     add_drv(1M),  boot(1M),  compress(1),  cpio(1),  pkgadd(1M),
     driver.conf(4), driver.itu(4), devicedb(4), attributes(5).

     Writing Device Drivers

SunOS 5.7           Last change: 24 May 1999                    


| Contents |

[Return to Driver Tools]