Last active
March 18, 2020 05:51
-
-
Save ysegorov/951ae99426f5bd9092c3b4138e207af2 to your computer and use it in GitHub Desktop.
ArchLinux PKGBUILD for Alcor Micro AU6601 card reader (for Linux kernel 4.16+ only)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- au6601.c.old 2018-05-06 08:24:34.872687130 +0300 | |
+++ au6601.c 2018-05-06 08:26:34.200419328 +0300 | |
@@ -1015,11 +1015,9 @@ | |
mmc_request_done(host->mmc, mrq); | |
} | |
-static void au6601_timeout_timer(unsigned long data) | |
+static void au6601_timeout_timer(struct timer_list *t) | |
{ | |
- struct au6601_host *host; | |
- | |
- host = (struct au6601_host *)data; | |
+ struct au6601_host *host = from_timer(host, t, timer); | |
mutex_lock(&host->cmd_mutex); | |
@@ -1184,7 +1182,7 @@ | |
/* | |
* Init tasklets. | |
*/ | |
- setup_timer(&host->timer, au6601_timeout_timer, (unsigned long)host); | |
+ timer_setup(&host->timer, au6601_timeout_timer, 0); | |
au6601_init_mmc(host); | |
au6601_hw_init(host); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Yuri Egorov <[email protected]> -> https://github.com/ysegorov | |
_pkgname=au6601 | |
pkgname=${_pkgname}-dkms | |
pkgver=0.3 | |
pkgrel=1 | |
pkgdesc="PCI driver for Alcor Micro AU6601 Secure Digital Host Controller Interface (uses DKMS to automatically build the au6601-pci kernel module)." | |
# arch=('i686' 'x86_64') | |
arch=('x86_64') | |
url="https://launchpad.net/~iacobs/+archive/ubuntu/au6601/+packages" | |
license=('GPL2') | |
depends=('dkms') | |
makedepends=() | |
optdepends=('linux-headers: build the module against Arch kernel') | |
provides=('au6601-pci') | |
conflicts=() | |
# source_i686=("https://launchpad.net/~iacobs/+archive/ubuntu/au6601/+files/au6601-dkms_${pkgver}-0~ppa7_i386.deb") | |
source_x86_64=( | |
"https://launchpad.net/~iacobs/+archive/ubuntu/au6601/+files/au6601-dkms_${pkgver}-0~ppa7_amd64.deb" | |
"au6601-timers.diff" | |
) | |
# sha256sums_i686=('ef90f21dcd25aac20630c9657bcebc71bf8fddc1cb5e3cc1d8c7febba699f29e') | |
sha256sums_x86_64=( | |
'e366c97ca3ce147c126ad955baca12aea665183b7c86b63beb0f1630a94f5e99' | |
'SKIP' | |
) | |
prepare() { | |
cd ${srcdir} | |
bsdtar xf data.tar.xz | |
patch -p0 -d "${srcdir}/usr/src/${_pkgname}-${pkgver}/" -i "${srcdir}/au6601-timers.diff" | |
sed -i 's/^MAKE/# MAKE/' "${srcdir}/usr/src/${_pkgname}-${pkgver}/dkms.conf" | |
} | |
package() { | |
cp -r "${srcdir}/usr" "${pkgdir}" | |
} | |
post_install() { | |
DKMS_NAME=${_pkgname} | |
DKMS_PACKAGE_NAME=$DKMS_NAME-dkms | |
DKMS_VERSION=${pkgver} | |
} | |
post_upgrade() { | |
post_install | |
} | |
pre_remove() { | |
DKMS_NAME=${_pkgname} | |
DKMS_VERSION=${pkgver} | |
if [ "$(dkms status -m $DKMS_NAME -v $DKMS_VERSION)" ]; then | |
dkms remove -m $DKMS_NAME -v $DKMS_VERSION --all | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does this work with AU6625?