fp@224: #!/bin/sh fp@224: fp@224: #------------------------------------------------------------------------------ fp@224: # fp@224: # Realtime module install script fp@224: # fp@258: # $Id$ fp@224: # fp@224: # Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH fp@224: # fp@224: # This file is part of the IgH EtherCAT Master. fp@224: # fp@224: # The IgH EtherCAT Master is free software; you can redistribute it fp@224: # and/or modify it under the terms of the GNU General Public License fp@246: # as published by the Free Software Foundation; either version 2 of the fp@246: # License, or (at your option) any later version. fp@224: # fp@224: # The IgH EtherCAT Master is distributed in the hope that it will be fp@224: # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of fp@224: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the fp@224: # GNU General Public License for more details. fp@224: # fp@224: # You should have received a copy of the GNU General Public License fp@224: # along with the IgH EtherCAT Master; if not, write to the Free Software fp@224: # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@224: # fp@246: # The right to use EtherCAT Technology is granted and comes free of fp@246: # charge under condition of compatibility of product made by fp@246: # Licensee. People intending to distribute/sell products based on the fp@246: # code, have to sign an agreement to guarantee that products using fp@246: # software based on IgH EtherCAT master stay compatible with the actual fp@246: # EtherCAT specification (which are released themselves as an open fp@246: # standard) as the (only) precondition to have the right to use EtherCAT fp@246: # Technology, IP and trade marks. fp@246: # fp@224: #------------------------------------------------------------------------------ fp@224: fp@224: # Fetch parameters fp@224: fp@224: if [ $# -ne 2 ]; then fp@224: echo "Usage: $0 " fp@224: exit 1 fp@224: fi fp@224: fp@224: MODULENAME=$1 fp@224: KERNEL=$2 fp@224: fp@224: MODULESDIR=/lib/modules/$KERNEL/kernel/drivers/rt fp@224: fp@224: echo "Realtime installer" fp@224: echo " target: $MODULENAME" fp@224: echo " kernel: $KERNEL" fp@224: fp@224: # Create target directory fp@224: fp@224: if [ ! -d $MODULESDIR ]; then fp@224: echo " creating $MODULESDIR..." fp@224: mkdir $MODULESDIR || exit 1 fp@224: fi fp@224: fp@224: # Install files fp@224: fp@224: echo " installing $MODULENAME..." fp@224: if ! cp $MODULENAME.ko $MODULESDIR/$MODULENAME.ko; then exit 1; fi fp@224: fp@224: # Calculate dependencies fp@224: fp@224: echo " building module dependencies..." fp@224: depmod fp@224: fp@224: # Finish fp@224: fp@224: echo "done." fp@224: exit 0 fp@224: fp@224: #------------------------------------------------------------------------------