summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Severance2019-04-03 17:53:59 -0400
committerChris Severance2019-04-03 17:53:59 -0400
commit0e3f720ef0c376ecfd88e09fb405667eb13cc36e (patch)
tree83f63b56bc9bbc8e69d496473d31e717937694d4
parentc87bf5d270fec90a31085e635232cad7e577e289 (diff)
downloadaur-0e3f720ef0c376ecfd88e09fb405667eb13cc36e.tar.gz
autu: Update to 1.4-2 Improve blacklist for other TI devices
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD25
-rw-r--r--moxa-mxu11x0-install.sh15
3 files changed, 33 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 41244d5844d..dd91fc7dcf7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Thu Jun 21 00:55:47 UTC 2018
+# Wed Apr 3 21:53:59 UTC 2019
pkgbase = moxa-mxu11x0
pkgdesc = kernel module driver for Moxa UPort USB serial 1110 1130i 1150i RS-232 422 485
pkgver = 1.4
- pkgrel = 1
+ pkgrel = 2
url = https://www.moxa.com/support/support_home.aspx
install = moxa-mxu11x0-install.sh
arch = i686
@@ -14,6 +14,7 @@ pkgbase = moxa-mxu11x0
depends = dkms
depends = linux-headers
optdepends = setserial: set RS-422 485 modes
+ options = !strip
source = https://www.moxa.com/drivers/IDC_SW/UPort/Driver/UPort%201100%20Series/Linux/V1.4/legacy/driv_linux_kernel2.x_uport1p_v1.4_build_18050314.tgz
sha256sums = b9878842c3cd05f66647b584e10ed0689f7614b2b37ac31ba9c4da87d0bcba19
diff --git a/PKGBUILD b/PKGBUILD
index 4a7fd77b0ea..03a06355d74 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,13 +9,14 @@ _opt_DKMS=1 # This can be toggled between installs
set -u
pkgname='moxa-mxu11x0'
pkgver='1.4'
-pkgrel='1'
+pkgrel='2'
pkgdesc='kernel module driver for Moxa UPort USB serial 1110 1130i 1150i RS-232 422 485'
arch=('i686' 'x86_64')
url='https://www.moxa.com/support/support_home.aspx'
license=('GPL')
depends=('glibc')
optdepends=('setserial: set RS-422 485 modes')
+options=('!strip')
install="${pkgname}-install.sh"
_srcdir="${pkgname#*-}"
source=("https://www.moxa.com/drivers/IDC_SW/UPort/Driver/UPort%201100%20Series/Linux/V${pkgver}/legacy/driv_linux_kernel2.x_uport1p_v${pkgver}_build_18050314.tgz")
@@ -38,9 +39,9 @@ _install_check() {
for _ckvar in '_pkgname' '_modulename' '_builtinmod'; do
_ckline="${_ckvar}='${!_ckvar}'"
if ! grep -q "^${_ckline}"'$' "${startdir}/${install}"; then
+ set +u
msg "${install} must be fixed"
echo "${_ckline}"
- set +u
false
fi
done
@@ -55,12 +56,12 @@ prepare() {
sed -e 's:/lib/:/usr/lib/:g' -i driver/*/Makefile driver/*/mxconf
# Fix umbrella Makefile
- sed -e '# Too quiet' \
- -e '/make / s: -s::g' \
+ sed -e '# Disable silent' \
+ -e '/make / s:\s\+-s::g' \
-e '# Disable kernel 2.4 detection' \
-e '/^KERNEL_VERSION_MAJOR_NUMBER/,/^$/ s:^.:#&:g' \
-e '# Improve chdir technique' \
- -e 's:^.*@cd.*$:#&-:g' \
+ -e 's:^\t@cd .*$:#&-:g' \
-e 's:^\tmake:\t@make -C $(DRIVER_PATH):g' \
-i 'Makefile'
@@ -125,7 +126,18 @@ package() {
# Automatically generated by ${pkgname}-${pkgver} PKGBUILD from Arch Linux AUR
# https://aur.archlinux.org/
-blacklist ${_builtinmod}
+# This will kill other ti devices
+#blacklist ${_builtinmod}
+
+# Override alias list in ti_usb_3410_5052
+# Moxa 1110 1130 1150 1151 1131
+alias usb:v110Ap1151d*dc*dsc*dp*ic*isc*ip*in* mxu11x0
+alias usb:v110Ap1150d*dc*dsc*dp*ic*isc*ip*in* mxu11x0
+alias usb:v110Ap1131d*dc*dsc*dp*ic*isc*ip*in* mxu11x0
+alias usb:v110Ap1130d*dc*dsc*dp*ic*isc*ip*in* mxu11x0
+alias usb:v110Ap1110d*dc*dsc*dp*ic*isc*ip*in* mxu11x0
+# This prefers the moxa driver over the ti driver for boot and hotplug
+softdep ${_builtinmod} pre: ${_modulename}
EOF
) "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
@@ -149,7 +161,6 @@ CLEAN[0]="make -j1 -C 'driver/kernel2.6' clean"
DEST_MODULE_LOCATION[0]="/kernel/drivers/usb/serial"
EOF
) "${_dkms}/dkms.conf"
- install -dm755 "${_dkms}/driver/"
cp -pr 'driver/' "${_dkms}/"
rm -r "${_dkms}/driver/kernel2.4"
rm "${_dkms}/driver/kernel2.6/mxconf"
diff --git a/moxa-mxu11x0-install.sh b/moxa-mxu11x0-install.sh
index 93677690b8b..306e273b270 100644
--- a/moxa-mxu11x0-install.sh
+++ b/moxa-mxu11x0-install.sh
@@ -2,18 +2,27 @@ _pkgname='moxa-mxu11x0'
_modulename='mxu11x0'
_builtinmod='ti_usb_3410_5052'
-post_upgrade() {
- set -u
+_ui() {
if [ ! -d "/usr/src/${_pkgname}"-*/ ]; then
# depmod -a # now done by pacman hook
modprobe -r "${_builtinmod}"
modprobe "${_modulename}"
+ elif [ "$1" = 'i' ]; then
+ echo "You can switch to the new module immediately with"
+ echo " modprobe -r ${_builtinmod}"
+ echo " modprobe ${_builtinmod}"
+ # echo " modprobe ${_modulename}"
fi
+}
+
+post_upgrade() {
+ set -u
+ _ui 'u'
set +u
}
post_install() {
- post_upgrade
+ _ui 'i'
}
pre_remove() {