Compiling obscure kernel module.

Posted by: andym

Compiling obscure kernel module. - 09/03/2005 18:07

I've built a serial-i2c adaptor and I've got some code to provide the software interface via the kernel i2c system. The problem is there's just the code, no build instructions or makefile. Any chance of somebody having a look at the code and giving me an insight into what I'll need to do to compile it?

http://vodka.tky.hut.fi/~jap/Electronics/I2C/SerialAdapter/i2c-serial.c
Posted by: mlord

Re: Compiling obscure kernel module. - 10/03/2005 00:57

Mmmm.. it appears to be somewhat out of date -- fails to compile for me on 2.4.xx and 2.6.xx kernels.

So, given that it works on neither and thus needs fixing regardless.. here is a Makefile for it for 2.6.xx kernels (attached).

Cheers
Posted by: andym

Re: Compiling obscure kernel module. - 10/03/2005 06:45

Cool, thanks for that mark. All my linux programming has been userspace stuff so far. I'm about to start looking at writing kernel modules as I think it would be something good to add to my CV but so far I'm pretty useless.

I'm at the train station at the moment so I'll give it a go when I get back to my hotel and have cheaper access to the net.