help with building mcs9865 driver

I recently bought a pci multi io card to give my pc 2 parallel ports. For Linux, Moschip supply the source plus makefile and instructions. I ran make as root and got an error message
make: *** /lib/modules/2.6.31.12-0.2-desktop/build/: No such file or directory.

So I created a folder called build in /lib/modules/2.6.31.12-0.2-desktop but that isnt good enough as I still get an error cannot make target modules. So I assume there must be something in the build folder. So what packages do I have to install to get the correct environment to be able to build the driver?

Has anyone done this and can supply the driver for 11.2?

Thanks
Alan

Hi
If you provide a link to the source I can build a KMP for you. Else you
generally need the kernel-source, kernel-syms, linux-kernel-headers,
make and gcc and the devel version for your running kernel (in your
case desktop).


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.4-default
up 3 days 20:02, 2 users, load average: 0.23, 0.20, 0.14
GPU GeForce 8600 GTS Silent - Driver Version: 256.35

Hi
Found the source, you should see them start to appear here soon
http://software.opensuse.org/search?q=MCS9865-kmp&baseproject=openSUSE%3A11.2&lang=en

If you want to add some specific changes to the source configuration,
please advise and will make the patches and rebuild.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.4-default
up 3 days 21:35, 3 users, load average: 0.06, 0.08, 0.12
GPU GeForce 8600 GTS Silent - Driver Version: 256.35

Thanks,
I installed MCS9865-kmp-desktop and MCS9865-kmp-desktop-debuginfo using 1 click install and that worked ok. But do not know the next step to take tried following instructions in readme with MCS src but didnt work see below.

instructions were

rmmod lp

l# rmmod parport_pc
l# insmod /usr/lib/modules/2.6.15/kernel/drivers/parport_pc io=0xd0101000 irq=11
insmod: can’t read ‘/usr/lib/modules/2.6.15/kernel/drivers/parport_pc’: No such file or directory

So where are these drivers kept in opensuse?

Thanks for your help so far as I havent a clue what is going on

Alan

On 07/14/2010 06:16 PM, abat wrote:
>
> Thanks,
> I installed MCS9865-kmp-desktop and MCS9865-kmp-desktop-debuginfo using
> 1 click install and that worked ok. But do not know the next step to
> take tried following instructions in readme with MCS src but didnt work
> see below.
>
> instructions were
>
> # rmmod lp
> l# rmmod parport_pc
> l# insmod /usr/lib/modules/2.6.15/kernel/drivers/parport_pc
> io=0xd0101000 irq=11
> insmod: can’t read ‘/usr/lib/modules/2.6.15/kernel/drivers/parport_pc’:
> No such file or directory
>
> So where are these drivers kept in opensuse?
>
> Thanks for your help so far as I havent a clue what is going on

For drivers that are installed, modprobe makes an easy wrapper around insmod and
rmmod. As an ordinary user, use “sudo /sbin/modprobe -rv parport_pc”.

Hi
In your case they are in;


/lib/modules/2.6.31.12-0.2-desktop/updates/

and are called mcs9865 and mcs9865-isa, you can find out information via
the modinfo command;


/sbin/modinfo mcs9865
/sbin/modinfo mcs9865-isa

You can also use the YaST software management tool to view the files,
there is also a file called MCS9865-1.0.0.6-7.1.i586.rpm which contains
the documentation down in /usr/share/doc/packages/MCS9865/


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.4-default
up 1:54, 2 users, load average: 0.00, 0.01, 0.00
GPU GeForce 8600 GTS Silent - Driver Version: 256.35

Thanks,
Did that, now how do I check the IDs of the parallel ports? Again the instructions in the readme say

Type “ls /dev/ttyD” command in the terminal window and press “Tab” key twice to see the MCS9865 serial ports installed on the machine.

Their example then shows ttyD0 ttyD1.

When I try it I get ls: cannot access /dev/ttyD: No such file or directory so what do I do?

Thanks
Alan

Malcolm,
I cannot see any MCS9865 folder in /usr/share/doc/packages.

Alan

Hi
You need to install the MCS9865-1.0.0.6-7.1.i586.rpm
http://software.opensuse.org/search?q=MCS9865&baseproject=openSUSE%3A11.2&lang=en&exclude_debug=true
This installs MCS9865_Linux_UM_Ver1.1.pdf, readme and
mcs9865_isa_installation.

Having a read through the pdf file you need to provide some options to
the driver? Also can you confirm it’s there via;


lspci -v


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.4-default
up 14:26, 2 users, load average: 0.03, 0.02, 0.00
GPU GeForce 8600 GTS Silent - Driver Version: 256.35

Malcolm,
Is it possible to get an 11.3 version ? Only I was thinking of upgrading to 11.3.
Alan

Hi
Will try to build, but it may not like gcc45 or the kernel…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.4-default
up 17:29, 2 users, load average: 0.12, 0.05, 0.01
GPU GeForce 8600 GTS Silent - Driver Version: 256.35

Hi
I had to patch mcs9865.c changing numerous port.info to port.state so
it’s all building now for 11.3;
http://software.opensuse.org/search?q=MCS9865&baseproject=openSUSE%3A11.3&lang=en#

If you use the 1-click for MCS9865 it should pull in the correct kmp
for your running kernel.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.4-default
up 20:56, 3 users, load average: 0.02, 0.05, 0.07
GPU GeForce 8600 GTS Silent - Driver Version: 256.35

