[Q] FTDI USB-RS232 for Trekstore Surftab breeze 7.0 - Android Q&A, Help & Troubleshooting

Hello,
I'm trying to connect the Trekstore Surftab breeze 7.0 with a FTDI USB-RS232 Converter.
So, this are the facts:
The tablet is rooted by default, has an Allwinner A13 CPU (sun5i), comes with android 4.0.4 and kernel 3.0.8+.
I thought about downloading the kernel sources, build the single modules usbserial.ko + ftdi_sio.ko and load them manually.
But something seems to be wrong in my solution. Because insmod tells me:
Code:
init_module 'usbserial.ko' failed (Exec format error)
.
I got the same error message loading the ftdi_sio.ko module.
I've done these steps:
First, I downloaded the sources from github (amery/linux-allwinner/tree/wip/lichee3-sunxi/import-sun5i).
Maybe this is the first mistake (wrong kernel sources? repository kernel source is 3.0.8)
Secondly, I downloaded CodeSourcery to compile the kernel for the sun5i architecture. I set the following system variables:
The PATH variable to the compiler binaries and the ARCH variable to "arm".
Via menuconfig I selected the system type: AllWinner SUN5I Platform. Hopefully this are all steps I need for preparation to build the module.
Last but not least I compiled and linked the usb serial sources by executing:
Code:
make M=drivers/usb/serial
from the kernel directory. This builds all modules in the directory, including usbserial.ko and ftdi_sio.ko.
Modinfo shows me:
Code:
filename: drivers/usb/serial/usbserial.ko
license: GPL
description: USB Serial Driver core
author: Greg Kroah-Hartman
srcversion: F0784B79C15C3FAAAF12C46
depends:
vermagic: 3.0.8 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:
filename: drivers/usb/serial/ftdi_sio.ko
license: GPL
description: USB FTDI Serial Converters Driver
author: Greg Kroah-Hartman <>, Bill Ryder <>, Kuba Ober <>, Andreas Mohr, Johan Hovold <>
srcversion: A3E1F08290F6997001373D4
alias: usb:v0483p3747d*dc*dsc*dp*ic*isc*ip*
alias: usb:v20B7p0713d*dc*dsc*dp*ic*isc*ip*
alias: usb:v0403p9868d*dc*dsc*dp*ic*isc*ip*
.....
alias: usb:v0403pF60Bd*dc*dsc*dp*ic*isc*ip*
alias: usb:v0403pF608d*dc*dsc*dp*ic*isc*ip*
depends: usbserial
vermagic: 3.0.8 mod_unload modversions ARMv7
parm: debug:Debug enabled or not (bool)
parm: vendor:User specified vendor ID (default=0x0403) (ushort)
parm: product:User specified product ID (ushort)
parm: ndi_latency_timer:NDI device latency timer override (int)
I copied both modules using adb push command and tried to insert the modules by using adb shell -> insmod...
But then I get the error described above:
Code:
init_module 'usbserial.ko' failed (Exec format error)
Same for the ftdi module driver.
With the help of dmesg I got:
Code:
usbserial: no symbol version for module_layout
Am I completly wrong in the way of building the drivers? Do I need other kernel sources? Or do I have to set a special symbol anywhere?
I would be pleased if anybody can give an advice.
Thanks in advance,
ssw

Were you able to resolve this?
Can you attach the usbserial.ko?
It's possible that the problem lies with the linux source version.

Related

OpenVpn on samsung Galaxy S WI-FI G70 (yp-G70CB)

