summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--0001-Remove-support-for-kernels-before-3.x.patch81
-rw-r--r--0002-Remove-__DATE__-and-__TIME__-macros.patch25
-rw-r--r--PKGBUILD55
-rw-r--r--rr276x.install25
5 files changed, 207 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3616c66b1967
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = rr276x
+ pkgdesc = Kernel module for HighPoint RocketRAID 276x (2760/2760A) SAS/SATA HBA/RAID cards
+ pkgver = 1.1.3
+ pkgrel = 1
+ url = http://www.highpoint-tech.com/USA_new/series_rr276x-rr274x_configuration.htm
+ install = rr276x.install
+ arch = x86_64
+ arch = i686
+ license = custom
+ makedepends = linux-headers
+ depends = linux
+ conflicts = $pkgname-dkms
+ source = http://www.highpoint-tech.com/BIOS_Driver/RR276x/linux/RR276x_Linux_Src_v1.1.3_14_02_12.tar.gz
+ source = 0001-Remove-support-for-kernels-before-3.x.patch
+ source = 0002-Remove-__DATE__-and-__TIME__-macros.patch
+ sha256sums = fefde4b1e0ee0b49f9871585269067e269b6cefe07d248766a5bb8b59521f611
+ sha256sums = 9e892fc9b022aed5d252f47cef49df914292b6a6b3fbb2c2ced58923edc04cff
+ sha256sums = cd97a05219f3e4d9edd2e1d0d6c07371b52676ebc0821584b9fcc6b4b953f00a
+
+pkgname = rr276x
+
diff --git a/0001-Remove-support-for-kernels-before-3.x.patch b/0001-Remove-support-for-kernels-before-3.x.patch
new file mode 100644
index 000000000000..60ef8c272a64
--- /dev/null
+++ b/0001-Remove-support-for-kernels-before-3.x.patch
@@ -0,0 +1,81 @@
+From d6c3e82f5723079436ac497004373b41002b9777 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?D=C4=81vis?= <davispuh@gmail.com>
+Date: Wed, 1 Jul 2015 01:44:10 +0300
+Subject: [PATCH 1/2] Remove support for kernels before 3.x
+
+---
+ inc/linux_64mpa/Makefile.def | 26 ++------------------------
+ osm/linux/install.sh | 12 ++----------
+ 2 files changed, 4 insertions(+), 34 deletions(-)
+
+diff --git a/inc/linux_64mpa/Makefile.def b/inc/linux_64mpa/Makefile.def
+index b91c5ea..e1f4723 100755
+--- a/inc/linux_64mpa/Makefile.def
++++ b/inc/linux_64mpa/Makefile.def
+@@ -93,15 +93,9 @@ ifeq ($(KERNEL_VER),)
+ $(error Cannot find kernel version. Check $(KERNELDIR)/include/linux/version.h.)
+ endif
+
+-ifneq ($(MAJOR), 3)
+-ifneq ($(KERNEL_VER), 2.6)
+-ifneq ($(KERNEL_VER), 2.4)
+-$(error Only kernel 2.4/2.6/3.x is supported but you use $(KERNEL_VER))
++ifeq ($(MAJOR), 2)
++$(error Only kernels 3.x and above is supported but you use $(KERNEL_VER))
+ endif
+-endif
+-endif
+-
+-ifneq ($(KERNEL_VER), 2.4)
+
+ TARGET := $(TARGETNAME).ko
+
+@@ -134,22 +128,6 @@ $(CURDIR)/.build/Makefile:
+ @echo '$$(addprefix $$(obj)/,$$(TARGETMODS)): $$(obj)/%.o: $$(HPT_LIB)/%.o' >>$@
+ @echo ' @cp -f $$< $$@' >>$@
+
+-else # for kernel 2.4 modules
+-
+-HPT_LIB := $(HPT_LIB)-regparm0
+-_TARGETMODS := $(addprefix $(HPT_LIB)/,$(TARGETMODS))
+-
+-VPATH := .. $(HPT_ROOT)/osm/linux
+-TARGET := $(TARGETNAME).o
+-
+-C_INCLUDES += -I$(HPT_ROOT)/osm/linux -I$(KERNELDIR)/include -I$(KERNELDIR)/drivers/scsi
+-
+-$(TARGET): $(TARGETOBJS) $(_TARGETMODS)
+- @echo $(if $V,,[LD] $@)
+- $(if $V,,@)$(CROSS_COMPILE)$(LD) -r -o $@ $^
+-
+-endif # KERNEL_VER
+-
+ endif # KMOD
+
+ wrong_target:
+diff --git a/osm/linux/install.sh b/osm/linux/install.sh
+index 4dff2e9..cab1a01 100644
+--- a/osm/linux/install.sh
++++ b/osm/linux/install.sh
+@@ -5,16 +5,8 @@ if test "${TARGETNAME-set}" = set; then echo "TARGETNAME is not set"; exit 1; fi
+
+ PWD=`pwd`
+
+-case ${KERNEL_VER} in
+- 2.4 )
+- OBJ=o
+- MODVER=`modinfo -f%{kernel_version} ${PWD}/${TARGETNAME}.${OBJ}`
+- ;;
+- 2.6 | 3.* )
+- OBJ=ko
+- MODVER=`modinfo -F vermagic ${PWD}/${TARGETNAME}.${OBJ} | cut -d' ' -f1`
+- ;;
+-esac
++OBJ=ko
++MODVER=`modinfo -F vermagic ${PWD}/${TARGETNAME}.${OBJ} | cut -d' ' -f1`
+
+ if test "${MODVER}" = "" ; then
+ echo "Can not get kernel version from ${TARGETNAME}.${OBJ}."
+--
+2.4.5
+
diff --git a/0002-Remove-__DATE__-and-__TIME__-macros.patch b/0002-Remove-__DATE__-and-__TIME__-macros.patch
new file mode 100644
index 000000000000..63ddc3c2edcf
--- /dev/null
+++ b/0002-Remove-__DATE__-and-__TIME__-macros.patch
@@ -0,0 +1,25 @@
+From 54018d7240260d138a483742649af0c2ad8e7520 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?D=C4=81vis?= <davispuh@gmail.com>
+Date: Wed, 1 Jul 2015 01:50:51 +0300
+Subject: [PATCH 2/2] Remove __DATE__ and __TIME__ macros
+
+---
+ product/rr276x/linux/config.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/product/rr276x/linux/config.c b/product/rr276x/linux/config.c
+index 06e203f..5d48caf 100644
+--- a/product/rr276x/linux/config.c
++++ b/product/rr276x/linux/config.c
+@@ -23,7 +23,7 @@ int init_config(void)
+
+ char driver_name[] = "rr276x";
+ char driver_name_long[] = "RocketRAID 276x controller driver";
+-char driver_ver[] = "v1.1.3 (" __DATE__ " " __TIME__ ")";
++char driver_ver[] = "v1.1.3 (2014-02-12)";
+ int osm_max_targets = 32;
+ int os_max_cache_size = 0x2000000;
+
+--
+2.4.5
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b8e0f7e1135d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Dāvis Mosāns <davispuh at gmail dot com>
+pkgname=rr276x
+_realbase=RR276x
+_realname=${_realbase}_Linux_Src
+pkgver=1.1.3
+_pkgsubver=14_02_12
+pkgrel=1
+pkgdesc="Kernel module for HighPoint RocketRAID 276x (2760/2760A) SAS/SATA HBA/RAID cards"
+url="http://www.highpoint-tech.com/USA_new/series_rr276x-rr274x_configuration.htm"
+arch=('x86_64' 'i686')
+license=('custom')
+depends=('linux')
+optdepends=()
+makedepends=('linux-headers')
+conflicts=('$pkgname-dkms')
+replaces=()
+backup=()
+install=$pkgname.install
+_osname=linux
+_srcname=$pkgname-$_osname-src-v${pkgver}
+source=("http://www.highpoint-tech.com/BIOS_Driver/$_realbase/$_osname/${_realname}_v${pkgver}_$_pkgsubver.tar.gz"
+ "0001-Remove-support-for-kernels-before-3.x.patch"
+ "0002-Remove-__DATE__-and-__TIME__-macros.patch")
+sha256sums=('fefde4b1e0ee0b49f9871585269067e269b6cefe07d248766a5bb8b59521f611'
+ '9e892fc9b022aed5d252f47cef49df914292b6a6b3fbb2c2ced58923edc04cff'
+ 'cd97a05219f3e4d9edd2e1d0d6c07371b52676ebc0821584b9fcc6b4b953f00a')
+
+prepare() {
+ cd "$srcdir/$_srcname"
+ patch -Np1 < "$srcdir/0001-Remove-support-for-kernels-before-3.x.patch"
+ patch -Np1 < "$srcdir/0002-Remove-__DATE__-and-__TIME__-macros.patch"
+}
+
+build() {
+ cd "$srcdir/$_srcname/product/$pkgname/$_osname"
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/$_srcname/product/$pkgname/$_osname"
+
+ # Install for all kernels
+ for _extramod in $(find /usr/lib/modules/extramodules-*/version -printf '%h\n'); do
+ # Install
+ install -Dm644 "$pkgname.ko" "$pkgdir$_extramod/drivers/scsi/$pkgname.ko" || return 1
+
+ # Compress
+ gzip "$pkgdir$_extramod/drivers/scsi/$pkgname.ko"
+ done
+
+ # Blacklist mvsas
+ install -d "$pkgdir/usr/lib/modprobe.d/"
+ echo "blacklist mvsas" >> "$pkgdir/usr/lib/modprobe.d/$pkgname.conf"
+}
+
diff --git a/rr276x.install b/rr276x.install
new file mode 100644
index 000000000000..e4bde42ea91b
--- /dev/null
+++ b/rr276x.install
@@ -0,0 +1,25 @@
+KERNEL_VERSION="$(uname -r)"
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ depmod $KERNEL_VERSION > /dev/null
+ mkinitcpio -p linux
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install
+}
+
+# arg 1: the old package version
+post_remove() {
+ depmod $KERNEL_VERSION > /dev/null
+ mkinitcpio -p linux
+}
+