Saturday April 19, 2008 | Saurabh Mishra's Weblog |
|
|
|
All
|
Biking
|
General
|
Photographs
|
Solaris Operating System
|
Stock Market
|
Trekking & Mountaineering
Install-Time-Update (ITU) and Driver Binding in Solaris If you ever wonder how to create install time driver updates for Solaris 10 and Nevada, then you may want to read this blog entry as it involves few tricks here and there.
There are two ways to make your device work with Solaris. The install-time-update (aka ITU DU or ITU diskette) is only required for the case where the disk drive will become the Solaris
boot drive. For all other case, you should be able to generate a package and run pkgadd(1m) command to install the driver package on running Solaris.
ITU MethodIn order to install Solaris onto a bootable drive supported by your driver, you can use an Install Time Update (ITU).
The ITU must have your driver (both 32-bit and 64-bit binaries) and PCI-IDs of the device your driver supports.How to construct an ITU
For Solaris 10
# mkdir -p /var/tmp/your_driver.5.10 Copy your driver and your_driver.conf file in the current directory.
# mkdir -p kernel/drv/amd64 VVVV = Vendor-id
The output of the pkg_drv(1m) will resemble the output below :-
input file: drv=your_driver
## Building pkgmap from package prototype file.
Copy the following files from '/tmp/12546' as follows :-
# cd /var/tmp/your_driver.5.10 You can run 'pkgproto' command or make a prototype file manually :
bash-3.2# cat > prototype Make sure you include both the 32-bit and 64-bit binaries of your driver. Once this is completed, we will construct the package again to include 64-bit binary of the driver.
# cd /var/tmp/your_driver.5.10
This will create '/tmp/PKG' directory under /tmp and that's where
the package is. For example :-
bash-3.2# pkgmk -r . -d /tmp
Do following things to repack package in DU (Diskette) :- # cd /tmp For Solaris Neavda
Repeat the same steps as we did for Solaris 10 except for following
things :-
Once you have created ITU for Solaris 10 and Nevada, we will bundle
them in one DVD/CD (or ISO file). In the directories
'/var/tmp/your_driver.5.11' and '/var/tmp/your_driver.5.10', you will find
a directory called 'PKG'. You must copy the files under 'PKG' to
one directory in order to bundle them together.
# mkdir -p /var/tmp/YOUR_DRIVER-DU
# mkisofs -o your_driver.iso -r /var/tmp/YOUR_DRIVER-DU
This will create an ISO file 'your_driver.iso' and a DVD/CD can be
burned by running the following command line at the prompt :-
# cdrw -i /var/tmp/YOUR_DRIVER-DU/your_driver.iso
In order to install Solaris on boot drives, you use Solaris
Installer DVD and choose option '5' (Apply Driver Updates)'. Kindly
follow the instructions when prompted. The other way is to bundle the device driver in Solaris bootable media itself or for network installation. Kindly follow the instructions described at this link.At the above link, it describes how to pack/unpack Solaris miniroot in order to make changes to Solaris bootable media. Driver Binding in SolarisDriver binding in Solaris is not so easy to understand. The way Solaris binds a driver is based on the precedence. This precedence list is maintained in the 'compatible' property of the device driver. The two functions which are responsible for creating 'compatible' property and finding the correct binding for the driver are - add_compatible() and ddi_compatible_driver_major() respectively. * pciVVVV,DDDD.SSSS.ssss.RR (0) * pciexVVVV,DDDD.SSSS.ssss.RR (0) RR = Revision number You can get the 'compatible' property by running 'prtconf -vp' command. If the Solaris fails to find a binding using 'compatible' property, then it tries by 'nodename' and the 'nodename' is constructed from Subsystem-vendor-id (SSSS) and Subsystem-device-id (ssss) of the device. The PCI-ID which we have been seeing here is embedded in the PCI Config space of the device. Device Drivers and device firmware must make sure that the proper PCI-IDs are chosen to avoid conflict with existing PCI-IDs. If your device is PCI-Express based card, then you must add 'pciexVVVV,DDDD.SSSS' like PCI-IDs in /etc/driver_aliases or via add_drv(1m) or pkg_drv(1m) command. |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||