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?
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
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
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
i am ready to give answers for your question and douts about kernel compiling and rom compiling
i know its sometimes feel hard to find solution i know how its like so feel free to ask
This guy need help
http://forum.xda-developers.com/showthread.php?t=3397932
Sent from my SM-G361F
I'm getting this kernel error and in not sure why http://pastebin.com/3tHLAJGP. So I deleted the error in line 181 and ran into this error http://pastebin.com/bKnX70tQ. I'm on Ubuntu 16.04. I'm coming from 15.10 I've never ran into these errors. Not even on 14.04.
Sent from my SM-G900P using XDA-Developers mobile app
Problem when building mediatek kernel
Hello guys,
I'm facing a small problem when compiling the stock rom for my device from source, but the main problem is when compiling the kernel.
Well, the settings are the following:
Device: LG G Pro Lite (D683)
Android version: 4.4.2 (AOSP + LG official files)
Build environment: Fedora 23 (make 3.81), kernel 4.7.X.
//------------------------- (TRYING) BUILDING THE KERNEL -----------------
Steps:
Code:
-> $ cd /home/mauro.mascarenhas/Documents/Android_ROM
-> $ mkdir KERNEL
-> $ cd KERNEL
-> $ tar xvzf LGD683_GProLite_Kitkat_V20c_Kernel.tar.gz
-> $ PATH
-> $ PATH=$PATH:/home/mauro.mascarenhas/Documentos/Android_ROM/AOSP/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/
-> $ export PATH
-> $ ./mk muse77_phone_kk n k
After that I was supposed to have an output but I get lots of error messages in the beginning like this:
Code:
/bin/bash: scl: line 1: syntax error: premature end of file
/bin/bash: error when importing the definition to `BASH_FUNC_scl'
More details (logs) are on this post: http://forum.xda-developers.com/optimus-g-pro/d680-development/rom-genesisg3-1-0-t3183601/post67512342#post67512342
Since now,
thank you A LOT.