===============================================================================
To build kernel modules depending on OFED's modules, take the Modules.symvers
-file from <prefix>/src/ofa_kernel/Module.symvers (part of the compat-rdma-devel RPM)
+file from <prefix>/src/compat-rdma/Module.symvers (part of the compat-rdma-devel RPM)
and copy it to the modules subdir and then compile your module.
-If <prefix>/src/ofa_kernel/Module.symvers does not exist or it is empty, use the
+If <prefix>/src/compat-rdma/Module.symvers does not exist or it is empty, use the
create_Module.symvers.sh (a part of the ofed-docs RPM) script to create the
Module.symvers file.
Example:
KSRC = /lib/modules/$(KVERSION)/source
KOBJ = /lib/modules/$(KVERSION)/build
-#
-# Use this if you're building on a OFED system. Make sure you
-# configure the ofa_kernel-1.3 tree with the options from
-# /etc/infiniband/info
-#
-OFA ?= /usr/src/openib
+OFA ?= /usr/src/compat-rdma
ifneq ($(shell test -d $(OFA) && echo YES || echo ""),)
include $(OFA)/configure.mk.kernel
INCLUDE_COMPAT = -include $(OFA)/include/linux/compat-2.6.h
# Use this if you're building against a kernel.org kernel with
# rdma support enabled.
#
-#OFA=$(KSRC)
-#OFA=$(KOBJ)
include $(OFA)/config.mk
EXTRAVERSION = $(shell echo -n ${KVERSION} | sed 's/^[0-9]\+\.[0-9]\+\.[0-9]\+//')
+++ /dev/null
-#!/bin/bash
-#
-# Copyright (c) 2006 Mellanox Technologies. All rights reserved.
-# Copyright (c) 2004, 2005, 2006 Voltaire, Inc. All rights reserved.
-#
-# This Software is licensed under one of the following licenses:
-#
-# 1) under the terms of the "Common Public License 1.0" a copy of which is
-# available from the Open Source Initiative, see
-# http://www.opensource.org/licenses/cpl.php.
-#
-# 2) under the terms of the "The BSD License" a copy of which is
-# available from the Open Source Initiative, see
-# http://www.opensource.org/licenses/bsd-license.php.
-#
-# 3) under the terms of the "GNU General Public License (GPL) Version 2" a
-# copy of which is available from the Open Source Initiative, see
-# http://www.opensource.org/licenses/gpl-license.php.
-#
-# Licensee has the right to choose one of the above licenses.
-#
-# Redistributions of source code must retain the above copyright
-# notice and one of the license notices.
-#
-# Redistributions in binary form must reproduce both the above copyright
-# notice, one of the license notices in the documentation
-# and/or other materials provided with the distribution.
-#
-# Description: creates Module.symvers file for InfiniBand modules
-
-KVERSION=${KVERSION:-$(uname -r)}
-MOD_SYMVERS=./Module.symvers
-SYMS=/tmp/syms
-
-echo MODULES_DIR=${MODULES_DIR-:./}
-
-if [ -f ${MOD_SYMVERS} -a ! -f ${MOD_SYMVERS}.save ]; then
- mv ${MOD_SYMVERS} ${MOD_SYMVERS}.save
-fi
-rm -f $MOD_SYMVERS
-rm -f $SYMS
-
-for mod in $(find ${MODULES_DIR} -name '*.ko') ; do
- nm -o $mod |grep __crc >> $SYMS
- n_mods=$((n_mods+1))
-done
-
-n_syms=$(wc -l $SYMS |cut -f1 -d" ")
-echo Found $n_syms OFED kernel symbols in $n_mods modules
-n=1
-
-while [ $n -le $n_syms ] ; do
- line=$(head -$n $SYMS|tail -1)
-
- line1=$(echo $line|cut -f1 -d:)
- line2=$(echo $line|cut -f2 -d:)
- file=$(echo $line1| sed -e 's@./@@' -e 's@.ko@@' -e "s@$PWD/@@")
- crc=$(echo $line2|cut -f1 -d" ")
- sym=$(echo $line2|cut -f3 -d" ")
- echo -e "0x$crc\t$sym\t$file" >> $MOD_SYMVERS
- n=$((n+1))
-done
-
-echo ${MOD_SYMVERS} created.