112 Commits

Author SHA1 Message Date
Gleb Chesnokov
6c2771baef Makefile: Specify the installation directory for SCST modules explicitly
This patch fixes the installation process for Linux kernels where the
default value of INSTALL_MOD_DIR differs from `extra`.

For instance, it unbreaks `make rpm` against Fedora's kernels, where
INSTALL_MOD_DIR is set to `updates`.
2023-06-14 16:49:36 +03:00
Gleb Chesnokov
3961019e74 ib_srpt: Port to Linux kernel v6.1
Support for the following IB changes in the Linux kernel v6.1:
- 91a3f14ec953 ("IB/cm: Remove the service_mask parameter from ib_cm_listen()")
2022-10-27 12:31:00 +03:00
Bart Van Assche
d10a7bf5d5 Restore support for building with clang
The previous commit removed support for building with clang. Restore support
for building with clang without breaking cross-compilation support.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-05 21:23:17 +00:00
Bart Van Assche
8eb850acce Revert "Make it possible to build SCST with clang"
Since commit ecea60a694 breaks cross-compilation, revert it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9208 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-05 18:39:38 +00:00
Bart Van Assche
ecea60a694 Make it possible to build SCST with clang
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9089 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-02 21:19:24 +00:00
Bart Van Assche
bd3355500a iscsi-scst, srpt: Rename the PRE_CFLAGS variable into CONFTEST_FLAGS
The latter name reflects better the role of this variable. Remove the
CPPFLAGS assignment from srpt/src/Kbuild because it is not useful.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9082 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 03:34:35 +00:00
Bart Van Assche
93c2711530 iscsi-scst, srpt: Modify the message that reports which kernel headers are used
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9080 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 03:31:02 +00:00
Bart Van Assche
856bd8c1a1 configure tests: Rename Makefiles into Kbuild
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9078 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 02:52:51 +00:00
Bart Van Assche
8a22ef6289 ib_srpt, iscsi-scst: Port to Linux kernel v5.8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-25 14:09:23 +00:00
Bart Van Assche
502355bc8d srpt/Makefile: Revert a change that has been checked in accidentally
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9058 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 02:58:08 +00:00
Bart Van Assche
0a0a1bebe1 Ignore */conftest/*/build-output*.txt files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 02:55:33 +00:00
Bart Van Assche
cf909e3e16 Makefiles: If both KDIR and KVER have been set, preserve KDIR
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9052 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-19 00:00:49 +00:00
Bart Van Assche
47403656ee Make 'make clean' remove all build files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9038 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:08:55 +00:00
Bart Van Assche
212fd12cba iscsi-scst, srpt: Improve run_conftest
Add -Wno-deprecated-declarations to the compiler flags for RHEL and CentOS.
Save the output of the build process such that it can be inspected easily.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9037 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:06:21 +00:00
Bart Van Assche
9be61ba538 Move KBUILD_EXTRA_SYMBOLS definitions into the kernel Makefiles
$(KBUILD_EXTRA_SYMBOLS) is not only used at compile time but also at link
time. Move the $(KBUILD_EXTRA_SYMBOLS) definitions such that it is
available both at compile time and at link time.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:15:47 +00:00
Bart Van Assche
f7fe23928f Change $(MODULE_SYMVERS) into Module.symvers
Or in other words, drop support for kernel versions before 2.6.18.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:11:16 +00:00
Bart Van Assche
422d670126 srpt, isert-scst: Fix the build against MOFED
This patch is a fix for commit a169500590 ("Makefiles:
Use KBUILD_EXTRA_SYMBOLS instead of copying Module.symvers"; r8686).

Reported-by: Grant Albitz <GAlbitz@All-Bits.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8758 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-28 04:28:19 +00:00
Bart Van Assche
a169500590 Makefiles: Use KBUILD_EXTRA_SYMBOLS instead of copying Module.symvers
Copying Module.symvers is the oldest supported method for building external
kernel modules that depend on another external kernel module. Since support
for that method will be removed from Linux kernel v5.5, use
KBUILD_EXTRA_SYMBOLS instead to specify the external symbols SCST kernel
modules depend on. Support for KBUILD_EXTRA_SYMBOLS was introduced in
upstream kernel v2.6.26 so this patch drops support for kernels before
v2.6.26.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8686 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-16 23:29:42 +00:00
Bart Van Assche
50af8e3c4d ib_srpt/Makefile: Improve MOFED support on Debian
Instead of only checking the mlnx-ofed-kernel-dkms, also check the
mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: Combined two patches into this single change ]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8668 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 19:57:05 +00:00
Bart Van Assche
ac145e1cb6 ib_srpt: Detect ib_sg_dma_len() presence at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v5.1 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8655 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 21:28:37 +00:00
Bart Van Assche
30c6cdfbe7 ib_srpt: Detect SRP_DATA_DESC_IMM constant support at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v4.21 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8653 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 20:40:51 +00:00
Bart Van Assche
9add460430 Suppress module signing error messages
Suppress the following error messages:

- SSL error:02001002:system library:fopen:No such file or directory: crypto/bio/bss_file.c:72
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: crypto/bio/bss_file.c:79
sign-file: certs/signing_key.pem: No such file or directory

 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-29 22:33:03 +00:00
Bart Van Assche
84725029ce scst: Add support for signing SCST kernel modules
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-29 04:42:40 +00:00
Bart Van Assche
f6371c5d5e Makefiles: Run depmod also on Ubuntu systems after module installation
Fixes: e902f79ecf ("kernel module installation: Skip "depmod" when building an RPM"; r5612)



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-15 00:29:55 +00:00
Bart Van Assche
4af058edd4 srpt: Fix the build against Oracle Linux + MOFED
Disable DTrace when building against MOFED to avoid hitting compatibility
issue between DTrace and MOFED.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-31 01:23:20 +00:00
Bart Van Assche
8e862c6d9b iscsi-scst, srpt: Restore MOFED_MAJOR and MOFED_MINOR definitions
This patch reverts commit bcdb25e550 (r7363).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-30 13:41:27 +00:00
Bart Van Assche
22f1132073 Makefiles: Rework build mode switching
Move the build_mode file from the top level into the scst directory. Write
build mode defines into scst/include/build_mode.h and include that file
directly or indirectly in all source files that depend on these #defines.
This approach has the advantage that "make clean" does no longer has to
be run when switching between build modes because the kernel build system
recognizes build_mode.h as a dependency and triggers a rebuild of all
source files that directly or indirectly include the build_mode.h header
file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-05 18:19:38 +00:00
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