Commit Graph

33 Commits

Author SHA1 Message Date
Bart Van Assche
e2ef5de20c Option -p now generates three extra patches: scst_debug.diff, scst_sgv.diff and scst_user.diff.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@608 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 16:27:19 +00:00
Bart Van Assche
a4f41bca01 Added 'make htmldocs'. Changed default kernel version from 2.6.27.7 into 2.6.27.8.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 13:39:16 +00:00
Bart Van Assche
86d4199dcb Modified the way in which the dummy mpt patch is suppressed, such that the run-regression-tests script works again.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@605 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 13:37:43 +00:00
Vladislav Bolkhovitin
7ba9ab3f9c Various changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@602 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-05 13:48:10 +00:00
Bart Van Assche
5567479e23 - Removed command-line option -l -- scst_local is now unconditionally
included in the generated patch output.
- Added command-line option -p <patchdir>, which allows to generate a
  set of patches instead of one big patch.
- New feature: by setting the environment variable SIGNED_OFF_BY, the
  Signed-off-by line is filled in.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-04 21:21:05 +00:00
Vladislav Bolkhovitin
c062b11e42 Added README for scst_local
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@598 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-04 19:13:02 +00:00
Bart Van Assche
52fae86a01 Added 'make headers_check', 'make checkstack' and 'make namespacecheck'.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-03 18:29:50 +00:00
Vladislav Bolkhovitin
7f87aa16a3 Small docs update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@589 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-29 17:00:15 +00:00
Vladislav Bolkhovitin
2ceda4a4c2 alloc_io_context renamed to export_alloc_io_context
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@588 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-28 17:19:29 +00:00
Vladislav Bolkhovitin
1cabaea296 - Performance increase
- Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@587 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-28 17:15:17 +00:00
Vladislav Bolkhovitin
31c2ada297 The patch below implements the following modifications for
scripts/run-regression-tests:
- Adds a description about what the script does.
- Added command-line option -c which allows to specify which directory to use
  as cache for kernel tar balls and patch files.
- More error checking.
- scst_local is now included in all the tests.
- Swapped the order of two test steps, namely compiling the whole tree and
  running sparse. This way the output of the sparse tool is available a lot
  sooner.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@574 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-18 18:47:09 +00:00
Vladislav Bolkhovitin
75d2a4b1a2 The patch below adds the first version of a script that runs regression tests
to the SCST source tree. All tests are run in an automated fashion, but result
interpretation is not yet completely automated.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@552 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-30 12:43:20 +00:00
Vladislav Bolkhovitin
d5dc2fed6a By testing kernel patch generation for the mpt driver I found out that the
Kconfig and Makefile were read from the wrong directory. The patch below fixes
this.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@547 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-28 20:41:29 +00:00
Vladislav Bolkhovitin
9af236707e The patch below implements the following changes:
- Add a dummy Signed-off-by line to the generated patch, such that checkpatch
  doesn't complain that it's missing.
- Sort the names of source files (through ls) before using these, such that
  the generated patch is the same during each run.
- Fixed a bug in #elif handling (this bug is not triggered by the current SCST
  code).

This patch has been tested by comparing the output of the old and the new
generate-kernel-patch script.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@530 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-22 17:47:28 +00:00
Vladislav Bolkhovitin
66bc3f06a3 The patch below implements the following changes:
- Converted tabs to spaces in the help text.
- Removed command-line option '-s' -- the srpt driver is now always included.
- Recognizes now both kernel versions with three components (x.y.z) and kernel
  versions with four components (x.y.z.p).
- Empty files for Kconfig and Makefile are added for those components that are
  not included in the kernel patch, such that make allyesconfig
  / make allmodconfig keeps working.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@528 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-21 10:23:42 +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
Vladislav Bolkhovitin
eb7c33a0b0 As known the script generate-kernel-patch generates a patch for the specified
vanilla Linux kernel version. When I submitted this script for inclusion in the
SCST Subversion repository the SRPT target driver was excluded by default
because of checkpatch errors triggered by the SRPT source code. These errors
have been fixed considerable time ago. Hence the patch below makes inclusion
of the SRPT driver the default.

