Files
scst/scripts/generate-patched-kernel
Yan Burman 66b51069b3 Merged revisions 5740,5744-5745,5751-5755,5758,5760,5762,5764 via svnmerge from
svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/trunk

........
  r5740 | vlnb | 2014-08-28 04:26:11 +0300 (Thu, 28 Aug 2014) | 11 lines
  
  scst_lib: Fix READ POSITION parsing
  
  For code 08h (EXTENDED FORM) minimal response length is 32, see table
  "READ POSITION data format, extended form". In SSC-[2,3] table "READ
  POSITION service action codes" requests minimum response lenght 28
  bytes, but it is an apparent typo, because the actual data format is 32
  bytes long. In SSC-4 it is fixed.
  
  Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
  r5744 | bvassche | 2014-09-02 09:33:32 +0300 (Tue, 02 Sep 2014) | 4 lines
  
  scripts/rebuild-rhel-kernel-rpm: Fix for invocation from current directory
  
  Reported-by: Hiroyuki Sato <hiroysato@gmail.com>
........
  r5745 | bvassche | 2014-09-02 09:35:06 +0300 (Tue, 02 Sep 2014) | 1 line
  
  scripts/generate-patched-kernel: Fix for invocation from current directory
........
  r5751 | bvassche | 2014-09-03 13:23:51 +0300 (Wed, 03 Sep 2014) | 4 lines
  
  scst: Build fix for hex_to_bin() for RHEL 6.1 and later
  
  Reported-by: Yan Burman <yanb@mellanox.com>
........
  r5752 | bvassche | 2014-09-03 13:47:16 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst.h: Make vzalloc() available on RHEL 6.0
........
  r5753 | bvassche | 2014-09-03 13:50:52 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst: Refine r5751, the hex_to_bin() build fix for RHEL >= 6.1
........
  r5754 | bvassche | 2014-09-03 13:58:03 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst_vdisk: RHEL 6.0 build fix
........
  r5755 | bvassche | 2014-09-03 14:00:55 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst_vdisk: Follow-up for r5754
........
  r5758 | bvassche | 2014-09-03 16:43:23 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst.h: RHEL 5.10 build fix
........
  r5760 | bvassche | 2014-09-03 16:52:16 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst.h: RHEL 5.10 build fix
........
  r5762 | bvassche | 2014-09-03 17:00:14 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst.h: Fix definition of __aligned()
........
  r5764 | bvassche | 2014-09-03 17:24:52 +0300 (Wed, 03 Sep 2014) | 1 line
  
  scst_vdisk: Use parentheses around && inside ||
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5767 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-04 06:36:01 +00:00

61 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
############################################################################
#
# Script for generating a kernel source tree with the SCST patches applied.
#
# Copyright (C) 2010 Bart Van Assche <bvanassche@acm.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
############################################################################
function usage {
echo "Usage: $0 <kernel version>"
}
script_dir="$(dirname $0)"
if [ "${script_dir#/}" = "${script_dir}" ]; then
script_dir="$PWD/$script_dir"
fi
scriptdir="${scriptdir%/.}"
scst_dir="$(dirname "${script_dir}")"
source "${script_dir}/kernel-functions"
if [ "$1" = "" ]; then
echo "Error: missing kernel version argument."
exit 1
fi
target="linux-$1"
kernel_version="$(kernel_version "$1")"
patchlevel="$(patchlevel "$1")"
download_kernel "$1" || exit $?
extract_kernel_tree "$1" || exit $?
cd "${target}" || exit $?
list-source-files "${scst_dir}" |
grep -- "-${kernel_version}.*.patch$" |
grep -v /in-tree/ |
while read p; do
if [ "${p/readahead-2.6.32.below11.patch//}" = "$p" \
-o "${patchlevel:-0}" -lt 11 ]; then
echo "==== $p"
patch -p1 <"${scst_dir}/$p"
fi
done