Commit Graph

85 Commits

Author SHA1 Message Date
Bart Van Assche
de28843d9f Makefiles: Simplify Module.symvers handling
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-31 21:13:13 +00:00
Bart Van Assche
dc7e039124 Makefiles: Remove most instances of $(SCST_INC_DIR)
Move the $(SCST_INC_DIR) definitions from the out-of-tree sections into
the in-kernel sections. Since SCST is now distributed as a single tar
archive, only support in-tree builds with $(SCST_INC_DIR) and $(SCST_DIR).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8079 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 22:10:21 +00:00
Bart Van Assche
ef99fe40be fcst, srpt: Move the build_mode file to the top level
Additionally, rename BUILDMODE into BUILD_MODE and FCST/SRPTFLAGS into
BUILD_MODE_CFLAGS_.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:46:24 +00:00
Bart Van Assche
e170b8dabc ib_srpt: Port to Linux kernel v4.21
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 19:06:37 +00:00
Bart Van Assche
d3e2f5ab99 Makefiles: Stop using $(SUBDIRS)
This patch avoids that the following warning is reported when building
against kernel v4.21:

================= WARNING ================
'SUBDIRS' will be removed after Linux 5.3
Please use 'M=' or 'KBUILD_EXTMOD' instead
==========================================


A quote from an upstream kernel patch:

commit 07e5823127155b3a29003aca926f87c9843f6810
Author: Andrew Morton <akpm@osdl.org>
Date:   Mon Apr 12 01:05:40 2004 -0700

    [PATCH] kbuild: external module support
    
    From: Sam Ravnborg <sam@ravnborg.org>
    
    Based on initial patch from Andreas Gruenbacher there is now better support
    for building external modules with kbuild.
    
    The preferred syntax is now:
    make -C $KERNELSRC M=$PWD
    
    but the old syntax:
    make -C $KERNELSRC SUBDIRS=$PWD modules
    will remain supported.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-12-31 19:03:14 +00:00
Bart Van Assche
63ed4b4f9a ib_srpt: Fix build against MLNX_OFED-4.5
This patch fixes the following error during srpt compilation:
  CC [M]  /.autodirect/mtrswgwork/sergeygo/scst-trunk/srpt/src/ib_srpt.o
In file included from /usr/src/ofa_kernel/default/include/rdma/ib_verbs.h:76:0,
                 from /usr/src/ofa_kernel/default/include/rdma/ib_cache.h:38,
                 from /.autodirect/mtrswgwork/sergeygo/scst-trunk/srpt/src/ib_srpt.c:61:
/usr/src/ofa_kernel/default/include/uapi/rdma/rdma_user_ioctl.h:45:10: fatal error: rdma/rdma_user_ioctl_cmds.h: No such file or directory
 #include <rdma/rdma_user_ioctl_cmds.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The same problem has already been fixed for iscsi in [r7215] "iscsi-scst/Makefile: Add include/uapi directory to the include path".

From: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-01 05:28:18 +00:00
Bart Van Assche
dab69e7d60 ib_srpt: Port to Linux kernel v4.19
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7471 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-27 03:19:47 +00:00
Bart Van Assche
cf843cecf3 scst, ib_srpt, ibmvstgt: Swap Module.symvers detection logic
Ensure that Module.symvers is used when building against an incompletely
built kernel tree.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7434 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:22:52 +00:00
Bart Van Assche
a4b443cc78 ib_srpt: Add a configure test for dev_attr.max_send_sge
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 00:42:07 +00:00
Bart Van Assche
bd6f57f67f Update Subversion ignore lists
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-11 16:48:22 +00:00
Bart Van Assche
f1acec0e57 ib_srpt/Makefile: Fix OFED/MOFED detection on RHEL 7.4
Because of a not fully root-caused reason (make bug?) the output of the
shell commands used to determine the (M)OFED RPM name was written to
stderr instead of stdout. Work around this bug by splitting the shell
commands used to determine the (M)OFED RPM names.

