From 0528d7cda0aa82f2f96a7d30ee8290eec54177cf Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Sun, 11 Oct 2015 14:59:00 +0300 Subject: [PATCH] Updated docs issue: http://bugs.openfabrics.org/bugzilla/show_bug.cgi?id=2560 Signed-off-by: Vladimir Sokolovsky --- OFED_tips.txt | 13 ++----- scripts/create_Module.symvers.sh | 64 -------------------------------- 2 files changed, 3 insertions(+), 74 deletions(-) delete mode 100755 scripts/create_Module.symvers.sh diff --git a/OFED_tips.txt b/OFED_tips.txt index 866d228..f84ee80 100644 --- a/OFED_tips.txt +++ b/OFED_tips.txt @@ -261,10 +261,10 @@ Note: The file /etc/security/limits.conf contains further documentation. =============================================================================== To build kernel modules depending on OFED's modules, take the Modules.symvers -file from /src/ofa_kernel/Module.symvers (part of the compat-rdma-devel RPM) +file from /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 /src/ofa_kernel/Module.symvers does not exist or it is empty, use the +If /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: @@ -279,12 +279,7 @@ KVERSION = $(shell uname -r) 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 @@ -293,8 +288,6 @@ endif # 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]\+//') diff --git a/scripts/create_Module.symvers.sh b/scripts/create_Module.symvers.sh deleted file mode 100755 index 5b2d76d..0000000 --- a/scripts/create_Module.symvers.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/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. -- 2.41.0