89 Commits

Author SHA1 Message Date
Gleb Chesnokov
45f9f12bb3 iscsi-scst: Remove cm_listen conftest
Remove cm_listen conftest because iscsi-scst doesn't use ib_cm_listen API.
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
86d602973b iscsi-scst: Make this kernel module again independent of (M)OFED
This patch reverts f58c8248dd ("iscst-scst: Fix the OFED build"). This
patch partially reverts bd3355500a ("iscsi-scst, srpt: Rename the
PRE_CFLAGS variable into CONFTEST_FLAGS").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9085 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-26 23:52:40 +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
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
1379918d8a iscsi-scst/Makefile: Avoid duplicate exported symbol warnings for kernel v5.5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8687 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-17 04:24:55 +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
810231050f iscsi-scst/Makefile: Improve MOFED support for Debian systems
Instead of only checking the mlnx-ofed-kernel-dkms package name, also check
the mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: extracted this change from a larger patch ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8667 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 19:54:54 +00:00
Bart Van Assche
8bdb6a625a iscsi-scst/Makefile: Fix grabbing OFED_VERS from deb version
Fixes: e7ccfcf213 ("iscsi-scst/Makefile, Ubuntu: Simplify code for version querying")
Signed-off-by: Ville Skytta <ville.skytta@iki.fi>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8666 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 06:39:42 +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
eb03ee602b iscsi-scst/Makefile: Fix a syntax error that was introduced in r8593
Reported-by: Rob Turk <robtu@rtist.nl>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-09-29 22:09:05 +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
ceafec13e9 iscsi-scst/Makefile: Avoid that 'make' reports an error if InfiniBand support is disabled in the kernel
Reported-by: Goran Bruns <goeran.bruns@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8419 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-06-08 01:56:34 +00:00
Bart Van Assche
506aac2508 iscsi-scst: Detect at compile time whether or not max_recv_sge is available
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8399 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-31 01:21:49 +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
aa91d1cd95 iscsi-scst: Work around a compatibility problem between MOFED and DTRACE
When building against Oracle Linux + MOFED the build fails unless if
DTrace is disabled. Hence disable DTrace for the isert-scst module if
MOFED is detected.

Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>
[ bvanassche: Left out one empty OFED_CONFIG assignment ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-05-30 03:14:44 +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
6cb1d158e7 Makefiles: Fix $(SCST_DIR)
Fixes: dc7e039124 ("Makefiles: Remove most instances of $(SCST_INC_DIR)") (r8079)


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8121 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-31 21:11:17 +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
623d4e6d0a Makefiles: Use build_mode instead of modifying the Makefile when switching the build mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8074 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:53:39 +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
1587638134 Remove support for "make enable_proc" and "make disable_proc"
Since RHEL 5 and kernel versions before 2.6.26 rely on procfs support,
this patch removes support for RHEL 5.x and also for kernel versions
before 2.6.26.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-22 22:13:40 +00:00
Bart Van Assche
7d13a9430e isert-scst: Port to Linux kernel v4.19
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7472 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-27 03:20:51 +00:00
Bart Van Assche
b1b5e8e497 isert-scst: Avoid that building against MOFED fails with "Unknown symbol backport_dependency_symbol"
Reported-by: Carsten Aulbert <carsten.aulbert@aei.mpg.de>
Signed-off-by: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7444 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-24 03:17:05 +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
7c550d4724 iscsi-scst: UEK 4.1.12-103.9.7.el7uek.x86_64 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7272 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-19 16:35:40 +00:00
Bart Van Assche
e7ccfcf213 iscsi-scst/Makefile, Ubuntu: Simplify code for version querying
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-09-25 23:35:49 +00:00
Bart Van Assche
63f352fc06 iscsi-scst/Makefile: Change MOFED path into /usr/src/ofa_kernel/default
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7234 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-09-25 01:52:53 +00:00
Bart Van Assche
f3d11b715b iscsi-scst/Makefile: Add include/uapi directory to the include path
Reported-by: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7215 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-10 19:39:27 +00:00
Bart Van Assche
64d40aeeb2 iscsi-scst/Makefile: Simplify MLNX_OFED support code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7214 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-10 18:26:29 +00:00
Bart Van Assche
4edaf3e4bf iscsi-scst/Makefile: Simplify MLNX_OFED detection for Red Hat
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7213 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-10 18:25:47 +00:00
Bart Van Assche
4ffb6b6f12 iscsi-scst/Makefile: Add support for make -i
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7132 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-15 04:10:31 +00:00
Bart Van Assche
8c4889d092 iscsi-scst/Makefile: Fix detection of whether InfiniBand is enabled
Inspecting modules.symbols is fine after a kernel has been installed but
not if a kernel tree has not been installed. If a kernel tree has not
been installed, check the .config file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7131 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 21:38:56 +00:00
Bart Van Assche
3685688caa iscsi-scst/Makefile: Optimize Makefile
Cache conftest results and enable parallel invocation of conftests.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7128 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 04:29:38 +00:00
Vladislav Bolkhovitin
68129122e8 iscsi-scst: clean up the conftest subdirectory too
Reported-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7124 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 01:16:10 +00:00
Bart Van Assche
9cbe881f2f isert-scst: Fix CentOS 7.3 build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7084 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-27 20:26:11 +00:00
Bart Van Assche
db36d29932 isert-scst: Rename SCST_DIR into SCST_SYMVERS_DIR
Additionally, align shell code.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7083 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-27 20:25:13 +00:00
Vladislav Bolkhovitin
1dd41fa380 generate-kernel-patch: fix custom cross-compilation kernel case
Otherwise there is non-fatal error like: No such file or directory

grep: /lib/modules/<current_running_kernel>/build/.config: Permission denied

This is a better version of r7022 suggested by Bart



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7037 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-11-30 03:06:38 +00:00