Problem with modules compilation for 3.0.8 - Miscellaneous Android Development

Hi,
I've got problem with building Android kernel modules. I'm using GoClever A73 with Android ICS (4.0.3, kernel 3.0.8) for Eken T02 (both are Allwinner A10 based). I'm trying to compile modules for this kernel. Module I've found in Android has following modinfo:
Code:
filename: /home/sid/usbnet.ko
license: GPL
description: USB network driver framework
author: David Brownell
depends:
vermagic: 3.0.8+ preempt mod_unload modversions ARMv7
parm: msg_level:Override default message level (int)
And file:
Code:
/home/sid/usbnet.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
I'm using sources from github: madprogrammer/linux-aurora . I want to build for example usbserial.ko and pl2303.ko. I've built module with modinfo:
Code:
filename: drivers/usb/serial/usbserial.ko
license: GPL
description: USB Serial Driver core
author: Greg Kroah-Hartman, [email protected],
depends:
vermagic: 3.0.8+ preempt mod_unload modversions ARMv7
parm: vendor:User specified USB idVendor (ushort)
parm: product:User specified USB idProduct (ushort)
parm: debug:Debug enabled or not (bool)
Code:
drivers/usb/serial/usbserial.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
But when I'm trying to insmod module I've got Exec format error. There is a line:
Code:
usbserial: no symbol version for module_layout
strace says:
Code:
(...)
init_module(" ELF", 0xb634) = -1 ENOEXEC (Exec format error)
(...)
I'm think that there are some config values set in wrong way but haven't idea which.
There is .config in attachement. (Unfortunetely kernel running on Android doesn't provide config through /proc).
Have You got any idea where I made mistake?
Thanks

sorry buddy, I have no answer for you, but if you manage to build kernel, please post it here... thanks!

There is an SlateDroid post that might help you out.
I still can't post outside links, so ...
www dot slatedroid dot com
+
/topic/27852-generic-usb-serial-gps-hal-driver/page__view__findpost__p__344837
Regards,
Rodrigo

Related

[Q] How to compile kernel module for ARMv7?

Hi, I'm trying to build the tun module for VPN, but I can't load it because it seems my toolchain only builds for ARMv6.
Code:
tun: version magic '2.6.32.15-gf9c0527 preempt mod_unload ARMv6 ' should be '2.6.32.15-gf9c0527 preempt mod_unload ARMv7 '
Toolchains tested:
- android-ndk-r4b-linux-x86.zip
- arm-2010q1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2.tar
What I did:
- downloaded 2.6.32.15 from kernel.org
- adb pulled config.gz from running android kernel, unpacked and moved it to .config
- export PATH=$PATH:/path/to/toolchain
- make ARCH=arm CROSS_COMPILE=$mytoolchain oldconfig
- make ARCH=arm CROSS_COMPILE=$mytoolchain menuconfig -> tuned version information and enabled tun module
- make ARCH=arm CROSS_COMPILE=$mytoolchain
- adb push drivers/net/tun.ko ...
insmod failes.
So what am I missing? Is the original HTC kernel somewhat otherwise patched? HTC doesn't seem to have released the 2.6.32.15 sources yet...whatever.
Thanks for any hints
Try the ndk toolchain or the prebuilt one in aosp. Use the 4.4.0 one.
Already tried the 4.4.0 one, same with the aosp toolchain from git.
I do think the stock 2.6.32.15 kernel is missing something (HTC patches?).
It's noticeable that some symbols like CONFIG_CPU_32v7 are not there when run oldconfig / menuconfig related to the original /proc/config.gz.
Already seen this in some custom Roms (module not loadable because of version mismatch), so has anyone built a functional (so loadable) module for HTC's Froyo Kernel? And if, how?
OK, very very dirty:
Get 2.6.32 from Android Kernel's git.
Code:
adb pull /proc/config.gz
gunzip -c config.gz > .config
make ARCH=arm CROSS_COMPILE=arm-none-eabi- menuconfig
## enable tun/tap module and append correct localversion ##
sed 's/EXTRAVERSION = .9/EXTRAVERSION = .15/g' Makefile #ouch
make ARCH=arm CROSS_COMPILE=arm-none-eabi- modules
adb push drivers/net/tun.ko ... and so on

can't install tun.ko to my galaxy tab

Hi,
I need vpn connection to cisco vpn server so i have tried to install corresponding soft to my galaxy tab. Finally I am stopped with following problem:
I try to follow this: http://forum.xda-developers.com/showthread.php?t=1013513
But when I input
"insmod tun.ko" I receives:
tun: version magic '2.6.32.9 SMP preempt mod_unload modversions ARMv7 ' should be '2.6.32.9 preempt mod_unload ARMv7 '
My kernel version is 2.6.32.9 ([email protected] #1)
Build number is FROYO.XWKB8
Microcode version is 2.2.1
Where can I find correct version of tun.ko?
Thanks.
Sorry for bad English

Problem installing modules for galaxy tab 2 7.0 GT-P6200

Hi,
I am trying to compile ftdio_sio.ko and usbserial.ko modules for the samsung galaxy tab without succes. I get error when installing the modules:
Code:
# insmod ftdi_sio.ko
insmod: init_module 'ftdi_sio.ko' failed (Exec format error)
And this dmesg message:
Code:
# dmesg
ftdi_sio: no symbol version for module_layout
I think that the problem is that I generating the modules with differente kernel version:
This is the stock kernel version (uname -a): 2.6.36-P6200XXKL7-CL604659 #3 SMP PREEMPT armv7l
And this is what I have in my modules (strings drivers/usb/serial/ftdi_sio.ko | grep vermagic):
The differences are the #3 and the armv7l instead of ARMv7.
¿How can y solve my problem? ¿Is a .config problem?
Thank you.

Bluetooth driver for vermagic=3.0.8 preempt mod_unload modversions ARMv7

Can anyone copy files or compile for bluetooth usb adapter for Chinese Tablet and serial fdti?
I try too install two file but i have problem:
- one have wrong vermagic "vermagic=3.0.8+ SMP preempt mod_unload ARMv7"
- second one "Exec format error" disagrees about version of symbol module_layout
My tablet have:
- Android 4.0.3 (kernel 3.0.8)
- CPU ARMv7 rev2 (v7l)
- Hardware sun5i
- vermagic=3.0.8 preempt mod_unload modversions ARMv7
I think Allwinner A10 have the same configuration.

samba compile issue

I'm compiling samba-3.6.22 for android with the sourcery arm-2010q1 compiler. The compile itself goes fine, but when I copy smbd to my device it's not recognized as a binary. I get the error
Code:
sh: ./smbd: No such file or directory
file under linux tells me:
Code:
smbd: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
What am I overlooking?

Categories

Resources