[Q] module_layout error? help - Android Q&A, Help & Troubleshooting

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

Related

Openvpn and tun.ko

I found a tun.ko here: http://forum.xda-developers.com/showthread.php?t=741182
I tried to apply, but:
Code:
D:\x10\ftool>adb shell
$ su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
#
Then I did dmesg:
Code:
.
.
.
<3>[ 5883.527575] tun: version magic '2.6.29-rel preempt mod_unload ARMv7 ' should be '2.6.29 preempt mod_unload ARMv6 '
So, I ssume the attached tun.ko is compiled for X10 mini(or x10) and not for X10 mini pro which has ARMv7 proc instead of ARMv6.
tun.ko should be built for Mini Pro.
Can anybody help where I can find the source of tun.ko and all the necessary source which I need for the compiling?
Any suggestion where to find desp. how to compile?
Hi, try this ... I compiled it for the X10 mini from eDream_2.0.A.0.504 sources. It's work for me (# insmod /system/lib/modules/tun.ko ), but OpenVPN restart my phone after this:
Code:
Thu Dec 9 15:20:22 2010 us=583828 Options error: Unrecognized option or missing parameter(s) in [PUSH-OPTIONS]:1: remote-gateway (2.1.1)
Thu Dec 9 15:20:22 2010 us=586573 OPTIONS IMPORT: timers and/or timeouts modified
Thu Dec 9 15:20:22 2010 us=587870 OPTIONS IMPORT: --ifconfig/up options modified
Thu Dec 9 15:20:22 2010 us=588996 OPTIONS IMPORT: route options modified
Maybe you have better luck
P.S. I use OpenVPN installer and OpenVPN settings from Market.
How did you manage to compile it?
If i try it with the 2.1 source and the toolchain of the Android-Git repo it seams to build for ARMv7 which should be ARMv6. How to change that?

Cifs.ko - Error mounting Network Folder

Ola!
This is my first post on this forum and I would like to thanks the moderators for the quality and organization of the information posted on this Forum.
My Phone:
Galaxy S3
Android 4.0.4
Kernel: 3.0.15
Base: I9300UBLF2
Problem:
When I try to mount a network path I receive one message saying that device does not exist, after reading some posts and googleing on this subject, I find out that I would need to load cifs.ko module. I tried a some versions that I foung on Internet but everyone that I tried replied this erros:
[email protected]:/sdcard/Bluetooth # insmod cifs.ko
insmod: init_module 'cifs.ko' failed (Exec format error)
I believe that this is because I would need one compilation for my kernel, am I right? Does anyone can help me to find the correct compilation for my phone or even more, help me with instructions to compile it on the phone?
Thanks and I appreciate your help!
Sidney
Not allowed to post
Unfortunately, because I am a new member on the forum I can't post to developers as the agreed terms and conditions.
On this forum, http://forum.xda-developers.com/showthread.php?t=1697982&page=3 viuliam user is receiveing kernel information to make cifs.ko compatible with new kernels.
He is asking to run this 2 commands and post in that forum, than he will work on that.
Code:
cat /proc/kallsyms | grep -A 1 check_version
Code:
uname -a
Here are my information:
My Phone:
Galaxy S3
Android 4.0.4
Kernel: 3.0.15
Base: I9300UBLF2
Code
Code:
[email protected]:/data/local # cat /proc/kallsyms | grep -A 1 check_version
c00b5248 t check_version
c00b5318 t get_modinfo
--
c03cd574 t picolcd_check_version
c03cd64c t picolcd_probe
[email protected]:/data/local # uname -a
Linux localhost 3.0.15-679767-user #1 SMP PREEMPT Wed Jun 6 15:43:48 KST 2012 armv7l GNU/Linux
[email protected]:/data/local #
I appreciate if some administrator may send this info to viulian
viulian, congratulations about your work!
Regards

[Q] FTDI USB-RS232 for Trekstore Surftab breeze 7.0

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.

[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

Compiling modules

Hi everybody!
I have one of those android sticks mainly for IPTV and games.
The device I have has a serious lack of WIFI, but no WIFI dongle that I have works out of the box.
Searched the internet in how to get the dongles working on Android, but I have the MK808C device that uses the AllWinner CPU so there aren't any custom roms.
No problem here, just bougth a ethernet USB adapter and it works without a problem.
In the last weeks I installed several flavours of linux using the wonderful Linux Deploy tool, and been playing with them.
I saw that I could compile the modules that I needed and ismod them. At least the wireless cards would work in linux, but no dice there either.
I got the drivers source from the internet, and when trying to compile it says that I do not have the linux-headers (and probably the linux-images):
Code:
[email protected]:~/RT3070_LinuxSTA_V2.3.0.1_20100208$ make
make -C tools
make[1]: Entering directory `/home/android/RT3070_LinuxSTA_V2.3.0.1_20100208/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/android/RT3070_LinuxSTA_V2.3.0.1_20100208/tools'
/home/android/RT3070_LinuxSTA_V2.3.0.1_20100208/tools/bin2h
cp -f os/linux/Makefile.6 /home/android/RT3070_LinuxSTA_V2.3.0.1_20100208/os/linux/Makefile
make -C /lib/modules/3.3.0/build SUBDIRS=/home/android/RT3070_LinuxSTA_V2.3.0.1_20100208/os/linux modules
make: *** /lib/modules/3.3.0/build: No such file or directory. Stop.
make: *** [LINUX] Error 2
I've been searching for the linux headers of my kernel version, but i've not been able to find it.
Code:
[email protected]:~$ uname -a
Linux localhost 3.3.0 #15 SMP PREEMPT Fri Dec 6 21:02:12 CST 2013 armv7l armv7l armv7l GNU/Linux
Again I cannot change the kernel version since there are no costum ROM's for my device.
Half of the searched that I make lead to this forum, but I cannot find a solution to my problem, so I decided to post this in hope that someone can help me.
Thank you.
Cesar

Categories

Resources