DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Configuring SCO OpenServer 5 MDI drivers

lkcfg shell library functions

`llipathmap`/lib/libcfg.sh contains useful library functions and shell variables. This file should be sourced into lkcfg scripts that need to use these functions.

The functions are:


hex_add hex_num1 hex_num2
Add two decimal numbers.

Return value:
Addition result

Example:
   eio=`hex_add 300 f`
   echo $eio

set_system_info sysfile num config hwdep irqtype irq bio eio bram eram
Set fields in sdevice(F) files as specified; IPL is always set to 5.

Return value:
None

Example:
   SYSFILE=/etc/conf/sdevice.d/wdn
   bd=0
   BASE_IO=240
   EIO=`hex_add $BASE_IO 1f`

set_header_info driver boardnumber variable value
Set fields in space.h file

Return value:
None

Notes
Use this function to pass DMA channels to network drivers. It can also be used to pass the PCI_BUS, PCI_DEV, and PCI_FUNC values. The macros being changed must already be in the space.h file. The macros are set to Driver_boardnumber_value; ``Driver'' must be capitalized.

Example
   drv=foo
   minor=0
   set_header_file $drv $minor DMA 3
   cat /etc/conf/pack.d/foo/space.h


parse_region driver boardnumber variable value
Parses AOF regions into constituent parts.

Return value:
Set shell variables base_region, end_region, and size. base_region and end_region are in hexadecimal; size is in decimal (kilobytes).

Example
   parse_region d4000(16)
   echo $base_region $end_region $size


set_master_info masterfile driver dma_channel
Set fields in master file; see mdevice(F) for more information.

Return value:
None

Notes
Use this function in an MDI driver that supports only one adapter and uses DMA. If the MDI driver supports more than one adapter, DMA channels should be passed to the driver in a space.h file using the set_header_info( ) function. When the lkcfg utility is called by the netconfig reconfigure operation, the DMA channel can be changed with this function.

Example
   MFILE=/etc/conf/cf.d/mdevice
   drv=wdn
   set_master_info $MFILE $drv -1

© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005