This release note and the software it accompanies it are copyright (c) 2004, Intel Corporation, and may only be installed and used in accordance with the license that accompanies the software.

Driver Version
--------------
iir.ko  : Version 1.04 (for FreeBSD 4.x.)

Please note that FreeBSD releases 4.6 and above have the latest "iir" driver embedded.
Therefore this driver is not distributed with this package.
For FreeBSD release 5.1 please do also use the provided inbox driver.


Main Directories
----------------

fbsd4         Directory containing driver and utilities for FreeBSD 4.x
fbsd5         Directory containing utilities for FreeBSD 5.x


Main Files
----------
iir.ko              iir driver module for FreeBSD 4.x releases
iir-x.y.tgz         driver package (x.y = driver version) for FreeBSD 4.x rel.
                    copies iir.c, iir.h, iir_ctrl.c, iir_pci.c to 
                      /usr/src/sys/dev/iir
                    copies iir.ko to /
                    modifies /boot/loader.rc (adds iir.ko; 
                                              only if FreeBSD release <= 4.5)
                    modifies /usr/src/sys/conf/files (adds source files)
                    creates /dev/iir (special device file for tools, 
                            e.g.: icpcon)
                    creates /usr/src/sys/i386/conf/IIR_KERNEL from 
                            GENERIC (with iir entry)
readme.txt          this file
icpcon-x.y.z.tgz    icpcon utility package. Install with pkg_add.
srcd-x.y.z.tgz      srcd remote configuration daemon. Install with pkg_add.


Installation Instructions
-------------------------
Instructions are given below for the following situations:
A. Installing FreeBSD onto a RAID Controller Host Drive
B. Installing "iir-x.y.tgz" iir driver and utilities package on a 
   FreeBSD system
C. Compiling and statically linking iir drivers for the FreeBSD kernel
D. Troubleshooting.


A.Installing FreeBSD onto a RAID Controller Host Drive
------------------------------------------------------

FreeBSD releases 4.6 and above have the "iir" driver embedded.
Therefore the driver disk on this media is not required for installation.
If the drivers on this media are newer than the ones on the system you may
want to update the drivers. Please refer to step B and C for further 
instructions.

Note: The following steps are just an example to illustrate a custom install
of FreeBSD on the RAID controllers. For detailed information on installation,
please refer to the FreeBSD installation manual.

1. Configure Host Drive
   - Driver currently supports Host Drives 0 to 99
   - Host Drives are managed through a separate virtual IO channel
     (besides the physical IO channels of the RAID controller)

2. Boot from the Installation CD
   Up to FreeBSD 4.5:
   - Enable CD-ROM boot within icpcon (if the CDROM drive is connected
     to the RAID controller)
   - We have tested: FreeBSD 4.4-RELEASE. 
   - When the following message appears:
     "Hit [Enter] to boot immediately, or any other key for command prompt.
      Booting [kernel] in x seconds..."
     press any key, and the "ok" prompt is displayed
   - Type in "load kernel" to load the kernel
   - Type in "load disk1:iir" for 4.x to load the driver from floppy disk 
     (disk0 is the CD (Floppy Emulation), disk1 the first Floppy (DOS Format))
   - Type "boot" to boot the kernel

3. Kernel Configuration Menu
   - Press ENTER for further boot (if any other driver causes problems during
     boot deactivate it in "Start kernel configuration in full-screen visual 
     mode")
   - Kernel boots and the iir driver recognizes the RAID controller
     and Host Drives

4. /stand/sysinstall Main Menu
   - Choose installation method (e.g. Standard Installation)
   - FDISK partition menu: e.g.:
      A = Use Entire Disk
      Q = Finish
   - FreeBSD disklabel editor: e.g.:
      C = Create
       Setup a swap partition (this is necessary!, size depends on 
       memory size, 100-200MB are normally OK)
      C = Create
       Setup filesystem(s) (minimum 1 fs required, mount point "/")
      Q = Finish
   - Select Installation Contents
   - Select Installation Medium (CD-ROM)
   - Start Installation

5. System Console Settings -> enter Yes
   - Select Keymap
   - Select Timezone

6. Reboot 
   - Remove the CD and Floppy from the drives

   Note: Though the OS install is complete; the installer program did not 
     install the IIR drivers that we manually loaded in the beginning. 
     This means that the bootloader/kernel will be unable to detect Host 
     Drives and mount the root filesystem on a reboot. Thus rendering the 
     system useless. We have two choices:
      a) Use the floppy to manually load iir drivers at every boot.
      b) or permanently install the iir driver on the system and make the 
         bootloader aware of it. To follow this approach, do the steps 
         detailed below.
   
