Home
EFCAPI Installation Guide for Linux
Contents
1. 2007 Great River Technology Inc to load the Pci9656 0 file or Pci9656 ko file for kernel This script will first look for Pci9054 ko and then Pci9054 o so make sure you have installed the Pci9054 ko file if you are on Linux kernel 2 6 Linux 2 4 only uses the o file Note that if you get the error message insmod error inserting usr lib efc Pci9054 ko 1 No such device this means that the hardware is not installed or you are attempting to load the driver for the wrong card type 32 bit vs 64 bit Should you need to unload the driver module not normally necessary the commands are as follows To unload the 32bit driver module type Jefcunload To unload the 64 bit Gravity card driver module type Jefcunload2 Once the loadable kernel module is loaded you can write code using calls to the libefc so library functions and run your applications All projects that use this API must link to this API library during compilation The Makefile found in the sample directory demonstrates how this is done EXAMPLE of a successful module load for the Pci9656 ko file using efcload2 CKCkCk kCkck k ck ck k ck ck k ck ck k ck ck k ck ck k ck ck k ck ck k ck ck k ck k k ck ck k ck kk ck k kk k NOTE You must be superuser logged in as root or have sufficient rights to install i modules or this script will not work CKCkCk kCkck k ck ck k ck ck kCck ck k ck ck k ck ck k ck ck k ck ck k ck k k ck ck k ck k
2. be modified and the driver re built The KERNEL VER variable can be set with the declare command This command may be executed from the command line or placed in the shell initialization script e g bashrc so that it is automatically set when a new terminal session is started Set the environment variable KERNEL VER to the desired kernel version 2 2 2 4 or 2 6 This can be set from the command line or set in the shell initialization script e g bashrc so that it is automatically set when a new terminal session is started An example of the command to set this variable for Linux kernel 2 6 is declare x KERNEL VER 2 6 This command may be placed in the shell initialization script e g bashrc Some example entries for the bashrc file follow For kernel v2 2 use declare x KERNEL 2 2 For kernel v2 4 use declare x KERNEL 2 4 For kernel v2 6 use declare x KERNEL VER 2 6 4 Setup path for Linux source files If you are on Fedora Core 5 skip this step and proceed to step 5 If you are on Fedora Core 3 and kernel 2 6 create a symbolic link to the kernel source directory with the following command In s usr src redhat BUILD kernel 2 6 X linux 2 6 X usr src linux 2 6 Where X is the third number in your kernel version For example for kernel 2 6 9 1 667 the command would be In s usr src redhat BUILD kernel 2 6 9 linux 2 6 9 usr src linux 2 6 If you are on kernel 2 4 rename t
3. in usr src redhat SOURCES and there will be a spec file in usr src redhat SPECS Do not proceed to the next step unless you get a clean ROM install with no errors Build the kernel source package Change to the usr src redhat SPECS directory and execute the following command rpmbuild bp target lt arch gt kernel 2 6 spec Where arch is the architecture such as 1686 Note that rpmbuild can be used to build both binary and source software packages In this case we are using the bp option that executes the stage from the spec file This unpacks the sources and applies any patches Do not proceed to the next step unless you get a clean build with no errors EFC API Linux Install Guide 14 of 16 Rev C 01 02 2007 Great River Technology Inc 5 Copy the kernel configuration file Change to the usr src redhat BUILD directory then change to the directory for your kernel version i e kernel 2 6 9 linux 2 6 9 In the configs directory locate the config file for your configuration This will be something like configs kernel 2 6 9 i686 smp config Copy this file to J config The command for this is cp config file gt config Where config file is your config file In this example the file is Jconfigs kernel 2 6 9 1686 smp config So the command is cp configs kernel 2 6 9 i686 smp config config If asked if you want to overwrite the file answer yes 6 Check the kernel configuration file Perform
4. initialization script e g bashrc Here is an example entry for the bashrc file PLX SDK environmental variables echo SETTING PLX PATH declare x SDK DIR usr src PlxLinux declare x KERNEL VER 2 6 PLX SDK command paths export PATH SPATH usr src PIxLinux linux driver export PATH PATH usr src PlxLinux bin One these changes are made to the bashrc file you must exit your terminal and restart another one or reboot to incorporate the changes You may wait to reboot after modifying the bashrc file for the KERNEL VER variable described below KERNEL VER The Linux device driver code has been tested with Linux kernels 2 2 2 4 and 2 6 By using special coding techniques drivers may be built for each of these kernels while still retaining a common code base The build scripts will attempt to automatically select the correct kernel version based on the existence of certain files in the system The desired kernel version can be overridden however by setting the KERNEL VER environment variable If the KERNEL VER variable is not set in the environment it will be set in the builddriver script file EFC API Linux Install Guide 8 of 16 Rev 01 02 2007 Great River Technology Inc The value of KERNEL VER determines the kernel version to build the driver for Note that once KERNEL VER is set all subsequent driver builds will be for the newly selected kernel To build for the alternate kernel the variable must
5. k ck k k ck k k k k Module file usr lib efc Pci9656 ko found Installing module Pci9656 Getting Module major number Ok MajorID 253 Creating device node path Ok Path dev plx Creating device nodes Ok Module load complete EFC API Linux Install Guide 11 of 16 Rev C 01 02 2007 Great River Technology Inc Installed Files Upon installation the following files will be installed on the system Header files usr include efclib h Library header file Library files usr lib libefc a Static library file usr lib libefc so x y z Shared library file usr lib libefc so x Shared library link usr lib libefc so Shared library link Driver module load unload scripts usr sbin efcload Loads the driver for 32 bit Gravity cards usr sbin efcunload Unloads the driver for 32 bit Gravity cards usr sbin efcload2 Loads the driver for Gravity 64 bit cards usr sbin efcunload2 Unloads the driver for Gravity 64 bit cards Sample project files grtefc efcdata c Sample code for Gravity HL2D Data cards grtefc Makefile_Data Makefile for efcdata grtefc efcdata_bytewide c Sample code for Gravity HL2D Data cards grtefc Makefile_DataByteWide Makefile for efcdata_bytewide grtefc efchl2v c Sample code for Gravity HL2V Hotlink Video grtefc Makefile_HL2V Makefile for efchl2v grtefc efcfcav c Sample code for Gravity FCAV Fiber Channel Audio Video grtefc Makefile_fcav
6. the Library directory The API library files are in the tar file EFCAPI X Y Z tar Where X Y Z is the API library version number Installation The installation package consists of a tar zip compressed archive EFCAPI X Y Z tar where X zversion Y revision Z release which must be UN zipped as user This operation will install all system files required of the package and produce grtefc directory tree and a product information file Readme txt in that directory Installation is accomplished as follows Login as superuser and go to the top level directory Copy the archive to the top level directory with the cp command cp cdpath Library EFCAPI X Y Z tar where lt cdpath gt is the full path to your CDROM drive for example mnt cdrom Untar the archive as follows tar xvpPf EFCAPI X Y Z tar Create the shared library links and cache for run time linking of the newly installed libraries by typing Idconfig The sample program source and makefiles and read me will now be available in a new directory called root grtefc This directory can be relocated if desired Refer to the read me for package update information and general library usage instructions EFC API Linux Install Guide 5 of 16 Rev C 01 02 2007 Great River Technology Inc Install the Device Driver Depending on your Linux vendor and kernel version you may be able to use one of the pre built device driver modules on the Linux API setu
7. updated header file libefc a libefc so libefc so libefc so efclib h 1 2 o gt e Static library file x xx 0 Shared library file X Shared library link Shared library link Library header file Log in as superuser root user First the old libraries and links must be removed Got to the usr lib directory and delete libefc so x xx 0 first Then remove libefc a libefc so and libefc so x In usr include remove the file efclib h Untar the file by placing it in the top level directory Go to the top level directory Copy the tar file from the CD to the top level directory UN tar the archive as follows tar xvpPf EFCAPI X Y Z LIBS tar Create the shared library links and cache for run time linking of the newly installed libraries by typing Idconfig Rebuild all applications that use the EFCAPI library EFC API Linux Install Guide 13 of 16 Rev C 01 02 2007 Great River Technology Inc Installing Fedora Core 3 Kernel Source Files These instructions are for installing the kernel source files for Fedora 3 kernel 2 6 X and should only be performed by personnel with experience in Linux system administration and configuration The kernel source files must be installed before building the GRT drivers 1 n d gt Determine your kernel version Perform the following command to determine your current kernel uname r This will produce output something like this 2 6 9 1 667smp Th
8. use the API for custom programming EFC API Linux Install Guide 3 of 16 Rev C 01 02 2007 Great River Technology Inc Files on the Supplied Setup CD The following files are on the setup CD Directory Filename Description Library EFCAPI X Y Z tar API Library tar file where X Y Zis the library version number Driver Source PlxLinuxGRT Device driver source code tar file including GRT specific code for device driver build files Driver c DriverDefs h and ModuleVersion c Driver Modules Pci9054 VVV X Y Z ko Pre built device driver modules for some Pci9656 X Y Z ko Linux kernels where VVV is the vendor ID Pci9054 VVV X Y Z o and X Y Z is the Linux kernel version For Pci9656 X Y Z o vendor ID Fedora Core 1 FC2 Fedora Core 2 FC3 Fedora Core 3 5 Fedora Core 5 S80 SuSE 8 0 S81 SuSE 8 1 Docs EFCAPI InstallGuide Linux pdf This document Docs SDK HL2DAPI UserMan pdf Hotlink II Data functions API Users guide Docs SDK_HL2VAPI_UserMan pdf Hotlink II Video functions API Users guide Docs SDK_FCAVAPI_UserMan pdf FCAV functions API Users guide EFC API Linux Install Guide 4 of 16 Rev C 01 02 2007 Great River Technology Inc Installation Steps The steps to install are Install your hardware Install the API library Install the device driver Load the device driver Powe Install the API Library The API library is on the setup CD in
9. Great River Technology Inc Great River Technology 4910 Alameda Blvd NE Albuquerque NM 87113 EFCAPI Installation Guide for Linux Software Drivers Documentation and API Application Programming Interface for EFC GRAVITY and GRAVITY II Cards Rev C January 2 2007 Conta rmatio 1 866 478 4491 NS Ta ca E Great River Technology Inc Table of contents TABLE OF AR 2 OVERVIEW tace 3 FILES ON THE SUPPLIED SETUP CD 4 eeeeeeeee eese teen seen teneant thats sone tn sens enses enano 4 INSTALLATION Ses 5 INSTALE THE API LIBRARY mte e i rar rrr pies INSTALL THE DEVICE DRIVER irit eee HERR Hor ete P TE REENE EEE ETE eere Pe PERENNE Eee eb eov rs A Using a pre built device driver module esee eene eene Lh Determine your kernel versi n ect er eb YO Et e eere eee toni 2 Check for pre built kernel module on the setup CD see 3 pre built driver module to library directory eeseeeeeeeneeneeen eene B Building the device driver to your kernel esee eene Copy device driver tar Ho e eee erp eR ER RHET Ree e eate ex Extract source files from the tar file Set environmental variables S
10. Makefile for efcfcav grtefc efctest c Sample code for FCAV grtefc Makefile_EFCTest Makefile for efctest grtefc HL2Vrate1 c Sample code for Gravity HL2V Hotlink Video grtefc Makefile HL2Vratel Makefile for HLK2Vrate1 note is the root user s home directory Documentation devel grtefc EFCAPI_LinuxInstall pdf This file devel grtefC GRAVITY FCAV UserMan pdf User manual for the FCAV card devel grtefC GRAVITY HL2D UserMan pdf User manual for the HL2D card devel grtefC GRAVITY HL2V UserMan pdf User manual for the HL2V card devel grtefc SDK_FCAVAPI_UserMan pdf User manual for the FCAV API devel grtefc SDK_HL2DAPI_UserMan pdf User manual for the HL2D API devel grtefc SDK_HL2VAPI_UserMan pdf User manual for the HL2V API Links Fedora Core 3 kernel 2 6 only usr src linux 2 6 gt usr src redhat BUILD kernel 2 6 X linux 2 6 X EFC API Linux Install Guide 12 of 16 Rev C 01 02 2007 Great River Technology Inc Upgrading to a New Library Only Note that these steps are for upgrading the library files only so and a and do not cover upgrading of the kernel module s The include file used to build applications is also upgraded Any applications built using the EFCAPI library will need to be rebuilt following this upgrade procedure The library upgrade is supplied as a compressed TAR file in the format EFCAPI X Y Z LIBS tar where X Y Z is the version number This TAR file contains new library files and an
11. Pci9656 FC5 2 6 15 ko 64 bit card Note that all pre built kernel modules are for SMP If you do not find a pre built device driver module for your kernel version proceed to the section below titled Building the device driver to your kernel Do not attempt to use a pre built device driver module that does match your kernel version EFC API Linux Install Guide 6 of 16 Rev C 01 02 2007 Great River Technology Inc 3 Copy pre built driver module to library directory Do not attempt to use a pre built device driver module that does not match your kernel version If the directory usr lib efc does not exist create it If you found a pre built module for your kernel on the CD copy this file to usr lib efc Pci9054 for 32 bit cards or usr lib efc Pci9656 for 64 bit cards where the is ko for kernel 2 6 X and for kernels previous to 2 6 X If you were able to use a pre built device driver module and have completed this step you do not need to build the device driver to your kernel so skip the section titled Building the device driver to your kernel below and proceed to the section titled Load the Device Driver Module B Building the device driver to your kernel If you were able to use a pre built device driver module you do not need to build the device driver to your kernel so skip this section and proceed to the section titled Load the Device Driver Module The kernel sources package m
12. current running kernel 2 6 15 1 2054 FC5smp in this example Note that in this example the smp at the end of the kernel version indicates that this is the SMP version of the kernel Do not continue with this procedure until you determine your kernel version and you have determined that you are running Fedora Core 5 If you have Fedora Core 1 or 2 or kernel 2 4 X or lower you should have the kernel source package in your Linux distribution In this case do not continue with the instructions in this section but follow the instructions included in your Linux distribution for installing the package Download the hardlink RPM file You can download the hardlink RPM file from one of the common RPM repositories or the following location http download fedora redhat com pub fedora linux core 5 1386 os repodata repoview Install the hardlink package Install the hardlink package using the following command rpm ivh filename where filename is the name of the hardlink RPM file for example hardlink 1 0 1 21 2 1386 rpm Do not proceed to the next step unless you get a clean RPM install with no errors Download the kernel source RPM file Download the kernel source RPM file for your kernel version You can get this from one of the common RPM repositories or the following locations http download fedora redhat com pub fedora linux core 5 1386 os repodata repoview http rpmfind net linux rpm2html search for kernel smp devel In the
13. et up path for Linux source files Build device driver module 6 driver module to library directory eese nente ennt ener LOAD THE DEVICE DRIVER eren rere Er TERN RETE eave ERE vires INSTALLED FILES c 12 dio UPGRADING A NEW LIBRARY ONLY eeeeeeeee eese enean thats enses tone to sensn sesenta sensn 13 INSTALLING FEDORA CORE 3 KERNEL SOURCE FILES e eeeeeeee esee ee een teet en enne tn sn ntn 14 INSTALLING FEDORA CORE 5 KERNEL SOURCE FILES eere eee ee eese 16 EFC API Linux Install Guide 2 of 16 Rev C 01 02 2007 Great River Technology Inc Overview This document outlines the steps necessary to install the Great River Technology EFCAPI software for Linux operating systems The EFCAPI software is for use on Linux kernel versions 2 2 X 2 4 X and 2 6 X Due to the numerous flavors of Linux and hardware variations GRT cannot test and support on all Linux distributions and hardware However most Linux configurations should work with minimal porting effort Hardware supported is GRT EFCPCI 001 Fibre Channel card the GRT FCAV PMC card or any GRAVITY or GRAVITY II 64 bit series data and video cards This document describes the software installation only Refer to the API Users Manual for detailed information on how to
14. example above the kernel source file is kernel smp devel 2 6 15 1 2054 FC5 1686 rpm Download the kernel source file to any available location such as tmp Make sure you get the correct kernel source for your kernel and make sure you get the kernel smp devel RPM Install the kernel source files Install the kernel source files using the following command rpm ivh filename where filename is the name of the kernel source RPM file for example kernel smp devel 2 6 15 1 2054 FC5 1686 rpm Do not proceed to the next step unless you get a clean install with no errors END OF DOCUMENT EFC API Linux Install Guide 16 of 16 Rev C 01 02 2007
15. ge the current directory to usr src then type the following command EFC API Linux Install Guide 7 of 16 Rev C 01 02 2007 Great River Technology Inc tar xvf PlxLinuxGRT tar to extract the files This will create a folder called PlxLinux with all PLX and GRT supplied device driver source files and folders as follows lt PlxLinux linux include gt PLX SDK include files lt PlxLinux linux api gt PLX Host API Library source files lt PlxLinux linux driver gt PLX GRT device driver Linux installable module files lt PlxLinux linux makefiles gt PLX shared makefile components used to build PLX applications libraries and drivers lt PlxLinux bin gt PLX Scripts to load unload and assist in debug of the driver module 3 Set environmental variables In order to build the device driver the shell environment variables PLX_SDK_DIR and KERNEL_VER must be set These may be set from the command line or commands added to the shell initialization script PLX_SDK_DIR The shell environment variable PLX_SDK_DIR must be set This must be set to the root location of where the PlxLinux folder is created This can be set with the declare command This command may be executed from the command line or placed in the shell initialization script e g bashrc so that it is automatically set when a new terminal session is started The command to set this is declare x PLX SDK DIR usr src PlxLinux This command may be placed in the shell
16. he kernel source directory named usr src linux 2 4 xx xxxxx to usr src linux 2 4 using a command like mv usr src linux 2 4 xx xxxxx usr src linux 2 4 Where xx xxxxx is correct for the directory name found on your system 5 Build device driver module Go to the directory usr src PLXLinux linux driver and type Jbuildalldrivers cleanall This removes all the o and ko files so that a new full build will occur To build the driver files for Gravity 32 bit cards go to directory usr src PLXLinux linux driver and type Jbuilddriver 9054 EFC API Linux Install Guide 9 of 16 Rev C 01 02 2007 Great River Technology Inc This builds the Pci9054 0 or Pci9054 ko driver used for Gravity 32 bit cards To build the driver files for Gravity 32 bit cards go to directory usr src PLXLinux linux driver and type builddriver 9656 This builds the Pci9656 0 or Pci9656 ko driver used with 64 bit GravityII cards 6 Copy driver module to library directory If the directory usr lib efc does not exist create it now For Gravity 32 bit cards If the Pci9054 o file or Pc9054 ko for kernel 2 6 is built ok then copy this file from usr src PLXLinux linux driver Pci9054 Driver to usr lib efc For the 32 bit GravityII cards this is the loadable module that is custom built to your kernel For Gravity 64 bit cards If the Pci9656 0 file is built ok then copy this file from usr src PLXLinux linux driver Pci9656 Driver to u
17. is output shows the current running kernel 2 6 9 1 667smp in this example Note that in this example the smp at the end of the kernel version indicates that this is the SMP version of the kernel Do not continue with this procedure until you determine your kernel version and you have determined that you are running Fedora Core 3 and your kernel is 2 6 or greater If you have Fedora Core 1 or 2 or kernel 2 4 X or lower you should have the kernel source package in your Linux distribution In this case follow the instructions included in your Linux distribution for installing the package Download the kernel source RPM file Download the kernel source RPM file for your kernel version You can get this from one of the common RPM repositories or the following locations http download fedora redhat com pub fedora linux core 3 SRPMS http prdownloads sourceforge net linux ntf In the example above the kernel source file is kernel 2 6 9 1 667 src rpm Note that in this example the smp specifier is not in the file name Download the kernel source file to any available location such as tmp Make sure you get the correct kernel source for your kernel Install the source RPM Install the source RPM using the following command rpm ivh kernel file name where kernel file name is the name of the kernel source file in this case the file name is kernel 2 6 9 1 667 src rpm After performing this step the RPM source files many will be
18. p CD GRT supplies some pre built device driver files for specific kernels If you are running one of these kernel versions you may use the supplied pre built device driver module saving you a considerable amount of work Of course you may choose to build the device driver module even if the pre built device driver file is supplied Do not attempt to use a pre built device driver module that does match your kernel version Use one of the following options or B to install the device driver for your card s A Using a pre built device driver module 1 Determine your kernel version Use the following command uname r to get your kernel version Check for pre built kernel module on the setup CD Pre built device driver modules are in Driver Modules These pre built device driver files are named as follows Pci9054 VVV X Y Z ko Pci9656 VVV X Y Z ko Pci9054 VVV X Y Zo Pci9656 VVV X Y Zo Where the Pci9054 files are for the 32 bit cards and the Pci9656 files are for the 64 bit cards In these file names is the vendor ID and X Y Z is the Linux kernel version The ko files are for kernel 2 6 X later and the o files are for kernels prior to 2 6 X The following vendor IDs are used 1 Fedora Core 1 FC2 Fedora Core 2 FC3 Fedora Core 3 5 Fedora Core 5 S80 SuSE 8 0 S81 SuSE 8 1 For example the kernel modules for Fedora Core 5 kernel 2 6 15 are 19054 FC5 2 6 15 ko 32 bit card and
19. sr lib efc For the 64 bit GravityII cards this is the loadable module that is custom built to your kernel Load the Device Driver Now you have either copied in the pre built device driver file or built it so you can load the module and see if it connects to our board Loading and unloading of the driver is accomplished by running the appropriate script as superuser root user The script usr sbin efcload or usr sbin efcload2 will create the required device special files and load the driver into the kernel and usr sbin efcunload or usr sbin efcunload2 does the reverse Calls to these scripts can also be made at startup or login time in the runtime command rc section of the etc tree or user startup files respectively To gain a better understanding of what the scripts do it is suggested that the user view them To load the 32 bit Gravity card driver type Jefcload to load the Pci9054 o file or Pci9054 ko file for kernel 2 6 This script will first look for Pci9054 ko and then Pci9054 0 so make sure you have installed the Pci9054 ko file if you are on Linux kernel 2 6 Note that if you get the error message insmod error inserting usr lib efc Pci9054 ko 1 No such device this means that the hardware is not installed or you are attempting to load the driver for the wrong card type 32 bit vs 64 bit To load the 64 bit GravityII card driver module type Jefcload2 EFC API Linux Install Guide 10 of 16 Rev C 01 02
20. the command make oldconfig This command reads in your existing configuration information and then prompts you for a value for any kernel configuration variables that were not provided in the existing kernel configuration file You may be asked questions about new kernel options Since our intention here is to install the source for the current kernel and NOT modify the kernel answer no to all the questions and make notes of the new options The make oldconfig command is essentially checking for consistency between your current kernel and the source you just installed If this command reports no changes you are ready to continue on to installing GRT API for Linux If there are any significant new changes you may not have gotten the correct RPM file for your kernel and may need to get the correct file and repeat this procedure EFC API Linux Install Guide 15 of 16 Rev C 01 02 2007 Great River Technology Inc Installing Fedora Core 5 Kernel Source Files These instructions are for installing the kernel source files for Fedora 5 and should only be performed by personnel with experience in Linux system administration and configuration The kernel source files must be installed before building the GRT drivers 1 gt Determine your kernel version Perform the following command to determine your current kernel uname r This will produce output something like this 2 6 15 1 2054 FC5smp This output shows the
21. ust be installed in order to build the drivers Without the kernel sources the kernel header files are not be available for building the device driver module For kernel versions 2 2 X and 2 4 X the kernel sources can be installed during Linux installation Typically this package must be manually selected during the installation process Please refer to your Linux installation documentation Starting with Kernel 2 6 the Linux kernel build system was introduced In order to build the drivers the Linux build system requires that the Linux kernel source be installed and the current running kernel must be configured and built If this is not done the driver builds will fail Fedora Core 3 and later distributions no longer include the kernel source package so the kernel source RPM file must be downloaded and the RPM installed If you are running Fedora Core 3 or Fedora Core 5 see the instructions for installing the kernel source in the section titled Installing Fedora Core 3 Kernel Source Files or Installing Fedora Core 5 Kernel Source Files in this document before proceeding with the EFCAPI installation 1 Copy device driver tar file The device driver source file PlxLinuxGRT tar is on the setup CD in the directory Driver Source Copy the file PlxLinuxGRT tar to the working directory usr src 2 Extract source files from the tar file Usea TAR file extractor to extract all the files from the tar file OR Open a terminal window and chan
Download Pdf Manuals
Related Search
Related Contents
MZC-64/66/88 - ELAN Home Systems Sony Mobile Communications AB User Manual - Snooper Services ペンボイス 音の出る しおりカードセット Sony WM-GX652 User's Manual Ion Science MVI User Manual Presentación Sara Sanz Operating Instructions - Support Canon PIXMA MP560 printer user guide manual Operating Copyright © All rights reserved.
Failed to retrieve file