This patch has been tested by verifying that the generated patch still applies
cleanly to the 2.6.25.17 kernel, and that the patched kernel still compiles cleanly.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-06 17:15:08 +00:00
Vladislav Bolkhovitin
35754e7f26 Minor fixes and changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-10-02 10:46:47 +00:00
Vladislav Bolkhovitin
ef10d158a5 Minor changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-09-25 09:21:44 +00:00
Vladislav Bolkhovitin
aab4e1d1ff Polishing for in-tree
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-08-01 17:59:05 +00:00
Vladislav Bolkhovitin
1504425c40 All empty lines due
to code commented out because inside #if LINUX_VERSION_CODE ... /
#endif is now really removed.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@481 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-28 18:19:34 +00:00
Vladislav Bolkhovitin
9004478071 Minor the kernel patch preparations fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@476 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-24 10:38:51 +00:00
Vladislav Bolkhovitin
1c9a2b3f4b The patch below implements the following changes:
- The script specialize-patch now acts as if #define INSIDE_KERNEL_TREE 1
  is effective.
- The script generate-kernel-patch now renames sBUG_ON() into BUG_ON()
  and sBUG() into BUG(). The same script removes the definitions of the
  sBUG_ON(), sBUG() and WARN_ON_ONCE() macro's from the header file
  scst_debug.h. The last macro is only removed for kernel versions later than
  2.6.19.

This patch has been tested as follows:
- Compared the output of the command "scripts/generate-kernel-patch 2.6.25"
  before and after the changes.
- Verified the newly generated patch with checkpatch. Checkpatch statistics
  are now as follows:
    521 WARNING: line over 80 characters
     12 WARNING: consider using strict_strtoul in preference to simple_strtoul
     10 WARNING: printk() should include KERN_ facility level
      3 WARNING: CVS style keyword markers, these will _not_ be updated
      2 WARNING: do not add new typedefs
      1 WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
- Verified that the generated kernel patch still applies cleanly to the
  2.6.25.10 kernel and that this kernel still compiles, installs and boots fine.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@445 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-09 17:28:36 +00:00