7. Boot from the Host Drive
   - Interrupt the boot process and load the driver (see step 2 above).
     Since there is no CD in the drive, the floppy drive is detected as
     "disk 0". Therefore the command to load the iir driver becomes:
     "load disk0:iir"
   - Kernel boots, iir driver detects Host Drives

8. Install the iir driver package (ONLY FreeBSD 4.x !)
   - Copy file iir-x.y.tgz from the floppy, (x.y = version number)
     e.g.: For a DOS-formatted floppy,
      # mount -t msdos /dev/fd0 /mnt
      # cp /mnt/iir-1.4.tgz /tmp/iir-1.4.tgz
      # umount /mnt
   - Install the package with the command
      # pkg_add iir-1.4.tgz
     This command will install the iir driver, iir driver source code and 
     modify system config files appropriately. 
     For more information on these utilities refer to their man pages.
   - The installed package contains the iir driver for FreeBSD 4.x.
	  
     The iir driver can also be linked statically (see below).

9. Install icpcon and srcd packages
   - FreeBSD 4.x: Use the files icpcon-x.y.z.tgz and srcd-x.y.z.tgz
                  from the "fbsd4/utils" subdirectory.
   - FreeBSD 5.x: Use the files icpcon-x.y.z.tgz and srcd-x.y.z.tgz
                  from the "fbsd5/utils" subdirectory.
   - Copy the files onto your FreeBSD system (e.g. see steps 8. for using 
     floppy disks).
   - Install the packages with the commands
     # pkg_add icpcon-x.y.z.tgz
     # pkg_add srcd-x.y.z.tgz
      
10. Reboot
   - From now on the driver is loaded automatically as a module at boot time.
   - icpcon is installed and can be used to manage the iir RAID subsystem by
     invoking the following command:
	# /usr/sbin/icpcon
   - Configure srcd, by invoking the following command:
	# sh /usr/sbin/srcdconf.sh
     or by editing /etc/srcd.conf

    
B. Installing iir Driver and Utilities Package on a FreeBSD System
------------------------------------------------------------------------------
Procedure identical as described above in steps 8. and 9.


C. Link iir Driver statically
-----------------------------
Use the following steps to compile the iir drivers from the installed sources.
This procedure can be used for any FreeBSD version.

1. The kernel sources have to be installed
   - This already happened if for e.g. the directory /usr/src/sys/conf exists.
   - If not yet installed:
      Uninstall the iir Package. For e.g.:
       # pkg_delete iir-1.4
      Load Sysinstall:
       /stand/sysinstall
      Choose menu options "Configure" and "Distributions",
      select checkboxes "iir" and "sys",
      confirm with OK, select installation source (CD-ROM), install
      Leave Sysinstall, install driver package. For e.g.:
       # pkg_add iir-1.4.tgz

2. Modify the Configuration File
   - Package has created the config.-file /usr/src/sys/i386/conf/IIR_KERNEL,
     Driver is already entered there
     Kernel can be configured here (remove driver etc.)
   - Create System Configuration Files with
      # cd /usr/src/sys/i386/conf
      # config IIR_KERNEL
      (even if IIR_KERNEL is unchanged, always carry out this step)

3. Create Kernel
   - Based on point 2. with
      # cd ../../compile/IIR_KERNEL
      # make depend
      # make
      # make install

4. Reboot
   - The newly compiled iir driver is now part of the kernel


D. Troubleshooting
------------------

1. How to configure more than 16 SCSI disks on a system.

The iir Host Drives are detected as SCSI direct access disk (disk 
device code: da) by FreeBSD. iir supports a maximum of 100 SCSI 
direct access disks. You can use the "dmesg" command to check the 
number of "da" devices detected by the system.
If there are more than 16 "da" devices (corresponding to the device 
files /dev/da0 to /dev/da15) then you will need to create additional 
device files in the /dev directory to be able to access those disks.
After the system boots up, perform the following steps:
  a) "dmesg | more "
     Figure out the disk devices which were detected. The
     devices detected should be of the form "da##" where
     ## stands for the nth SCSI direct access disk detected.
  b) "cd /dev/ ; sh MAKEDEV da##" (where ## > 15) 	
     The MAKEDEV script will create the device file with
     the appropriate MAJOR device number.
  c) Once you have created the required device nodes, you can 
     access those disk drives. Bring up the /stand/sysinstall
     application and go to "configure->fdisk". The screen will
     correctly display all the disks in the system.

*Other names and brands may be claimed as the property of others.
