From 308e7c0d061f0793a220b67160c042cfb5c17821 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 20 Dec 2015 17:41:03 +0000 Subject: patched ebuild for rts5249 patch from http://linuxterminal.org/issue-with-rts5229-pci-express-card-reader/ --- sys-block/rts5229/ChangeLog | 69 ++++++++++++++++++++++++ sys-block/rts5229/ChangeLog-2015 | 45 ++++++++++++++++ sys-block/rts5229/Manifest | 9 ++++ sys-block/rts5229/files/rts5229-linux-3.10.patch | 53 ++++++++++++++++++ sys-block/rts5229/files/rts5229-linux-3.8.patch | 29 ++++++++++ sys-block/rts5229/files/rts5229-vmalloc.patch | 33 ++++++++++++ sys-block/rts5229/files/rts5249.patch | 12 +++++ sys-block/rts5229/metadata.xml | 12 +++++ sys-block/rts5229/rts5229-1.07-r6.ebuild | 45 ++++++++++++++++ 9 files changed, 307 insertions(+) create mode 100644 sys-block/rts5229/ChangeLog create mode 100644 sys-block/rts5229/ChangeLog-2015 create mode 100644 sys-block/rts5229/Manifest create mode 100644 sys-block/rts5229/files/rts5229-linux-3.10.patch create mode 100644 sys-block/rts5229/files/rts5229-linux-3.8.patch create mode 100644 sys-block/rts5229/files/rts5229-vmalloc.patch create mode 100644 sys-block/rts5229/files/rts5249.patch create mode 100644 sys-block/rts5229/metadata.xml create mode 100644 sys-block/rts5229/rts5229-1.07-r6.ebuild diff --git a/sys-block/rts5229/ChangeLog b/sys-block/rts5229/ChangeLog new file mode 100644 index 0000000..6ac7fad --- /dev/null +++ b/sys-block/rts5229/ChangeLog @@ -0,0 +1,69 @@ +# ChangeLog for sys-block/rts5229 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# (auto-generated from git log) + +*rts5229-1.07-r5 (09 Aug 2015) + + 09 Aug 2015; Robin H. Johnson + +files/rts5229-linux-3.10.patch, +files/rts5229-linux-3.8.patch, + +metadata.xml, +rts5229-1.07-r5.ebuild: + proj/gentoo: Initial commit + + This commit represents a new era for Gentoo: + Storing the gentoo-x86 tree in Git, as converted from CVS. + + This commit is the start of the NEW history. + Any historical data is intended to be grafted onto this point. + + Creation process: + 1. Take final CVS checkout snapshot + 2. Remove ALL ChangeLog* files + 3. Transform all Manifests to thin + 4. Remove empty Manifests + 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ + 5.1. Do not touch files with -kb/-ko keyword flags. + + Signed-off-by: Robin H. Johnson + X-Thanks: Alec Warner - did the GSoC 2006 migration + tests + X-Thanks: Robin H. Johnson - infra guy, herding this + project + X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo + developer, wrote Git features for the migration + X-Thanks: Brian Harring - wrote much python to improve + cvs2svn + X-Thanks: Rich Freeman - validation scripts + X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 + work in migration + X-Thanks: Michał Górny - scripts, QA, nagging + X-Thanks: All of other Gentoo developers - many ideas and lots of paint on + the bikeshed + + 24 Aug 2015; Justin Lecher metadata.xml, + rts5229-1.07-r5.ebuild: + Use https by default + + Convert all URLs for sites supporting encrypted connections from http to + https + + Signed-off-by: Justin Lecher + + 24 Aug 2015; Mike Gilbert metadata.xml: + Revert DOCTYPE SYSTEM https changes in metadata.xml + + repoman does not yet accept the https version. + This partially reverts eaaface92ee81f30a6ac66fe7acbcc42c00dc450. + + Bug: https://bugs.gentoo.org/552720 + +*rts5229-1.07-r6 (17 Sep 2015) + + 17 Sep 2015; Vikraman Choudhury + +files/rts5229-vmalloc.patch, -rts5229-1.07-r5.ebuild, + +rts5229-1.07-r6.ebuild: + Fix build with kernel 4.2.0 + + Gentoo-Bug: 559424 + + Package-Manager: portage-2.2.20.1 + diff --git a/sys-block/rts5229/ChangeLog-2015 b/sys-block/rts5229/ChangeLog-2015 new file mode 100644 index 0000000..1546d78 --- /dev/null +++ b/sys-block/rts5229/ChangeLog-2015 @@ -0,0 +1,45 @@ +# ChangeLog for sys-block/rts5229 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-block/rts5229/ChangeLog,v 1.7 2015/05/31 07:06:18 vikraman Exp $ + +*rts5229-1.07-r5 (31 May 2015) + + 31 May 2015; Vikraman Choudhury (vikraman) + +rts5229-1.07-r5.ebuild, -rts5229-1.07-r4.ebuild: + Fix build with linux 4.0. Fixes bug 549492. + +*rts5229-1.07-r4 (14 Aug 2014) + + 14 Aug 2014; Vikraman Choudhury (vikraman) + +rts5229-1.07-r4.ebuild, -rts5229-1.07-r3.ebuild: + Install module to /lib/modules/${KV}/misc, wrt bug 516992. Thanks to + consus@gmx.com for pointing it out. + + 10 Jul 2014; Vikraman Choudhury (vikraman) + -rts5229-1.07-r1.ebuild, -rts5229-1.07-r2.ebuild, -rts5229-1.07.ebuild: + Cleanup old versions + +*rts5229-1.07-r3 (10 Jul 2014) + + 10 Jul 2014; Vikraman Choudhury (vikraman) + +rts5229-1.07-r3.ebuild, rts5229-1.07-r1.ebuild, rts5229-1.07-r2.ebuild, + rts5229-1.07.ebuild: + Remove use of __DATE__ and __TIME__ for gcc 4.9 wrt bug 514788 + +*rts5229-1.07-r2 (03 Jul 2013) + + 03 Jul 2013; Vikraman rts5229-1.07-r1.ebuild, + +rts5229-1.07-r2.ebuild, +files/rts5229-linux-3.10.patch: + Patch to fix build on linux 3.10 + +*rts5229-1.07-r1 (28 May 2013) + + 28 May 2013; Vikraman +rts5229-1.07-r1.ebuild, + +files/rts5229-linux-3.8.patch: + Patch to fix build on linux 3.8 + +*rts5229-1.07 (28 Feb 2013) + + 28 Feb 2013; Vikraman +rts5229-1.07.ebuild, + +metadata.xml: + New ebuild for sys-block/rts5229, PCIE RTS5229 card reader driver for Linux diff --git a/sys-block/rts5229/Manifest b/sys-block/rts5229/Manifest new file mode 100644 index 0000000..e7e2b04 --- /dev/null +++ b/sys-block/rts5229/Manifest @@ -0,0 +1,9 @@ +AUX rts5229-linux-3.10.patch 1261 SHA256 2abe91999b596c3458c608a00201ad8a47bf291ba8bae9a275aea21b79d4f924 SHA512 e46d0ff4f8eb9e59059bce493cb0e2b818b0c2db6ef9baa390ca32ccf7de60a1d46d1b2a23ed933a1ac687bd4df94714c13e898db5aea94860e202bd52926524 WHIRLPOOL 672341e5d5c111f94992135c2c51228e975fa09fed0b336fefcc1033d5a864a4ed78837823934b5027a81f9e7c06188965f1956c62c780e6b455453dcb41554e +AUX rts5229-linux-3.8.patch 820 SHA256 93809494da3e3582d4bea45c8e34c06f27473f30955d4a522473fe0ce43149d9 SHA512 76152d71656f6312b0fbe17386c5cdc6973ee230b96b9b76e09de33d85114aa25017f461ab87f1e0b9cbd6fd3143ecd444ebbe153807fffab20fca0724f9d974 WHIRLPOOL 30dd171ba2d257eaae7c8206eb65d8cf5e77a1beca84ce4f8fd1d40c5afffdaa50ee33e00187ef099bd0ac0f66b628a4d9507f0e23f3f97ef95a427ef8c07faf +AUX rts5229-vmalloc.patch 1043 SHA256 3841c56fabf7746c71b766fb7c5bb652901d1367efd377d73d7ea75e63ce964c SHA512 8784ece688f52fabe430e19c0b6fdde3eb81531e8b9af95fc2325a965cd36766a34a10bfcea61b8ea38169d143ee8a5185c4fc0814b2e8cac46b8f2b434b3879 WHIRLPOOL 4b6aa01ca798d079d0ce8711db35137f3854649956d09c304a8eb91a91345223d931bf3ecb46b86e040040681c3aa5081141c73eaea0f46712d6b2444ca1b3c6 +AUX rts5249.patch 465 SHA256 1ae4c2238662ea5cdb1f3637a338f7e7fb05db18b6612fd68434a6267b38d6bc SHA512 6196bfd067a922cfa7138ac6e14b67c5ce467dddce1af34e96ba12300e036e2b7c37d5a29cf8ee6a2f1bf5c6f31f352c89efaa1e8d7f663c892b68713d5ca3c3 WHIRLPOOL 016bb1de971663ce300a2687f5ee7647ba98b819fdd9d7d4660487b8da6252bab9581fcf266756c11a0263990aeec833ba521db2b621499101849ddf38b28968 +DIST rts5229-1.07.tar.bz2 67175 SHA256 f6a3338cc41dc273567c0d074d331f401f45716769f987b4269951467331ea46 SHA512 8df0396d5a08a22507e3a0a56321de6b17d1ca90b5cbdaa9712f56f5f4db026d1b49b9dacf244407889d354cb8eeac4e771388a0fc6eb00295b81456459a4503 WHIRLPOOL 889c2a5de8ee6b5651734bb3fae70482065bde7be00b326dddf5cc55a2ff0437659bf068414990d075c1f99d59ba22ee2cf77f26dd73e6125d1f28eb9ca58922 +EBUILD rts5229-1.07-r6.ebuild 1183 SHA256 09ea47ae8554892b0e02cdf7ba291fdad49371829289cb79005359aad491b50a SHA512 e831cb07ef5efce46737fffc4f25dc70ccf45034a266c957ed43f394a4caa10378272b1b9de4b0b45d56cdd47d95c01c080ae33efb505979843d377e2dca7224 WHIRLPOOL 14e4fb07d8b6f0c6d27fc941c25f7f81e02fa08b3ed2d23460bf0006bae0a96695d52dc9b979c5069f513f89d2e6a1f98bc1480fda3e0279cffb146c4b837927 +MISC ChangeLog 2410 SHA256 9333f8e1490644df23e1f977e91b254971e27dd7bf2cd679ab392ca66ae0baa9 SHA512 a7b9b6f1526c4ec9aa9bf81748dc1610bec33862182563151aae84c87437a486dcd45d35af5218f75163fdb3076d5e54c5b201119816f9139758cf560e5535d7 WHIRLPOOL 336301b549d2a93b5cc851e7321c3225805568454071af7fb49965ef605d6e67e6d3ae46527d818a202bdc2a2c8b49805dbe0637dcf315d35c7ae69e1b10ed82 +MISC ChangeLog-2015 1658 SHA256 854562b5c371ae5ed173d8f4946cf33b40db7a4f4b0adeef1b8b3bd8d96083dd SHA512 078da22b112e71a81645feeea3c525ffee1086f4607628934db3c5bd00103b2db0bec74eddcdce9514eee9cd59a0a21b12da04d10d0520b181ec5b439a7191b3 WHIRLPOOL 23bc0fcd28fc54f0a7766790225a904af2ce858c56bb5ea307c97d2677f07a0f2d510c7ffbcc4c77a0927dda86eb22f73f947a374acc6edcfa3cd8de9aebcbc3 +MISC metadata.xml 334 SHA256 8fcf0fab2015dd9b9d6713dfef26fb62edca4ab86e2a9a6d03d86ecb2cc3f2c4 SHA512 04c3d2ee5dd828a236a8019a5e5e59268fb8ee191beefb248b8f0c8baf54f23fc85a0e5786415792e6e413c9e2b1156b2a2391722a3f7b772a0f218784c2bc37 WHIRLPOOL e40aea98cbbebefd0008b69181bfea5f9a396636c5969084d798a67e1313abfa2ff098f90d71ba1d6c94cad6a45375ffdd420559940b26bc1ff47b0ddccaf7c2 diff --git a/sys-block/rts5229/files/rts5229-linux-3.10.patch b/sys-block/rts5229/files/rts5229-linux-3.10.patch new file mode 100644 index 0000000..5044234 --- /dev/null +++ b/sys-block/rts5229/files/rts5229-linux-3.10.patch @@ -0,0 +1,53 @@ +--- rts5229.a/rtsx.c 2013-07-03 05:24:40.728296993 +0530 ++++ rts5229.b/rtsx.c 2013-07-03 05:20:56.452568592 +0530 +@@ -126,38 +126,18 @@ + + + #undef SPRINTF +-#define SPRINTF(args...) \ +- do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0) ++#define SPRINTF(args...) seq_printf(m, ##args) + +-static int proc_info (struct Scsi_Host *host, char *buffer, +- char **start, off_t offset, int length, int inout) ++static int show_info(struct seq_file *m, struct Scsi_Host *host) + { +- char *pos = buffer; + +- +- if (inout) +- return length; +- +- + SPRINTF(" Host scsi%d: %s\n", host->host_no, CR_DRIVER_NAME); +- + + SPRINTF(" Vendor: Realtek Corp.\n"); + SPRINTF(" Product: RTS5229\n"); + SPRINTF(" Version: %s\n", DRIVER_VERSION); + SPRINTF(" Build: %s, %s\n", __DATE__, __TIME__); +- +- /* +- * Calculate start of next buffer, and return value. +- */ +- *start = buffer + offset; +- +- if ((pos - buffer) < offset) +- return (0); +- else if ((pos - buffer - offset) < length) +- return (pos - buffer - offset); +- else +- return (length); ++ return 0; + } + + +@@ -263,7 +243,7 @@ + + .name = CR_DRIVER_NAME, + .proc_name = CR_DRIVER_NAME, +- .proc_info = proc_info, ++ .show_info = show_info, + .info = host_info, + + diff --git a/sys-block/rts5229/files/rts5229-linux-3.8.patch b/sys-block/rts5229/files/rts5229-linux-3.8.patch new file mode 100644 index 0000000..81779ae --- /dev/null +++ b/sys-block/rts5229/files/rts5229-linux-3.8.patch @@ -0,0 +1,29 @@ +--- rts5229.a/rtsx.c 2012-03-21 07:10:18.000000000 +0530 ++++ rts5229.b/rtsx.c 2013-05-29 01:06:32.333737569 +0530 +@@ -911,7 +911,7 @@ + chip->support_mmc = 1; + } + +-static int __devinit rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) ++static int rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) + { + struct Scsi_Host *host; + struct rtsx_dev *dev; +@@ -1066,7 +1066,7 @@ + } + + +-static void __devexit rtsx_remove(struct pci_dev *pci) ++static void rtsx_remove(struct pci_dev *pci) + { + struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci); + +@@ -1092,7 +1092,7 @@ + .name = CR_DRIVER_NAME, + .id_table = rts5229_ids, + .probe = rtsx_probe, +- .remove = __devexit_p(rtsx_remove), ++ .remove = rtsx_remove, + #ifdef CONFIG_PM + .suspend = rtsx_suspend, + .resume = rtsx_resume, diff --git a/sys-block/rts5229/files/rts5229-vmalloc.patch b/sys-block/rts5229/files/rts5229-vmalloc.patch new file mode 100644 index 0000000..51058cf --- /dev/null +++ b/sys-block/rts5229/files/rts5229-vmalloc.patch @@ -0,0 +1,33 @@ +diff -Naur rts5229.a/ms.c rts5229.b/ms.c +--- rts5229.a/ms.c 2012-03-20 21:40:18.000000000 -0400 ++++ rts5229.b/ms.c 2015-09-17 01:13:54.830723253 -0400 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "rtsx.h" + #include "rtsx_transport.h" +diff -Naur rts5229.a/rtsx_chip.c rts5229.b/rtsx_chip.c +--- rts5229.a/rtsx_chip.c 2012-03-20 21:40:18.000000000 -0400 ++++ rts5229.b/rtsx_chip.c 2015-09-17 01:13:29.574133449 -0400 +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include "rtsx.h" + #include "rtsx_transport.h" +diff -Naur rts5229.a/rtsx_scsi.c rts5229.b/rtsx_scsi.c +--- rts5229.a/rtsx_scsi.c 2012-03-20 21:40:18.000000000 -0400 ++++ rts5229.b/rtsx_scsi.c 2015-09-17 01:13:44.035898653 -0400 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "rtsx.h" + #include "rtsx_transport.h" diff --git a/sys-block/rts5229/files/rts5249.patch b/sys-block/rts5229/files/rts5249.patch new file mode 100644 index 0000000..b86a80d --- /dev/null +++ b/sys-block/rts5229/files/rts5249.patch @@ -0,0 +1,12 @@ +diff --git i/rtsx.c w/rtsx.c +index 7fd7a92..ce67693 100644 +--- i/rtsx.c ++++ w/rtsx.c +@@ -1082,6 +1082,7 @@ static void __devexit rtsx_remove(struct pci_dev *pci) + static struct pci_device_id rts5229_ids[] = { + { 0x10EC, 0x5229, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_OTHERS << 16, 0xFF0000 }, + { 0x10EC, 0x5227, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_OTHERS << 16, 0xFF0000 }, ++ { 0x10EC, 0x5249, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_OTHERS << 16, 0xFF0000 }, + { 0, }, + }; + diff --git a/sys-block/rts5229/metadata.xml b/sys-block/rts5229/metadata.xml new file mode 100644 index 0000000..6ab6ec0 --- /dev/null +++ b/sys-block/rts5229/metadata.xml @@ -0,0 +1,12 @@ + + + + + vikraman@gentoo.org + Vikraman Choudhury + + + PCIE RTS5229 card reader driver for Linux. + + + diff --git a/sys-block/rts5229/rts5229-1.07-r6.ebuild b/sys-block/rts5229/rts5229-1.07-r6.ebuild new file mode 100644 index 0000000..b2e9f9a --- /dev/null +++ b/sys-block/rts5229/rts5229-1.07-r6.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit linux-mod + +DESCRIPTION="PCIE RTS5229 card reader driver for Linux" +HOMEPAGE="http://www.realtek.com.tw/Downloads/downloadsView.aspx?PNid=15&PFid=25&Level=4&Conn=3&DownTypeID=3" +SRC_URI="https://dev.gentoo.org/~vikraman/distfiles/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="rts5249" + +DEPEND="" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}" + +MODULE_NAMES="rts5229(misc/drivers/scsi)" +BUILD_TARGETS="default" + +src_prepare() { + sed -e 's/\/lib\/modules\/\$(shell uname -r)\/build\//\$(KERNELDIR)/g' \ + -i Makefile || die "Sed failed!" + ([ ${KV_MAJOR} -gt 3 ] || ([ ${KV_MAJOR} -eq 3 ] && [ ${KV_MINOR} -ge 8 ])) \ + && epatch "${FILESDIR}/${PN}-linux-3.8.patch" + ([ ${KV_MAJOR} -gt 3 ] || ([ ${KV_MAJOR} -eq 3 ] && [ ${KV_MINOR} -ge 10 ])) \ + && epatch "${FILESDIR}/${PN}-linux-3.10.patch" + sed -e '/__DATE__/d' \ + -i rtsx.c || die "Sed failed!" + epatch "${FILESDIR}/${PN}-vmalloc.patch" + + if use rts5249; then + epatch "${FILESDIR}/rts5249.patch" + fi +} + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}" +} -- cgit v1.2.3