2

This might have passed to the unix and linux stack exchange, but since it involves compiling, i am posting it here.

I want to compile usbserial, usb-wwan, and/or qcserial drivers for 2.6.35-9 Debian for ARMv7.

First problem, there is no 2.6.35-9 driver in the apt-get repos. I tried to compile with 2.6.32-kirkwood, while compilation works, insmod / modprobe, including -f, respectively --force switch fails, with the message :

insmod: error inserting 'usbserial.ko': -1 Invalid module format

I have looked up this and this. In this question, I was pointed to Debian 2.6.35-9 headers, but they did not install, for some dependency problem (Error message : Couldn't resolve dependency, without a list of missing dependencies). So I opened the .deb with ar, but it does not contain anything besides under data.tar.gz a /usr/share/doc ... etc - so no usable header files (or am I missing something?)

I am doing the compilation on the target machine (A Mirabox from Marvell) itself.

So, my question is,

  1. Can I download the Ubuntu 2.6.35 headers? Ubuntu uses Debian core, and the linux kernel is the same, with adaptions to the distro, or it is a fatal error? Is there any Armv7 header for a 2.6.35-9 at all?

  2. If not, then what do I do? Where do I get the correct header files?

  3. Also, 2.6.35 code for usbserial / qcserial is buggy anyway. I was using the code from the 3.2 kernel, thinking the errors might have been fixed. Was it a bad choice? If so, what to do

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Sean
  • 789
  • 6
  • 26
  • It is about compiling, but since it's not about compiling any code you wrote or are debugging (besides just to install) I think it may be more appropriate on [Linux & Unix Stack Exchange](http://unix.stackexchange.com/). If you don't get an answer here, consider migrating it. – skrrgwasme Sep 11 '14 at 19:42
  • [Horses mouth aka Linux Module Kbuild doc](https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/kbuild/modules.txt). Have you read this? It is important to compile with the same options. OABI/EABI, machine level, etc. You need to get both the kernel source and configuration, follow the module.txt information and recompile your module. If it is an internal/in-tree module, then you just build it. If you don't have the matching source and configuration, then you have issues. – artless noise Sep 11 '14 at 21:17
  • No I did not read that, @artlessnoise. I found out where the kernel sources and configuations are. Now I have other problems - I need to relink the /lib/modules/`uname -r`/build to somewhere, to the source tree i recon, or ? And the linux headers are already in the source tree, will make take care of it automatically, or do i have to make other symbolic links to it? Source tree contains, under /, the folder /arch/arm/ where the headers are, so could I just link the /lib/modules/.../build to the source tree? and what about using usbserial.c from 3.2 with bugs resolved to compile w/ 2.6.35-9? – Sean Sep 12 '14 at 13:49
  • If you have both the source and `.config`, to build your active kernel, then you can go to the source directory and type `make drivers/usb/.../serial.ko`. You can try to back-port the 3.2 changes to 2.6.35. Some changes are due to Linux infrastructure and others maybe due to driver bugs. You have to figure out the difference. Ie, you should only apply some patches. – artless noise Sep 12 '14 at 14:50

0 Answers0