48 Commits

Author SHA1 Message Date
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
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
d6fd03107f Split Makefiles: move kernel build rules into Kbuild files
This patch makes the Makefiles easier to read.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9039 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-05 02:13:40 +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
5500096a2b scst_local: Remove CONFIG_SCST_LOCAL_DIRECT_PROCESSING
Simplify the scst_local driver by always using thread context for passing
commands to SCST.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9005 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-07 00:28:10 +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
80ac4d2810 Use $(src) instead of $(KBUILD_EXTMOD)
While $(src) is always defined, $(KBUILD_EXTMOD) is only defined when
building code as an external module.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-06-01 02:12:09 +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
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
d0183001e4 Makefiles: Remove the $(BUILD_INI) variable
Since the BUILD_INI variable is set but not used, remove it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-16 21:31:30 +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
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
33f2f4a064 Makefiles: Only read the build_mode file if building inside the SCST tree
This patch avoids that the build_mode file is read when applying the
generate-kernel-patch output to the kernel tree and when building the
kernel tree.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8272 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-23 17:11:26 +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
70d3c72779 Makefiles: Use ccflags-y instead of EXTRA_CFLAGS
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8076 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:56:17 +00:00
Bart Van Assche
74e5b31b95 Makefiles: Use cc-option instead of enable-Wextra
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8075 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:55:15 +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
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
7d89372c53 Makefiles: respect DESTDIR when specified
Not all SCST components handle DESTDIR properly, or at all.

In particular:
* INSTALL_MOD_PATH should account for DESTDIR when 'make modules_install'
  is invoked, so the kernel make infrastructure deploys the modules
  and runs depmod against the proper directory tree.
* depmods must include a '-b' option to reference the proper directory tree.
* Drop special ISCSI_DESTDIR.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-18 08:40:36 +00:00
Bart Van Assche
79b8ce942e Makefiles: calculate KVER properly
When deriving the kernel version (KVER) from KDIR, the file
$(KDIR)/include/config/kernel.release should be preferred over
'make kernelversion'.

For example, the Ubuntu 3.2.0-23-generic kernel has a kernel.release
file containing '3.2.0-23-generic', but 'make kernelversion' returns
3.2.14. Since the modules are stored under /lib/modules/3.2.0-23-generic,
the value in kernel.release is the correct one to use.
    
Also:
- Evaluate KVER only once
- All depmod commands must include KVER
    
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
[bvanassche: Split long lines / removed trailing whitespace]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5286 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 15:52:10 +00:00
Bart Van Assche
e07a91e8a0 Makefiles: remove redundant 'depmod' invocations
Running 'make modules_install' already triggers invocation of depmod,
hence leave it out from those Makefiles that use 'make modules_install'.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5283 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-14 13:05:55 +00:00
Vladislav Bolkhovitin
0339bb8905 This change causes "make -C <dir> clean" to work. Also, use SUBDIRS=...
instead of M=... because of consistency with the rest of the Makefile.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-29 01:19:24 +00:00
Vladislav Bolkhovitin
369863f015 Allow install SCST in any location
Currently the install location of SCST is pretty much hard coded into 
the Makefiles to be /usr/local.

I am custom building a system for ZFS & SCST and I want to install in 
/usr instead of /usr/local.

Currently I am doing a “find . -name Makefile -exec sed -i 's:/usr/local:/usr:g'
{} \;” to accommodate this.

This patch fixes it.

From Sietse van Zanen <sietse@wizdom.nu>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-08 21:25:45 +00:00
Vladislav Bolkhovitin
bd7c893f04 Multiple makefiles: autodetect SCST include directory
It is cumbersome to change SCST_INC_DIR and SCST_DIR in each Makefile
before and after a release. Hence modify the Makefiles such that these
paths are detected automatically.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4740 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-16 00:12:38 +00:00
Vladislav Bolkhovitin
c6d247254c scst_local: Remove a superfluous include path
Target drivers must not include header files from the SCST source
code directory. Hence remove -I$(SCST_DIR) from the compiler flags.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-16 00:08:44 +00:00
Vladislav Bolkhovitin
e7e9101efd Automate release archive generation
This patch makes it easier to generate the release archives that
can be downloaded from http://scst.sourceforge.net/downloads.html.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4679 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-04 00:29:30 +00:00
Vladislav Bolkhovitin
1b68210cce Fix possible commands hangs with lockless queuecommand() in scst_local
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4463 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-10 01:48:35 +00:00
Vladislav Bolkhovitin
137fbb6779 Remove dead target
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3906 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-11-04 02:24:35 +00:00
Vladislav Bolkhovitin
7096e492ba Improve changing debug/release/etc states by making them not depending
from the previous state. Hence, the corresponding labels were renamed to
2debug, 2release and 2perf.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3736 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-07-22 23:10:08 +00:00
Vladislav Bolkhovitin
6012710767 - Let's always do extraclean on Makefiles modifications, because they can affect data layout in header files, which could not be detected by all target drivers/dev handlers makes
- Cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-01 16:58:06 +00:00
Vladislav Bolkhovitin
0f11a6139f Let's make build state changes errors more clear
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3445 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-11 01:56:38 +00:00
Vladislav Bolkhovitin
f518cd150c Let's remove *.orig and *.rej files on extraclean
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-03-10 20:07:23 +00:00
Vladislav Bolkhovitin
d66dcd71eb Fix minor Makefile issues
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2655 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-10 12:35:11 +00:00
Bart Van Assche
a5417c1641 Compilation: Disabled -Wextra on RHEL5 since it triggers too many uninteresting warnings on that platform.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2615 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-06 10:20:16 +00:00
Richard Sharpe
3532bd33df Add support for make debug2release, release2debug debug2perf and perf2debug.
This now only needs to be switched on in the master makefile.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2055 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-04 19:14:29 +00:00
Vladislav Bolkhovitin
00b094c7fa Patch from Ruben Laban <r.laban@ism.nl>:
While writing DKMS support for the SCST and iSCST-SCST kernel modules, I ran 
into a (common) problem with regard to out-of-tree build detection. A common 
method to detect out-of-tree building is by using the KERNELRELEASE variable. 
The usage of this variable poses a problem when using DKMS. DKMS itself uses 
the KERNELRELEASE variable to specify the kernel for which the driver to 
build. A suggested alternative would to use the PATCHLEVEL variable as part 
of the detection mechanism instead. I attached a patch reflecting this 
suggested change.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@720 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 19:42:03 +00:00
Vladislav Bolkhovitin
ae7345340c A bunch of minor fixes/improvements, cleanups and updates:
- In scst_local new experimental compile-time option to force direct processing added
 - Attempt in SCST structures to separate read-mostly from read-write data to decrease cache ping-pong between CPUs
 - In scst_vdisk new module parameter num_threads added to specify a number of threads for each vdisk/vcdrom. Default is 5.
 - Debug logging for failed digests in iSCSI-SCST improved
 - Docs updates/cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@635 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-16 20:56:06 +00:00
Vladislav Bolkhovitin
e7429fd16e Minor fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@628 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-04 16:12:56 +00:00
Vladislav Bolkhovitin
54b2a0a5b9 -Wno-missing-field-initializers added. Small cleanup.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@542 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-25 17:31:10 +00:00
Vladislav Bolkhovitin
1eeffbb3da The first approximation to update to 2.6.27 + minor fixes, particularly remove of unused variable and add full path to depmod in Makefiles. Partially done by Bart Van Assche <bart.vanassche@gmail.com>.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@529 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-21 11:51:52 +00:00
Vladislav Bolkhovitin
3fb2634b6e scst_local module added.
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@526 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-16 19:23:22 +00:00