Hi i have samsung YP-G70
i have been into kernel modules few days but without luck, i need help with compiling TUN.KO
Linux localhost 2.6.35.7-G70XWKP2-CL580645 #2 PREEMPT
Fri Sep 16 11:44:47 KST 20
11 armv7l GNU/Linux
at least i need 2.6.35.7 SDK for yp-g70
i tryied one from opensource.samsung but its for different kernel
I downloaded the kernel source tarball from opensource.samsung.com yesterday and it is the same version as you list above (YP-G70-WW_GB_Opensource.zip).
What version are you seeing?
Also what does "uname -r" give you on the device, as that extra stuff tacked on the end of the kernel version may cause you problems when you create a new kernel + modules (otoh it may not), in which case you'll need to afair modify the kernel Makefile to tack the extra characters on so the module and kernel versions match.
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 35
EXTRAVERSION = .7
NAME =Yokohama
this is original makefile
uname -r gives me
2.6.35.7-G70XWKP2-CL580645
then this is how it will looks like ?
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 35
EXTRAVERSION = .7-G70XWKP2-CL580645
NAME =Yokohama
sorry for stupid question but i'm destroyed from compiling again and again modules 2 day in a row
Yes exactly.
Presumably you''ve also run "make menuconfig" (after either adjusting the Makefile's ARCH and CROSSCOMPILER variables in the file, or by passing them on the command line along with the make command) to enable tun and make sure that anything it requires is also enabled?
Once you've done that I'd expect you're ready to go. If you get kernel oopses then we can work out what's wrong from there.
my step-by-step
i downloaded arm-2011.09-70-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
downloaded YP-G70-WW_GB_Opensource.zip
exported paths and stuff
then vi Makefile
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 35
EXTRAVERSION = .7-G70XWKP2-CL580645
NAME = Yokohama
then make menuconfig
selected tun as module
then make modules
downloaded tun.ko, tun.o to tab
insmod tun.ko
and at this step tab show me an error
insmod: init_module 'tun.ko' failed (Exec format error)
insmod: init_module 'tun.o' failed (Exec format error)
insmod tun.ko
insmod: init_module 'tun.ko' failed (Exec format error)
# uname -r
uname -r
2.6.35.7-G70XWKP2-CL580645
Are you sure that's the right cross-compiler version, because I think you need an older version... (check the README in the kernel source tarball for the exact version.)
hmm then this is what i need
1. Visit codesourcery, download and install Sourcery G++ Lite 2009q3-68 toolchain for ARM EABI.
but on their site, they have only new release
can you help me with this ?
ok i found exatly that version mentioned in README
but now make modules give me error
/bin/sh: /opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi-gcc: No such file or directory
make[1]: *** [kernel/bounds.s] Error 1
hmm it looks like its because in .../bin/ there is only arm-none-eabi-gcc
ok i found line in Makefile and edited it to
CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-eabi-
now ist completed
i now going to test it on tab
Fluffinko said:
ok i found line in Makefile and edited it to
CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-eabi-
now ist completed
i now going to test it on tab
Click to expand...
Click to collapse
same error
insmod tun.ko
insmod: init_module 'tun.ko' failed (Exec format error)
i give up 0:08 , i tried diferent crosscompiler , many setting but without luck, i hope that some of you can help me.
after i succcessfully compile tun.ko i post it here for you guys
See what dmesg says about the module not loading.
Are you sure you need to compile the module? I've just looked at menuconfig for the device and it seems to have TUN/TAP enabled (built-in rather than a module)
I'm using the YP-G70-WW_GB_Kernel source and the venturi_eur_defconfig config as specified in the kernel source README.
lardman said:
See what dmesg says about the module not loading.
Are you sure you need to compile the module? I've just looked at menuconfig for the device and it seems to have TUN/TAP enabled (built-in rather than a module)
I'm using the YP-G70-WW_GB_Kernel source and the venturi_eur_defconfig config as specified in the kernel source README.
Click to expand...
Click to collapse
in dmesg there is no error
i see in /dev/ there is tun & dun device
but how to use it with open vpn ?
maybe related to another problem, i tryed on tab
INSMOD (module that is loaded) and it gave me same problem,
i think this can be related to busybox, i tried different versions but it will show me same error message, is there any other way to load module ?
OPENVPN
yes i have right, busybox is problem with modprobe and stuff i have found workaround
after 10h testing and reading manuals....
VPN.sh
------------------------------------------------------------
su -c "PATH=/system/xbin:$PATH" - #path for ifconfig
su -c "mkdir /dev/net" - #fixing tunctl problems
su -c "ln -s /dev/tun /dev/net/tun" - #linking tunctl for new location
su -c "tunctl" - # create tap0 device
su -c "ifconfig tap0 192.168.1.222" - # set manual IP for tap0 device
su -c "openvpn /sdcard/openvpn/config/FlamcoNet.ovpn" - # openvpn config
------------------------------------------------------------
there is problem with open vpn, it have problem assigning DHCP ip address to tap0
i don't know why

[Q] Odys Xelio: usbserial.ko

Hi
I'm trying to compile usbserial.ko for the Odys Xelio (Allwinner A10 based Tablet). I'm usind this kernel sources: http://forum.xda-developers.com/showpost.php?p=25978796&postcount=121. According to a german android forum, these are the recommended sources.
I am able to compile usbserial.ko. The vermagic and the file signature are identical with the already existing modules.
Code:
vermagic: 3.0.8+ preempt mod_unload modversions ARMv7
file:
ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
When I try to insmod the module i get this dmesg error:
Code:
<4>[22084.030000] usbserial: Unknown symbol usb_autopm_put_interface (err 0)
<4>[22084.050000] usbserial: Unknown symbol __stack_chk_guard (err 0)
<4>[22084.060000] usbserial: Unknown symbol kmem_cache_alloc_trace (err 0)
<4>[22084.080000] usbserial: Unknown symbol __stack_chk_fail (err 0)
<4>[22084.080000] usbserial: Unknown symbol __tracepoint_module_get (err 0)
<4>[22084.100000] usbserial: Unknown symbol usb_autopm_get_interface (err 0)
<4>[22084.110000] usbserial: Unknown symbol __gnu_mcount_nc (err 0)
(This errors show also up as warnings durring the module compilation)
After some research I tryed to compile usbcore.ko, but I do not know how to get this module. I tryed to select "Drivers -> USB -> USB Host" as module (M) in the kernel menuconfig. But this does not help.
Can anyone help me?
Is the missing usbcore.ko causing the error when loading usbserial.ko or is it a different problem? (The device has already USB OTG/Host features - I can connect a mouse or an USB stick)
What do I have to change in the kernel config so that I get usbcore.ko?
Thanks.
lfrst05 said:
<4>[22084.060000] usbserial: Unknown symbol kmem_cache_alloc_trace (err 0)
Click to expand...
Click to collapse
I get same error when I try to load cfg80211.ko module that I cross-compiled using compat-wireless-3.6.8-1
Code:
cfg80211: Unknown symbol kmem_cache_alloc_trace (err 0)
What do I have to do? Do I need to recompile kernel or is there a variable to set before make command to not use kmem_cache_alloc_trace function?
Android version:
4.1.2
CyanogenMod Version:
10-20121202-UNOFFICIAL-ac100
Kernel Version:
3.1.10+
[email protected] #1
Sun Dec 2 15:23:02 MSK 2012
GCC version:
arm-linux-androideabi-gcc (GCC) 4.6 20120106 (prerelease)
Copyright (C) 2011 Free Software Foundation, Inc.

[Q] Kernel Module Compiling Versioning..

I need help guys, I'm really new to this kernel compiling thing (I'm not really even a software engineer..) But anyway, so I have this mini wireless keyboard + mouse I'm trying to get to work on my MK802 II (Allwinner A10). From plugging the wireless dongle into my linux machine, I did an lsmod and determined the drivers to be hid-ortek.ko. And this driver happens to be absent on the MK802 II.
I set up my ubuntu with android sdk and ndk and all the other prereqs from thousands of other sites from googling.
Then I git cloned the Allwinner A10 kernel source from : https://github.com/amery/linux-allwinner and checked out the lichee 3.0.8+ to match the kernel version on my MK802 II.
So then I started off with:
Code:
make ARCH=arm sun4i_defconfig
make ARCH=arm menuconfig
And then I selected Ortek keyboard drivers from the UI and marked it as 'm'.
Because apparently Module.symver is only generated if you do a complete kernel build.. so I did
Code:
make ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- all
And Module.symver is created after this step.
But I looked in the ./drivers/hid folder to see if hid-ortek.ko was compiled and apparently not
so then I did:
Code:
make ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- M=./drivers/hid modules
And my "hid-ortek.ko" was still not created. The output from this was:
Code:
Building modules, stage 2.
MODPOST 0 modules
So I googled up tutorials and created a Makefile that looked like this:
Code:
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 8
EXTRAVERSION =
obj-m += hid-ortek.o
KDIR=~/Documents/linux-allwinner
PWD := $(pwd)
default:
make -C $(KDIR) ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- SUBDIRS=$(PWD) modules
clean:
make -C $(KDIR) ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- SUBDIRS=$(PWD) clean
and did a make, that did the trick and hid-ortek.ko was created
So I did the adb push into my MK802 (into /system/vendor/modules folder) and tried insmod it.. but I kept getting
Code:
insmod: init_module 'hid-ortek.ko' failed (Exec format error)
and dmesg tells me that there is "no symbol version for module_layout". Which according to googling around means that Module.symver wasn't generated so I have to do a full build, but I did and I saw Module.symver generated in my kernel source directory. I did a modinfo on the compiled hid-ortek.ko and it shows
Code:
3.0.8+ preempt mod_unload modversions ARMv7
Which should be right. I did a modinfo on the other modules already loaded on the device and shows the exact same thing.
What am I doing wrong here? Please help.
Thanks!
chen_tso said:
I need help guys, I'm really new to this kernel compiling thing (I'm not really even a software engineer..) But anyway, so I have this mini wireless keyboard + mouse I'm trying to get to work on my MK802 II (Allwinner A10). From plugging the wireless dongle into my linux machine, I did an lsmod and determined the drivers to be hid-ortek.ko. And this driver happens to be absent on the MK802 II.
I set up my ubuntu with android sdk and ndk and all the other prereqs from thousands of other sites from googling.
Then I git cloned the Allwinner A10 kernel source from : https://github.com/amery/linux-allwinner and checked out the lichee 3.0.8+ to match the kernel version on my MK802 II.
So then I started off with:
Code:
make ARCH=arm sun4i_defconfig
make ARCH=arm menuconfig
And then I selected Ortek keyboard drivers from the UI and marked it as 'm'.
Because apparently Module.symver is only generated if you do a complete kernel build.. so I did
Code:
make ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- all
And Module.symver is created after this step.
But I looked in the ./drivers/hid folder to see if hid-ortek.ko was compiled and apparently not
so then I did:
Code:
make ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- M=./drivers/hid modules
And my "hid-ortek.ko" was still not created. The output from this was:
Code:
Building modules, stage 2.
MODPOST 0 modules
So I googled up tutorials and created a Makefile that looked like this:
Code:
VERSION = 3
PATCHLEVEL = 0
SUBLEVEL = 8
EXTRAVERSION =
obj-m += hid-ortek.o
KDIR=~/Documents/linux-allwinner
PWD := $(pwd)
default:
make -C $(KDIR) ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- SUBDIRS=$(PWD) modules
clean:
make -C $(KDIR) ARCH=arm CROSS_COMPILE=~/Downloads/android-ndk-r8b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi- SUBDIRS=$(PWD) clean
and did a make, that did the trick and hid-ortek.ko was created
So I did the adb push into my MK802 (into /system/vendor/modules folder) and tried insmod it.. but I kept getting
Code:
insmod: init_module 'hid-ortek.ko' failed (Exec format error)
and dmesg tells me that there is "no symbol version for module_layout". Which according to googling around means that Module.symver wasn't generated so I have to do a full build, but I did and I saw Module.symver generated in my kernel source directory. I did a modinfo on the compiled hid-ortek.ko and it shows
Code:
3.0.8+ preempt mod_unload modversions ARMv7
Which should be right. I did a modinfo on the other modules already loaded on the device and shows the exact same thing.
What am I doing wrong here? Please help.
Thanks!
Click to expand...
Click to collapse
Did you change the kernel itself ?
'no symbol version for module_layout'
Hello, I have the exact same issue (but using kernel "2.6.36-android+")
did you find a solution?
Im also in the same boat guys...
mat23452345 said:
Hello, I have the exact same issue (but using kernel "2.6.36-android+")
did you find a solution?
Click to expand...
Click to collapse
Im buiding kernel for goodix touch drivers as im currently modding a LY-F1 JB ROM which uses a focaltouch touchscreen. but a full build is not enabling the modules and gives a exec error. Maybe it has something to do with ur extra version variable. change EXTRAVERSION = to "EXTRAVERSION =+" and do a build and tell me what happens. Im out so cant really test it.
cybermate123 said:
change EXTRAVERSION = to "EXTRAVERSION =+" and do a build and tell me what happens.
Click to expand...
Click to collapse
Thanks for the reply, but that tablet has crashed and gone now. I will bear that in mind for the future...

