Habe vom MosChip-Support folgende Treiber (MCS9865_V1.0.0.9.tar.gz) zugesendet bekommen (unterstützen 32-bit Kernel bis 2.6.33), die ich mit einem kleinen Patch auch unter Ubuntu 10.04 zum laufen bekommen habe.
Schritt 0: überprüfen ob die Karte gefunden wird
Code:
lspci -v
...
04:05.0 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
Subsystem: Device a000:1000
Flags: medium devsel, IRQ 20
I/O ports at e800 [size=8]
Memory at febff000 (32-bit, non-prefetchable) [size=4K]
Memory at febfe000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
04:05.1 Serial controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 02)
Subsystem: Device a000:1000
Flags: medium devsel, IRQ 21
I/O ports at e400 [size=8]
Memory at febfd000 (32-bit, non-prefetchable) [size=4K]
Memory at febfc000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
04:05.2 Parallel controller: Illegal Vendor ID Device 9865 (prog-if 03)
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 32, IRQ 10
I/O ports at e000 [size=8]
I/O ports at d800 [size=8]
Memory at febfb000 (32-bit, non-prefetchable) [size=4K]
Memory at febfa000 (32-bit, non-prefetchable) [size=4K]
Capabilities: <access denied>
Schritt 1: untar von MCS9865_V1.0.0.9.tar.gz
Code:
enero99@pc01:~$ sudo -i
root@pc01:~# cd Desktop
root@pc01:~/Desktop# tar -xzvf MCS9865_V1.0.0.9.tar.gz
MCS9865_V1.0.0.9/
MCS9865_V1.0.0.9/ReleaseNotes
MCS9865_V1.0.0.9/mcs9865-isa.h
MCS9865_V1.0.0.9/testreport
MCS9865_V1.0.0.9/mcs9865_isa_installation
MCS9865_V1.0.0.9/mcs9865.c
MCS9865_V1.0.0.9/mcs9865.h
MCS9865_V1.0.0.9/mcs9865-isa.c
MCS9865_V1.0.0.9/mcs9865
MCS9865_V1.0.0.9/Makefile
MCS9865_V1.0.0.9/readme
root@pc01:~/Desktop#
Schritt 2: Makefile patchen (löschen und einfügen)
löschen:...
ln -s /etc/init.d/mcs9865 /etc/rc.d/rc3.d/Smcs9865 || true
ln -s /etc/init.d/mcs9865 /etc/rc.d/rc5.d/Smcs9865 || true
...
rm -f /etc/rc.d/rc3.d/Smcs9865
rm -f /etc/rc.d/rc5.d/Smcs9865
...
einfügen:...
ln -s /etc/init.d/mcs9865 /etc/rc2.d/Smcs9865 || true
...
rm -f /etc/rc2.d/Smcs9865
...
Code:
KDIR:=/lib/modules/$(shell uname -r)/build/
obj-m +=mcs9865.o
obj-m +=mcs9865-isa.o
default:
$(RM) *.mod.c *.o *.ko .*.cmd *.symvers
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
load:
insmod mcs9865.ko
unload:
rmmod mcs9865
install:
cp mcs9865.ko mcs9865-isa.ko /lib/modules/$(shell uname -r)/kernel/drivers/serial/
depmod -A
chmod +x mcs9865
cp mcs9865 /etc/init.d/
ln -s /etc/init.d/mcs9865 /etc/rc2.d/Smcs9865 || true
modprobe mcs9865
modprobe mcs9865-isa
uninstall:
modprobe -r mcs9865
modprobe -r mcs9865-isa
rm /lib/modules/$(shell uname -r)/kernel/drivers/serial/mcs9865*
depmod -A
rm -f /etc/init.d/mcs9865
rm -f /etc/rc2.d/Smcs9865
clean:
$(RM) *.mod.c *.o *.ko .*.cmd *.symvers *.order *.markers
$(RM) -r .tmp_versions
Schritt 3: make
Code:
root@pc01:~/Desktop/MCS9865_V1.0.0.9# make
rm -f *.mod.c *.o *.ko .*.cmd *.symvers
make -C /lib/modules/2.6.32-25-generic-pae/build/ SUBDIRS=/root/Desktop/MCS9865_V1.0.0.9 modules
make[1]: Betrete Verzeichnis '/usr/src/linux-headers-2.6.32-25-generic-pae'
CC [M] /root/Desktop/MCS9865_V1.0.0.9/mcs9865.o
/root/Desktop/MCS9865_V1.0.0.9/mcs9865.c: In function ‘receive_chars’:
/root/Desktop/MCS9865_V1.0.0.9/mcs9865.c:644: warning: comparison of distinct pointer types lacks a cast
/root/Desktop/MCS9865_V1.0.0.9/mcs9865.c:718: warning: comparison of distinct pointer types lacks a cast
CC [M] /root/Desktop/MCS9865_V1.0.0.9/mcs9865-isa.o
Building modules, stage 2.
MODPOST 2 modules
CC /root/Desktop/MCS9865_V1.0.0.9/mcs9865-isa.mod.o
LD [M] /root/Desktop/MCS9865_V1.0.0.9/mcs9865-isa.ko
CC /root/Desktop/MCS9865_V1.0.0.9/mcs9865.mod.o
LD [M] /root/Desktop/MCS9865_V1.0.0.9/mcs9865.ko
make[1]: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.32-25-generic-pae'
root@pc01:~/Desktop/MCS9865_V1.0.0.9#
Schritt 4: make install
Code:
root@pc01:~/Desktop/MCS9865_V1.0.0.9# make install
cp mcs9865.ko mcs9865-isa.ko /lib/modules/2.6.32-25-generic-pae/kernel/drivers/serial/
depmod -A
chmod +x mcs9865
cp mcs9865 /etc/init.d/
ln -s /etc/init.d/mcs9865 /etc/rc2.d/Smcs9865 || true
modprobe mcs9865
modprobe mcs9865-isa
root@pc01:~/Desktop/MCS9865_V1.0.0.9#
Schritt 5: installierte Ports anzeigen
Code:
root@pc01:~/Desktop/MCS9865_V1.0.0.9# ls /dev/ttyD*
/dev/ttyD0 /dev/ttyD1
Schritt 6: Funktion testen
- beide Schnittstellen mit Nullmodemkabel verbunden
- cutecom gestartet (Device: /dev/ttyD0 und dann Open device)
- cutecom zum zweitenmal gestartet (Device: /dev/ttyD1 und dann Open device)
Lesezeichen