Reported-by: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:12:34 +00:00
Bart Van Assche
efb383cab4 ib_srpt: Kernel v4.16 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7371 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-13 19:15:32 +00:00
Bart Van Assche
bcdb25e550 iscsi-scst, srpt: Remove MOFED_MAJOR and MOFED_MINOR definitions
Commit r7084 removed all users of MOFED_MAJOR. Hence also remove the
code that sets that variable. Note: MOFED_MINOR was never used in any
.c file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-05 17:24:46 +00:00
Bart Van Assche
0dd06cbcb9 srpt/Makefile: Improve MOFED detection further
Ensure that MOFED is detected correctly on Debian systems on which the rpm
command has been installed ("alien" package).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-05 17:12:39 +00:00
Bart Van Assche
56a8b3ba57 srpt/Makefile: Add support for detecting MOFED on Debian systems
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-04 17:55:38 +00:00
Bart Van Assche
1e457529eb ib_srpt: Port to Linux kernel v4.12
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7218 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-27 15:40:59 +00:00
Bart Van Assche
b58937bf62 srpt/Makefile: Add support for make -i
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7133 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-15 04:10:44 +00:00
Bart Van Assche
4f6fc459c0 ib_srpt: Optimize Makefile
Cache conftest results and enable parallel invocation of conftests.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7127 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 04:21:38 +00:00
Bart Van Assche
db5426169b ib_srpt: Improve portability
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7082 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-27 20:23:31 +00:00
Bart Van Assche
122a343343 ib_srpt: Fix RHEL / CentOS 7.3 build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7063 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-17 12:46:51 +00:00
Bart Van Assche
aae05f0af4 ib_srpt: Fix build against MOFED v3.4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7062 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-17 12:41:41 +00:00
Bart Van Assche
b3893277be ib_srpt: Reduce build time
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7048 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-01 16:19:40 +00:00
Bart Van Assche
7cb08382ac ib_srpt Makefile: Follow-up for trunk r6138
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7047 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-01 16:19:14 +00:00
Bart Van Assche
d2dd61c072 isert-scst, srpt: Fix build on systems with kernel >= 4.2.0 + MOFED 3.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6973 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-22 04:28:52 +00:00
Bart Van Assche
d13b730d6d ib_srpt: Improve robustness of "make clean"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6725 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-12-11 01:38:46 +00:00
Bart Van Assche
68ce2d0ce4 ib_srpt: Port to MOFED 3.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-08 16:18:27 +00:00
Bart Van Assche
0651bc1e4e ib_srpt: Linux kernel v4.2 ib_create_cq() build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6426 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 23:49:48 +00:00
Bart Van Assche
5f95edc612 ib_srpt: Test whether ib_create_send_mad() needs a base_version argument
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6424 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 23:24:26 +00:00
Bart Van Assche
87b6fde56d ib_srpt: Linux kernel v4.2 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 22:50:25 +00:00
Bart Van Assche
e2210ff40f ib_srpt, make clean: Remove all temporary files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6381 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-17 00:28:39 +00:00
Bart Van Assche
550ab7c1d3 ib_srpt: RHEL 7.1 build fix
With the RHEL 7.0 kernel ib_register_mad_agent() takes eight
arguments. With the RHEL 7.1 kernel the same function takes nine
arguments. Detect at build time how many arguments this function
takes.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 20:12:28 +00:00
Vladislav Bolkhovitin
e719f0eca5 ib_srpt: cleanup fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6203 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-06 02:05:54 +00:00
Bart Van Assche
1c8574763b ib_srpt, Makefile: Pass same flags to "make modules" and to "make install"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6141 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-04 10:42:38 +00:00
Bart Van Assche
940faa9ad4 ib_srpt: Enable building against OFED headers without patching the build system
Additionally, include the OFED flavor name in the ib_srpt version number.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-02 14:28:25 +00:00
Bart Van Assche
387a603482 ib_srpt: Detect Mellanox OFED 2.3 correctly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5990 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-26 11:32:32 +00:00
Bart Van Assche
dd5561c93a srpt/Makefile: Add double quotes around a path
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5878 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-19 00:17:41 +00:00
Bart Van Assche
3cff1e083f ib_srpt: Make "make -j<n> install" work for n >= 2 if "make all" has not been run first
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5806 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-15 12:30:43 +00:00
Bart Van Assche
56fbcf3ce5 srpt/Makefile: SLES + Mellanox OFED build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5681 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-18 09:28:22 +00:00
Bart Van Assche
1ba2b87afa srpt/Makefile: Remove a superfluous assignment statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5680 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-18 09:27:41 +00:00
Bart Van Assche
47e087abb4 ib_srpt: Fix Mellanox OFED build
Use the proper include directory when building against Mellanox OFED.
Do not require to remove /lib/modules/$(KVER)/kernel/drivers/infiniband
before building ib_srpt.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5679 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-16 08:29:16 +00:00
Bart Van Assche
bebce1c99f ib_srpt: Remove existing ib_srpt.ko kernel modules before installation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5628 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-28 19:56:36 +00:00
Bart Van Assche
f4a38d3e6e ib_srpt: Complain if another ib_srpt.ko kernel module already exists
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5621 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-24 13:32:18 +00:00
Bart Van Assche
e902f79ecf kernel module installation: Skip "depmod" when building an RPM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5612 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-19 12:48:25 +00:00
Bart Van Assche
dc869faeca ib_srpt: Make non-OFED build work again
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-12 13:38:38 +00:00
Bart Van Assche
c7f9bcd1c0 ib_srpt: Set MOFED include path correctly if MOFED has been installed with --add-kernel-support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-12 11:33:00 +00:00
Bart Van Assche
60a8326a28 ib_srpt: RHEL 5 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 10:02:15 +00:00
Bart Van Assche
a941f47817 ib_srpt: Make IB_EVENT_GID_CHANGE test independent of the OFED detection code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5578 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-10 14:49:59 +00:00
Bart Van Assche
007e3dfbbf ib_srpt: Make the test for IB_EVENT_GID_CHANGE support more robust
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5577 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-10 14:16:14 +00:00
Bart Van Assche
99b7abe259 ib_srpt, Makefile: Introduce the OFED_KERNEL_DIR variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5473 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-24 12:27:00 +00:00
Bart Van Assche
cd0dcb32ab ib_srpt: Add support in the Makefile for MLNX OFED and for OFED 3.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5471 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-24 10:38:37 +00:00