[Q] Compiling modules to existing stock kernel

I'm currently at stock rom JB 4.1.2 with kernel 3.0.31-566833.
For my previous rom JB 4.1.1, I've used cifs module from:
http://forum.xda-developers.com/showthread.php?t=1697982&page=6
I want to compile cifs and nfs modules, so I've donwloaded: arm-eabi for linux 4.4.3 toolchain, kernel source from: opensouce.samsung.com (GT-I9300_JB_Opensource_Update6.zip).
Then I've configured CROSS_COMPILE, arch and extraversion -566833, configured kernel as written in README attached for kernel source.
After insmod I've got exec format error. It's compiled correctly, so either wrong modversion (modinfo shows correct version) or wrong source. But There's only info, its's 3.0.31 kernel, so I don't know how to check if I'm compiling from exact the same kernel tree, that stock JB 4.1.2 kernel.
What should I do to compile working modules?
http://forum.xda-developers.com/showthread.php?t=1697982&page=6
Code:
filename: /mnt/sdcard/Download/mod/../modules/md4.ko
description: MD4 Message Digest Algorithm
license: GPL
depends:
vermagic: 3.0.31-204919 SMP preempt mod_unload modversions ARMv7 p2v8
My module:
Code:
filename: /mnt/sdcard/Download/mod/md4.ko
description: MD4 Message Digest Algorithm
license: GPL
depends:
vermagic: 3.0.31-566833 SMP preempt mod_unload modversions ARMv7 p2v8
Version magic looks the same, but:
insmod: init_module 'md4.ko' failed (Exec format error)
I've got the same problem when trying to insmod my module. Did you find any solutions ? What does dmesg say after the insmod command ?
It show me an error about a wrong "module_layout" but even if I correct it , the problem stay