Thanks Malcolm, I have installed 11.3 and used 1 click install on MCS9865 seemed to install ok and patched my kernel. Prior to that (because I didnt read your message above closely enough, sorry was being a bit thick after spending an afternoon first installing ubuntu in parallel with opensuse I thought but it screwed up my system so thats when I decided to upgrade to 11.3. Have now ubuntu + 11.3 + xp running on same machine) Anyway I installed MCS9865-kmp-desktop first so now I am not sure but I seem to have two versions as lspci -v gives

0c:07.0 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03 [IEEE1284])
Subsystem: Device a000:2000
Flags: bus master, fast Back2Back, medium devsel, latency 32, IRQ 21
I/O ports at 5008 [size=8]
I/O ports at 5000 [size=8]
Memory at d0101000 (32-bit, non-prefetchable) [size=4]
Memory at d0100000 (32-bit, non-prefetchable) [size=4]
Capabilities: [48] Power Management version 2
Kernel driver in use: parport_pc

0c:07.2 Parallel controller: NetMos Technology PCI 9865 Multi-I/O Controller (prog-if 03 [IEEE1284])
Subsystem: Device a000:2000
Flags: bus master, fast Back2Back, medium devsel, latency 32, IRQ 18
I/O ports at 5018 [size=8]
I/O ports at 5010 [size=8]
Memory at d0103000 (32-bit, non-prefetchable) [size=4]
Memory at d0102000 (32-bit, non-prefetchable) [size=4]
Capabilities: [48] Power Management version 2
Kernel driver in use: parport_pc

Which is repeated twice where I was only expecting the first one Is this the case and if so how do I remove the second?

for info sudo /sbin/modinfo mcs9865
filename: /lib/modules/2.6.34-12-default/updates/mcs9865.ko
license: GPL
description: moschip 9865 serial driver module
srcversion: AE747C71EB64AE555BCAD22
depends:
vermagic: 2.6.34-12-default SMP mod_unload modversions
parm: test_mode:bool

alan@linux-5n5e:~> /sbin/modinfo mcs9865-isa
filename: /lib/modules/2.6.34-12-default/updates/mcs9865-isa.ko
description: MCS9865 ISA serial probe module
license: GPL
srcversion: 6AFD66D934FC1EBDC0309C8
alias: pci:v00009710d00009865sv0000A000sd00003012bcsci*
alias: pci:v00009710d00009865sv0000A000sd00003011bcsci*
alias: pci:v00009710d00009865sv0000A000sd00003020bcsci*
alias: pci:v00009710d00009865sv0000A000sd00003001bcsci*
alias: pci:v00009710d00009865sv0000A000sd00003002bcsci*
alias: pci:v00009710d00009865sv0000A000sd00003003bcsci*
alias: pci:v00009710d00009865sv0000A000sd00003004bcsci*
depends:
vermagic: 2.6.34-12-default SMP mod_unload modversions

but what is also throwing me is ls /dev/ttyD
ls: cannot access /dev/ttyD: No such file or directory

The Moschip doc tells me to expect to see ttyD0 and ttyD1 What am I still missing?
Also I looked at the doc about configuring the serial port but as I am only interested in the parallel ports I thought the defaults would do. But should we change the from RS232 ro RS422 I dont know.

Is there a command other than modprobe which will just list out just the active parallel ports.

Finally, this is just an explanation of why ubuntu + opensuse. I run a program called Emc which runs under ubuntu 8.04 with real time extensions to control some stepper motors. My dedicated pc blew up so I thought I might use my desktop pc which was only running opensuse 11.2. I would like to run Emc under opensuse (now 11.3) but that means adding the real time extensions to the kernel. Now that is another thread I am sure. Has anyone done this even for 11.2?

Alan[/size][/size][/size][/size][/size][/size][/size][/size]

Hi
For the serial ports it should be /dev/ttyS if you run


modprobe mcs9865-isa

For using /dev/ttyD run;


modprobe mcs9865

For the parallel,the above info says it’s already detected then and
using the parport_pc with


#1 - io=0x5008 irq=21
#2 - io=0x5018 irq=18

Also if your not wanting the serial ports there is no need to install
the kernel module :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.3 (i586) Kernel 2.6.34-12-desktop
up 8:16, 3 users, load average: 0.04, 0.09, 0.07
ASUS eeePC 1000HE ATOM N280 1.66GHz | GPU Mobile 945GM/GMS/GME

[/size][/size][/size][/size][/size][/size][/size][/size]

Hi Malcolm,
I use SLES 11 SP1, can i install the rpm on software.opensuse.org: Search Results in SLES 11 SP1 ?

Thanks,
Vincent

Hi Vincent
I have modified the spec file so it will build for SLE 11 SP1. Now the
OBS only uses the default kernel for builds, so if your running an
updated kernel you will need to build from the src rpm.

They should appear here soon (not published yet, but have built ok)
http://software.opensuse.org/search?q=MCS9865&baseproject=SUSE%3ASLE-11%3ASP1&lang=en&exclude_debug=true

To rebuild the src rpm, you need the kernel-source, kernel-syms,
linux-kernel-headers, make, gcc, patch and dos2unix installed, then as
your use;


rpmbuild --rebuild MCS9865-1.0.0.6-10.1.src.rpm

You then need to install the finished rpms MCS9865-1.0.0.6-10.1* and
MCS9865-kmp-{your_kernel_flavor}

PS, if you have any problems ping me in the SLES forums at
http://forums.novell.com :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.3 (x86_64) Kernel 2.6.34.7-0.3-default
up 8:22, 3 users, load average: 0.40, 0.19, 0.12
GPU GeForce 8600 GTS Silent - Driver Version: 256.53

Hi Malcolm,
thank’s for your reply… appreciate it :smiley:

Regards,
Vincent