Vladislav Bolkhovitin
14bd19ede1 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The script scripts/specialize-patch'>scripts/specialize-patch is an awk script. Currently it specifies /usr/bin/awk as its interpreter although it doesn't use the standard AWK syntax but the extended GNU AWK syntax. The patch below changes the interpreter name such that the script also works on systems where /usr/bin/awk is not GNU AWK (e.g. Ubuntu 8.04). Note: GNU AWK is not installed by default on all Linux systems. E.g. on Debian systems it's in the gawk package.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-13 11:08:23 +00:00
Vladislav Bolkhovitin
83af00fd15 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The current version of generate-kernel-patch does not remove preprocessor
statements that should have been removed because intended for another kernel
version (surrounded by #if LINUX_VERSION_CODE ... KERNEL_VERSION(...) / #endif).
The patch below fixes this.

I have verified the patch below by comparing the patch generated by the
old and the new versions of the generate-kernel-patch script:
$ diff p1 p2
7190d7189
< +#if defined(EXTRACHECKS)
7196c7195,7196
< +#endif
---
> > +
> > +
13056d13055
< +#ifdef STRICT_SERIALIZING
13058d13056
< +#elif !defined(SCSI_EXEC_REQ_FIFO_DEFINED)
13060d13057
< +#else
13062c13059,13062
< +#endif
---
> > +
> > +
> > +
> > +

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-23 15:19:52 +00:00
Vladislav Bolkhovitin
05b869c78f Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch adds command-line options -m and -q to the script
generate-kernel-patch. These command line options make it possible to
choose at the time the script is invoked whether or not to include the
qla2x00t and/or mpt code in the generated kernel patch.

Please review.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

Index: scripts/generate-kernel-patch



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@390 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-23 09:56:13 +00:00
Vladislav Bolkhovitin
22a46ff163 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below implements the following changes:
- Make sure the output of the make command does not appear in the generated
  kernel patch.
- Changed interpreter of scripts/specialize-patch from /usr/bin/gawk to
  /usr/bin/awk in order to make sure this awk script also runs on systems
  where awk is installed but not gawk.
- Added an extra evaluation rule such that expressions like (0) are rewritten
  as 0.
- Fixed a spelling error.
- Expressions that can only be partially evaluated are now partially evaluated.
  E.g. #if defined(EXTRACHECKS) && (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18))
  becomes #if defined(EXTRACHECKS) && 0 in the output.
- Code between #if 0 / #endif or #if 1 / #endif is included in the generated
  kernel patch, including the surrounding preprocessor directives.
- Preprocessor statements with spaces behind # are now recognized (e.g. "#   if").
- Expression evaluator now supports ! (logical not) and () (braces).
- #elif is now evaluated correctly.
- Nested #if / #elif / #else / #endif are now interpreted correctly.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-22 15:55:23 +00:00
Vladislav Bolkhovitin
e1cd55070d Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below contains a script that removes C preprocessor tests on the
LINUX_VERSION_CODE macro, depending on the kernel version that was passed as
an argument to that script. Furthermore, the generate-kernel-patch script has
been modified such that its output is filtered by the specialize-patch script.
This eliminates another class of checkpatch errors.

Note: due to the way the specialize-patch script is implemented, #if 0 and
#if 1 statements are also processed.

The patch below has been verified as follows:
- Checked that checkpatch does no longer complain about LINUX_VERSION_CODE
  on the generated patch.
- Checked that the generated kernel patch applies cleanly to the 2.6.25.4
  kernel.
- Checked that the patched kernel compiles and installs cleanly, and that
  after reboot it was possible to load the iscsi-scst and ib_srpt kernel modules.

I will wait with sending more patches until this and the previous two patches
have been reviewed and/or applied.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@384 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-21 15:48:02 +00:00
Vladislav Bolkhovitin
56e642cf77 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below implements the following changes:
- Fixes the remaining warnings reported by checkpatch.pl with regard to the use
  of whitespace in C code.
- Adds double qoutes around some #warning messages, such that checkpatch.pl
  does no longer try to interprete the text behind the #warning preprocessor
  directive.
- Adds an extra conversion to the generate-kernel-patch script that removes
  the single space from before goto-labels while generating the kernel patch.

This patch has been tested as follows:
- Verified that svn diff -x -w only shows changes in the #warning preprocessor directives.
- Verified the output of svn diff by reading it.
- Verified that checkpatch.pl does no longer complain on the use of whitespace
  (searched through the checkpatch.pl output for the text ' space').
- Verified that the patch generated by the generate-kernel-patch script still
  applies cleanly to the 2.6.24 kernel, and that the patched kernel still compiles cleanly.

Please let me know if I have to resubmit parts of this patch to other SCST authors.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@381 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-21 11:56:09 +00:00
Vladislav Bolkhovitin
8eb92a6582 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
I don't know when this was broken, but with the current SVN version, after 
having generated and applied a kernel patch for SCST, iscsi-scst doesn't 
build anymore. The patch below fixes this and also includes a cleanup patch 
for the generate-kernel-patch'>generate-kernel-patch script. The generated kernel patch has been 
tested with the 2.6.24 and 2.6.25.4 kernels (extracted kernel sources + 
applied patch + built kernel + installed kernel + reboot + load SCST 
modules).

Signed-off-by: <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@375 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-16 10:29:34 +00:00
Vladislav Bolkhovitin
00bca6ce75 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
By this time I have reworked the update of scripts/generate-kernel-patch'>scripts/generate-kernel-patch. 
These are the changes that were already present in version 1 of this patch 
and that have been kept in this patch:
- The SCST code has been moved from drivers/scsi/scsi_tgt to drivers/scst.
- Moved SCST header files from include/scsi_tgt to include/scst.
- Added iscsi-scst in drivers/scst/iscsi-scst.

For the time being the generate-kernel-patch does no longer try to add the 
qla2x00t driver in drivers/scst/qla2x00-target -- I have not yet been able to 
figure out how to get qla2x00t/qla2x00-target compiled without the initiator 
code.

Just as in version 1 of this patch, the following files in the Subversion 
repository have been renamed to reflect the above changes:
- Renamed scst/kernel/in-tree/Makefile.scsi.Linux-2.6.24.patch'>scst/kernel/in-tree/Makefile.scsi.Linux-2.6.24.patch to
scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch'>scst/kernel/in-tree/Makefile.drivers.Linux-2.6.24.patch.
- Renamed Kconfig'>scst/kernel/in-tree/Kconfig.scsi.Linux-2.6.24.patch to
scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch'>scst/kernel/in-tree/Kconfig.drivers.Linux-2.6.24.patch.
- Renamed scst/kernel/in-tree/Makefile.scsi_tgt'>scst/kernel/in-tree/Makefile.scsi_tgt to
scst/kernel/in-tree/Makefile.scst'>scst/kernel/in-tree/Makefile.scst.
- Renamed scst/kernel/in-tree/Kconfig.scsi_tgt'>scst/kernel/in-tree/Kconfig.scsi_tgt to
scst/kernel/in-tree/Kconfig.scst'>scst/kernel/in-tree/Kconfig.scst.

Because of the above changes the include path specified in the following
Makefiles had to be changed:
- scst/kernel/in-tree/Makefile.dev_handlers'>scst/kernel/in-tree/Makefile.dev_handlers
- srpt/src/Makefile.in_kernel'>srpt/src/Makefile.in_kernel

Other changes:
- I have added menu/endmenu entries in file scst/kernel/in-tree/Kconfig.scst
such that the SCST entries become visible when running make xconfig or make
menuconfig.
- Elaborated the SCST help texts a little bit (in file
scst/kernel/in-tree/Kconfig.scst).

New in version 2 of this patch:
- Moved remaining patches in the generate-kernel-patch script to separate 
files.
- Added support for the 2.6.25 kernel.

This patch has been tested as follows:

mkdir -p tmp
cd tmp
rm -rf linux-2.6.25.3 /lib/modules/2.6.25.3-scst
tar xjf ~vanasscb/software/downloads/linux-2.6.25.3.tar.bz2
cd linux-2.6.25.3
cp ../.config-2.6.25 .
(cd ~vanasscb/software/scst
&& ~vanasscb/software/scst/scripts/generate-kernel-patch \
2.6.25) | patch -p1
make oldconfig
diff ../.config .
make xconfig
make menuconfig
make -j5 bzImage modules
make modules_install install
cp -r /lib/firmware/$(uname -r) /lib/firmware/2.6.25.3-scst
update-initramfs -k 2.6.25.3-scst -c
reboot
modprobe iscsi-scst
modprobe ib_srpt
lsmod | grep -E 'scst|ib_srpt'
dmesg

Signed-off-by: bart.vanassche@gmail.com 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@373 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-15 15:00:21 +00:00
Vladislav Bolkhovitin
87e8cf6123 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The script generate-kernel-patch generates a kernel tree based on the sources 
and the in-tree kernel patches in the SCST Subversion repository. When I 
submitted the first version of the generate-kernel-patch script most but not 
all in-tree patches were present as separate files in the SCST Subversion 
repository. The patch below moves the two remaining patches that are contained 
inline in the generate-kernel-patch script to separate files. This should 
make it possible to use the script on future Linux kernels without having to 
modify the script itself. The patch below does not contain functional 
changes, it only moves two patches out of the script.

Modified:
* scripts/generate-kernel-patch'>scripts/generate-kernel-patch
Added:
* srpt/src/Makefile.infiniband.Linux-2.6.24.patch'>srpt/src/Makefile.infiniband.Linux-2.6.24.patch
* srpt/src/Kconfig.infiniband.Linux-2.6.24.patch'>srpt/src/Kconfig.infiniband.Linux-2.6.24.patch

Also Makefile and Kconfig files were renamed (".drivers." was replaced by ".scsi.")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@369 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-14 10:01:30 +00:00
Vladislav Bolkhovitin
8e5bb8a22f Series of patches from Bart Van Assche <bart.vanassche@gmail.com>:
- Added Makefile.scsi.Linux-2.6.24.patch and Kconfig.scsi.Linux-2.6.24.patch
 - Updated Makefile.scsi_tgt to reflect move of the SCST device handlers from scst/src/ to scst/src/dev_handlers/
 - Added Makefile.dev_handlers
 - SCST include path fixed in srpt/ Makefile.in_kernel
 - Added script for converting the SCST source tree to a kernel patch. More comment on it:

The SCST source tree as it exists in the current Subversion repository will 
have to be maintained for some time. And if SCST is submitted for inclusion 
in the mainline kernel, this tree will have to be converted to a kernel 
patch, reviewer comments will have to be processed, and the patch will have 
to be resubmitted. So it's convenient to have a script available that 
converts the Subversion source tree into a kernel patch. The patch below does 
just that: convert the scst and srpt directories into a kernel patch 
(iscsi-scst support will be added later on). I have tested the script 
contained in the patch below as follows:

rm -rf linux-2.6.24
rm -rf /lib/modules/2.6.24-scst
tar xjf ~vanasscb/software/downloads/linux-2.6.24.tar.bz2
cd linux-2.6.24
cp ../.config .
(cd ~vanasscb/software/scst 
&& ~vanasscb/software/scst/scripts/generate-kernel-patch \
2.6.24) | patch -p1
make -j5 bzImage modules && make modules_install install
cp -r /lib/firmware/$(uname -r) /lib/firmware/2.6.24-scst
update-initramfs -k 2.6.24-scst -c
reboot



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@366 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-13 09:27:16 +00:00