Openvpn and tun.ko - Sony Ericsson XPERIA X10 Mini

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?

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

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