[Q] module_layout error? help

Been trying for a few days to compile my own module for Geniatech ATV120 (same kernel as ATV1200), I've gotten as far as compile the modules and first I got Exec Error, but after making the changes to get the exact kernel version I now get “disagrees about version of symbol module_layout” so I wanted to know how the hid-sony.ko made by @fma965 (on this thread http://forum.xda-developers.com/showthread.php?t=2262421) since it works perfectly on my atv120, so I did this:
modinfo hid-sony.ko and I got this
filename: hid-sony.ko
license: GPL
alias: hid:b0003v0000054Cp0000024B
alias: hid:b0005v0000054Cp00000268
alias: hid:b0003v0000054Cp0000042F
alias: hid:b0003v0000054Cp00000268
depends:
vermagic: 3.0.8-g525c782 SMP preempt mod_unload modversions ARMv7
I did the same for my module
filename: joydev.ko
license: GPL
description: Joystick device interfaces
author: Vojtech Pavlik <[email protected]>
alias: input:b*v*p*e*-e*1,*k*2C0,*r*a*m*l*s*f*w*
alias: input:b*v*p*e*-e*1,*k*130,*r*a*m*l*s*f*w*
alias: input:b*v*p*e*-e*1,*k*120,*r*a*m*l*s*f*w*
alias: input:b*v*p*e*-e*3,*k*r*a*6,*m*l*s*f*w*
alias: input:b*v*p*e*-e*3,*k*r*a*8,*m*l*s*f*w*
alias: input:b*v*p*e*-e*3,*k*r*a*0,*m*l*s*f*w*
depends:
vermagic: 3.0.8-g525c782 SMP preempt mod_unload modversions ARMv7
so everything seem correct, when to load it with insmod on my ATV120 and I got the “disagrees about version of symbol module_layout” error
ok, back to ubuntu. ran this:
modprobe --dump-modversions hid-sony.ko
0x4e362f07 module_layout
I noticed the module layout so I ran the same on my module
modprobe --dump-modversions joydev.ko
0x82bedd05 module_layout
that seems to be my problem, I know nothing about module layouts, but doing some google research I found I need the same Module.symvers but for the life of me I just cannot get the same one, seeing as @fma965 you are the only one that has been able to compile a module with this kernel, do you still have thie Module.symvers? or can you tell me what kernel you used? or anybody else have any info I could use?
Thanks!
hi i haven't had time to read all this but wanted to reply asap, i no longer have the kernel source nor any associated files, i can't even remember how i did it, sorry for the lack of help as i was hoping to give helpful information.
fma965 said:
hi i haven't had time to read all this but wanted to reply asap, i no longer have the kernel source nor any associated files, i can't even remember how i did it, sorry for the lack of help as i was hoping to give helpful information.
Click to expand...
Click to collapse
hey, no problem Thanks for the reply!
happy holidays

Categories

Resources