summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--0000-restore-deprecated-pcie-cards.patch47
-rw-r--r--PKGBUILD32
3 files changed, 80 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index dc00e8f8da8c..34d9a0a22d02 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sat Aug 5 02:52:15 UTC 2017
+# Wed Aug 9 18:40:43 UTC 2017
pkgbase = brainboxes-serial-pci
pkgdesc = script to enable Brainboxes serial and parallel ports PCI PCIe Express PCMCIA PM UC CC-525 CC-530 PX-275 PX-279 PX-263 PX-295 PX-272 PX-306
pkgver = 0.0.20160614
@@ -16,7 +16,9 @@ pkgbase = brainboxes-serial-pci
backup = etc/bbportinst.local
backup = etc/modprobe.d/parport_bb.conf
source = http://www.brainboxes.com/files/pages/support/faqs/drivers%20and%20firmware/bbportinst.zip
+ source = 0000-restore-deprecated-pcie-cards.patch
sha256sums = d5ac2012bae944d398517511b55cd43d920c79de910cae8e60ca05eaa1408b70
+ sha256sums = ba1481741952faa9399df8f16a4808e89322c079bf248d664579ae7882bc2726
pkgname = brainboxes-serial-pci
diff --git a/0000-restore-deprecated-pcie-cards.patch b/0000-restore-deprecated-pcie-cards.patch
new file mode 100644
index 000000000000..0fe560499a6e
--- /dev/null
+++ b/0000-restore-deprecated-pcie-cards.patch
@@ -0,0 +1,47 @@
+--- bbportinst 2017-08-07 18:20:01.586014862 -0400
++++ bbportinst.new.oldtable 2017-08-07 18:20:01.599348195 -0400
+@@ -116,11 +116,44 @@ my @card_info_table = (
+ { didmin => 0x0ca0, didmax => 0x0cbf, n_serial => 2, n_lpt => 0, descr => 'UNIVERSAL PCI 2-PORT RS232 CARD (SPLITTER CABLE TYPE)'},
+ { didmin => 0x0d20, didmax => 0x0d2f, n_serial => 4, n_lpt => 0, descr => 'UNIVERSAL PCI 4-PORT RS232 LOW PROFILE CARD'},
+ { didmin => 0x0d40, didmax => 0x0d5f, n_serial => 4, n_lpt => 0, descr => 'UNIVERSAL PCI 4-PORT RJ45 RS232 CARD'},
+ { didmin => 0x0e40, didmax => 0x0e5f, n_serial => 8, n_lpt => 0, descr => 'PCI EXPRESS VELOCITY 8 PORT RS232 CARD'},
+ { didmin => 0x0e60, didmax => 0x0e7f, n_serial => 4, n_lpt => 1, descr => 'UNIVERSAL PCI 3+1-PORT RS232 + LPT CARD'},
++ #{ didmin => 0x4000, didmax => 0x4000, n_serial => 4, n_lpt => 0, descr => 'PCIE 3+1XRS232 1MBAUD'},
++ #{ didmin => 0x4001, didmax => 0x4001, n_serial => 3, n_lpt => 0, descr => 'PCIE 3XRS232 1MBAUD'},
++ #{ didmin => 0x4002, didmax => 0x4002, n_serial => 4, n_lpt => 0, descr => 'PCIE 3+1XRS232 POS 1A'},
++ #{ didmin => 0x4003, didmax => 0x4003, n_serial => 3, n_lpt => 0, descr => 'PCIE 3XRS232 POS 1A'},
++ #{ didmin => 0x4004, didmax => 0x4004, n_serial => 1, n_lpt => 0, descr => 'PCIE 1XRS232 1MBAUD'},
++ #{ didmin => 0x4005, didmax => 0x4005, n_serial => 2, n_lpt => 0, descr => 'LP PCIE 1+1XRS232 1MBAUD'},
++ #{ didmin => 0x4006, didmax => 0x4007, n_serial => 2, n_lpt => 1, descr => 'PCIE 2XRS232 + 1XLPT 1MBAUD'},
++ #{ didmin => 0x4008, didmax => 0x4008, n_serial => 1, n_lpt => 0, descr => 'PCIE 1XRS232 POS 1A'},
++ #{ didmin => 0x4009, didmax => 0x4009, n_serial => 2, n_lpt => 0, descr => 'PCIE 2XRS232 POS 1A'},
++ #{ didmin => 0x400a, didmax => 0x400a, n_serial => 4, n_lpt => 0, descr => 'LP PCIE 4XRS232 1MBAUD'},
++ #{ didmin => 0x400b, didmax => 0x400b, n_serial => 1, n_lpt => 0, descr => 'PCIE LP 1XRS422/485 1MBAUD'},
++ #{ didmin => 0x400c, didmax => 0x400c, n_serial => 2, n_lpt => 0, descr => 'PCIE 2XRS422/485 1MBAUD'},
++ #{ didmin => 0x400e, didmax => 0x400e, n_serial => 2, n_lpt => 0, descr => 'PCIE 2XRS422/485 1MBAUD OPTO ISOLATED'},
++ #{ didmin => 0x400f, didmax => 0x400f, n_serial => 4, n_lpt => 0, descr => 'PCIE 4XRS422/485 1MBAUD'},
++ #{ didmin => 0x4010, didmax => 0x4010, n_serial => 4, n_lpt => 0, descr => 'PCIE 4XRS422/485 1MBAUD OPTO ISOLATED'},
++ #{ didmin => 0x4011, didmax => 0x4011, n_serial => 4, n_lpt => 0, descr => 'PCIE 3+1XRS232 1MBAUD'},
++ #{ didmin => 0x4012, didmax => 0x4012, n_serial => 3, n_lpt => 0, descr => 'PCIE 3XRS232 1MBAUD'},
++ #{ didmin => 0x4013, didmax => 0x4013, n_serial => 4, n_lpt => 0, descr => 'PCIE 3+1XRS232 POS 1A'},
++ #{ didmin => 0x4014, didmax => 0x4014, n_serial => 3, n_lpt => 0, descr => 'PCIE 3XRS232 POS 1A'},
++ #{ didmin => 0x4015, didmax => 0x4015, n_serial => 2, n_lpt => 0, descr => 'PCIE 2XRS232 1MBAUD'},
++ #{ didmin => 0x4016, didmax => 0x4016, n_serial => 1, n_lpt => 0, descr => 'LP PCIE 1XRS232 1MBAUD'},
++ #{ didmin => 0x4017, didmax => 0x4017, n_serial => 1, n_lpt => 0, descr => 'LP PCIE 1XRS232 POS 1A'},
++ #{ didmin => 0x4018, didmax => 0x4018, n_serial => 2, n_lpt => 0, descr => 'PCIE 2XRS232 POS 1A'},
++ #{ didmin => 0x4019, didmax => 0x4019, n_serial => 2, n_lpt => 0, descr => 'LP PCIE 1+1XRS232 1MBAUD'},
++ #{ didmin => 0x401a, didmax => 0x401a, n_serial => 2, n_lpt => 0, descr => 'LP PCIE 2XRS232 1MBAUD'},
++ #{ didmin => 0x401b, didmax => 0x401b, n_serial => 8, n_lpt => 0, descr => 'PCIE 8XRS232 1MBAUD'},
+ { didmin => 0x401c, didmax => 0x401c, n_serial => 0, n_lpt => 1, lpt_base => 'BAR0', descr => 'PCIE 1XLPT'},
++ #{ didmin => 0x401d, didmax => 0x401d, n_serial => 1, n_lpt => 1, descr => 'PCIE 1XRS232 + 1XLPT 1MBAUD'},
++ #{ didmin => 0x401e, didmax => 0x401e, n_serial => 2, n_lpt => 0, descr => 'PCIE 1+1XRS232 POS 1A'},
++ #{ didmin => 0x4020, didmax => 0x4020, n_serial => 0, n_lpt => 1, descr => 'PCIE 1XLPT'},
++ #{ didmin => 0x4021, didmax => 0x4022, n_serial => 1, n_lpt => 1, descr => 'EXPRESSCARD LPT + 1XRS232 1MBAUD'},
++ #{ didmin => 0x4023, didmax => 0x4023, n_serial => 4, n_lpt => 0, descr => 'LP PCIE 4XRS232 1MBAUD'},
++ #{ didmin => 0x4024, didmax => 0x4024, n_serial => 2, n_lpt => 0, descr => 'PCIE 1XRS232 + 1XRS422/485 1MBAUD'},
++ #{ didmin => 0x4025, didmax => 0x4025, n_serial => 8, n_lpt => 0, descr => 'PCIE 8XRS422/485'},
+ { didmin => 0x402c, didmax => 0x402c, n_serial => 4, n_lpt => 1, baud_base => 921600, descr => 'PCIE 4XRS232 + 1XLPT CARD'},
+ { didmin => 0x4100, didmax => 0x4100, n_serial => 5, n_lpt => 1, baud_base => 921600, descr => 'PCIE 4+1XRS232 + 1XLPT CARD'},
+ );
+
+ my $devnode_next = $devnode_index_start;
diff --git a/PKGBUILD b/PKGBUILD
index d50e6e938a08..3b6db5f774d3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -30,8 +30,9 @@ backup=('etc/bbportinst'{.conf,.local} 'etc/modprobe.d/parport_bb.conf')
options=('!strip')
install="${pkgname}-install.sh"
_srcdir='bbportinst'
-source=('http://www.brainboxes.com/files/pages/support/faqs/drivers%20and%20firmware/bbportinst.zip')
-sha256sums=('d5ac2012bae944d398517511b55cd43d920c79de910cae8e60ca05eaa1408b70')
+source=('http://www.brainboxes.com/files/pages/support/faqs/drivers%20and%20firmware/bbportinst.zip' '0000-restore-deprecated-pcie-cards.patch')
+sha256sums=('d5ac2012bae944d398517511b55cd43d920c79de910cae8e60ca05eaa1408b70'
+ 'ba1481741952faa9399df8f16a4808e89322c079bf248d664579ae7882bc2726')
_servicename="${pkgname}.service"
@@ -59,6 +60,33 @@ prepare() {
sed -e 's:\s*\r$::g' -i $(grep -rlFe $'\r')
chmod 755 'bbportinst'
+ if ! :; then
+ # Pull the commented PCIe cards in from an old version
+ gunzip < '$tf/13/9638928d-f5c9-4b4e-8050-fb2d8fc6aac4.gz' > 'bbportinst.9638928d-f5c9-4b4e-8050-fb2d8fc6aac4'
+ sed -e 's:\s*\r$::g' -i 'bbportinst.9638928d-f5c9-4b4e-8050-fb2d8fc6aac4'
+
+ # Extract table out and insert it into the new file. This gives us a clean diff without the other unwanted code changes.
+ sed -ne '/^my @card_info_table/,/^);$/ p' 'bbportinst.9638928d-f5c9-4b4e-8050-fb2d8fc6aac4' > 'bbportinst.oldtable'
+ rm 'bbportinst.9638928d-f5c9-4b4e-8050-fb2d8fc6aac4'
+
+ sed -e '# Insert marker for new table' \
+ -e '/^my @card_info_table/ i #@TABLE_PLACE@' \
+ -e '# Remove old table leaving only marker' \
+ -e '/^my @card_info_table/,/^);$/ d' 'bbportinst' |
+ sed -e '# Insert old table at marker' \
+ -e '/^#@TABLE_PLACE@$/ r bbportinst.oldtable' |
+ sed -e '# Remove marker' \
+ -e '/^#@TABLE_PLACE@$/ d' > 'bbportinst.new.oldtable'
+ rm 'bbportinst.oldtable'
+
+ diff -pNau5 bbportinst{,.new.oldtable} > '0000-restore-deprecated-pcie-cards.patch' || :
+ rm 'bbportinst.new.oldtable'
+ set +u
+ msg 'Move supplied patch to PKGBUILD'
+ false
+ fi
+ patch -Nup0 -i '../0000-restore-deprecated-pcie-cards.patch'
+
# Fix path
sed -e 's:/bin/setserial:/usr/bin/setserial:g' -i 'bbportinst'
sed -e '# Custom shell script instead of rc.local' \