OpenVpn on samsung Galaxy S WI-FI G70 (yp-G70CB) - Samsung Galaxy Player 4.0, 5.0

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

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?

[HOWTO] Build custom kernel, libraries and applications on your own

For building own custom stuff for my Gen8 Device I set up an Ubuntu 10.10 32bit Virtual Machine, so everything in here refers to it, may be different on other linux system.
[disclaimer]This is only a HowTo, if you brick your android device with some custom kernels or other stuff, don't blame me! I'm not responsible for anything you do![/disclaimer]
Notice: ** = you only have to do this step once
Prerequisites for Ubuntu 10.10 32 Bit: **
Code:
# sudo apt-get install git-core flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl automake autoconf libtool gettext texinfo libmpfr1ldbl
Prepare environment: **
Code:
# mkdir -pv $HOME/{archos,bin}
# echo export ARCHOS=\$HOME/archos >> ~/.bashrc
# echo export PATH=\$HOME/bin:\$PATH >> ~/.bashrc
# cd $HOME/archos
# wget -Oavos_env.tgz http://archos-gen8-dvb.googlecode.com/files/avos_env_20110415.tgz
# tar xzf avos_env.tgz
# install -m755 cross $HOME/bin/
# rm -f cross avos_env.tgz
RESTART CONSOLE OR REBOOT COMPUTER!
Toolchain: **
Code:
# cd $ARCHOS
# make all
Configure kernel:
Code:
# cd $ARCHOS
# make kernel-config
Restore kernel config:
Code:
# cd $ARCHOS
# make kernel-reset
Build kernel:
Code:
# cd $ARCHOS
# make kernel-build
CrossCompile: (this is just an example for if you want to build some linux libraries or tools)
Code:
# echo $ARCHOS
# cd ..xyz../..zyx../
# cross make
I followed your instructions, and I got all the way to the end, but when I did 'make kernel-build' it ended with this:
drivers/built-in.o: In function `archos_dpm_suspend':
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/storage/archos_hdd.c:261: undefined reference to `usbsata_power'
make[3]: *** [.tmp_vmlinux1] Error 1
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2
[email protected]:~/archos$
This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
jbradshw said:
This is on a fresh install of Ubuntu 10.10 32-bit in Virtualbox. I installed it, updated the OS, then started your steps. Not sure if this is normal and I'm holding off on the last step. I did do one extra step: in 'make kernal-config' I deselected all the Archos boards under System Type except for the A101IT since that's what I have.
Click to expand...
Click to collapse
can you please try again without modifying kernel config?
Did that, now I get this:
CC [M] drivers/usb/musb/omap2430.o
/home/zyntax/archos/gen8-gpl-froyo/linux/drivers/usb/musb/omap2430.c:221: warning: 'omap_phy_read' defined but not used
LD [M] drivers/usb/musb/musb_hdrc.o
LD drivers/built-in.o
make[2]: *** [sub-make] Error 2
make[2]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/linux'
make[1]: *** [/home/zyntax/archos/gen8-gpl-froyo/buildroot//linux/arch/arm/boot/zImage] Error 2
make[1]: Leaving directory `/home/zyntax/archos/gen8-gpl-froyo/buildroot'
make: *** [kernel-build] Error 2
I don't believe I changed anything besides what I mentioned earlier. Is there anyway to get back a default kernel-config?
hehe, I thought you should try with default kernel-config
I added a section for restoring kernel config in the start posting :
chulri said:
[*]Restore kernel config:
Code:
# cd $ARCHOS
# tar xzf gen8-gpl-froyo.tgz gen8-gpl-froyo/linux/linux.config
Click to expand...
Click to collapse
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.
Thanks.
jbradshw said:
Well I did poke around in the config, but as far as I remember I only removed those extra archos systems. I'll restore the default and run it again later tonight.
Click to expand...
Click to collapse
You can't remove other devices (like A32, A101 etc) from Linux kernel config because Archos made bad dependencies for different parts of the kernel and even 70S requires some USB kernel code, it's only compiled when you choose A101 - so either you clean it up manually, or you are required to leave checked other archos devices :/
Thanks for this howto, this is gonna be useful for me, should be a sticky.
OK the make kernel-build worked without errors. Now I'm just questioning the command 'cd ..xyz../..zyx../' I don't have any files or directories called that, and running that reports the same. Can I just skip that and do the make cross?
@jbradshw that's just a sample if someone wants to crosscompile something (e.g. some linux library or application like linuxtv-dvb-apps or w_scan)
you don't have to do everything mentioned in the howto. it's a HowTo not a HaveTo
Ahh OK. So I guess I'm done then. I haven't installed the SDE on my Archos yet, but what's the final 'thing' that came out of this procedure that I'll be placing on the tablet?
Also I don't have an microSD card yet, and I know there was talk of putting stuff on there - can this be done using just the internal memory (8 GB for me)?
you have to install the SDE to install a custom kernel. follow this guide: http://forum.xda-developers.com/showthread.php?p=10157349#post10157349
Yeah I saw that guide, my question is where is the zImage and initramfs.cpio.gz that I assume was part of the compiling I just did? And also if a microSD card is needed for any of this?
no microsd is needed
initramfs.cpio.gz can be extracted from current installation ( /dev/mmcblk0p1 -> init ), read this: http://forum.xda-developers.com/showthread.php?t=880321&page=5
zImage is compiled at this location: $ARCHOS/gen8-gpl-froyo/buildroot/linux/arch/arm/boot/zImage
Shouldn't it be
Code:
cross make kernel-build
?
Here I have to use cross, which makes sense to find gcc arm binaries.
No you don't. In case of building stuff which comes with the gen8-gpl-froyo.tgz (e.g. kernel) the env vars are set up by the supplied makefiles
chulri said:
No you don't. In case of building stuff which comes with the gen8-gpl-froyo.tgz (e.g. kernel) the env vars are set up by the supplied makefiles
Click to expand...
Click to collapse
If I don't use cross, here is what I get:
[email protected]:~/archos$ make kernel-build
make -C gen8-gpl-froyo/linux mrproper
make[1]: arm-linux-gcc: Command not found
make[1]: Entering directory `/home/ubuntu/archos/gen8-gpl-froyo/linux'
make[3]: arm-linux-gcc: Command not found
But using cross it compiled fine, though I followed carefully your directions !
Apparently I was too frightened by the error messages, since it does work in the end
Thank you very much, hope some good things come from this !
Cheers !
desiresush said:
Apparently I was too frightened by the error messages, since it does work in the end
Click to expand...
Click to collapse
Yeah it's just an annoying bug, it doesn't hurt because "mrproper" only cleans the build directory and doesn't need compiler at all
2.6.29 kernel for Froyo?
Does anybody know, why Archos releases the SDK with a 2.6.29 kernel?
Shouldn't 2.2 Froyo be a 2.6.32 kernel?

[HOWTO] Compile modules for stock kernels

I couldn't figure out how to compile a module for stock kernel - I kept getting the following in dmesg:
Code:
<module>: disagrees about version of symbol module_layout
I sent a message to Samsung Open Source Release Center on Friday and received a very helpful response yesterday. Basically, c1_rev02_defconfig contains some debug options that are not set in the actual kernel. These are the options that should not be set in the config:
Code:
CONFIG_DEBUG_PREEMPT
CONFIG_DEBUG_RT_MUTEXES
CONFIG_DEBUG_SPINLOCK
CONFIG_DEBUG_MUTEXES
CONFIG_PROFILING
CONFIG_PERF_EVENTS
CONFIG_PERF_COUNTERS
CONFIG_LATENCYTOP
CONFIG_FTRACE
You can use the attached script to modify all these values (the script was also supplied by Samsung, although it was syntactically incorrect and a couple of modifications were necessary to make it work). I have included a copy of the c1_rev02_defconfig with these modifications.
Using this config, I was finally able to compile modules that can actually be loaded on the device
Kudos to Samsung for sending me this information.
Nice info I guess that will help out the people who had issues with kernel modules on stock ROMs...
jps1974 said:
Kudos to Samsung for sending me this information.
Click to expand...
Click to collapse
No, that is the stuff they should put on their server. Makes you wonder what else they haven't released. Every time they make modifications to the GPL open source code (eg. kernel) and release a new version, they must release the code, and the exact same files they used to build it.
Thanks
That was the info I missed. I have successfully compiled cifs for kf1.
Sent from my GT-I9100 using XDA App
You know guys if there is a basic tutorial available online?.
Thank you!
Hi, I am new to compile modules for android (new to compile kernel anyway)
thanks for your info and config, I am now able to compile modules.
I had a problem on the compiled modules tho, wonder can anyone please point me some direction?
when I insmod the ko, dmesg gives me:
xyz.ko : no symbol version for module_layout
Any hint?
more info, I am compiling like:
I am aiming on compiling to for stock ROM, uname -r > 2.6.35.7-I9100XWKDD-CL161513
- I read, and follow base on http://forum.xda-developers.com/showthread.php?t=1113191
- kernel source from: SHW-M250L kernel source from OSRC, https://opensource.samsung.com/
- .config file of this post, select my wanted modules using make menuconfig
- then make ARCH=arm CROSS_COMPILE=__MYPATH__/bin/arm-none-eabi- modules
Thanks!
Hi,
I'm using insecure kernel :
Code:
#uname -r
2.6.35.7-I9100XWKE2-CL187606
I cross compiled modules using your config file but each time I'm trying to insmod it, I have: failed (Exec format error)
and busybox insmod gives me a invalid module format error
I use the commands :
Code:
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- modules
So I don't really know where I'm wrong here
alx5962 said:
Hi,
I'm using insecure kernel :
Code:
#uname -r
2.6.35.7-I9100XWKE2-CL187606
I cross compiled modules using your config file but each time I'm trying to insmod it, I have: failed (Exec format error)
and busybox insmod gives me a invalid module format error
I use the commands :
Code:
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- menuconfig
make ARCH=arm CROSS_COMPILE=/opt/toolchains/arm-2009q3/bin/arm-none-linux-gnueabi- modules
So I don't really know where I'm wrong here
Click to expand...
Click to collapse
can you do a dmesg here?
I "think" I am on a same boat as you are on the error tho.....
I didn't checked dmesg, shame on me !
so the error is :
joydev: no symbol version for module_layout
I used your config file, do I need to fix config each time I update with menuconfig ?
alx5962 said:
I didn't checked dmesg, shame on me !
so the error is :
joydev: no symbol version for module_layout
I used your config file, do I need to fix config each time I update with menuconfig ?
Click to expand...
Click to collapse
dmesg is good to read, we are both compiling the same module (joydev)
the config file is not from me, is from jps1974.
no I don't think you need to fix unless you uses the build_kernel.sh unmod, since it cp the defconfig everytime, still I face the same problem...
Instead of SHW-M250L kernel source from OSRC, I just did a quick change to GT-I9100_HK_Opensource.zip
A little bit different on the package, but still the same work flow and results...
.config file:
cp ~/sgs2/9100i_hk/arch/arm/configs/c1_rev02_defconfig ~/sgs2/9100i_hk/kernel/.config
./fix_config.sh
make ARCH=arm CROSS_COMPILE=[PATH_TO_G++LITE_BIN] modules
compile without problem, but no luck, insmod still report:
insmod: init_module '/lib/modules/joydev.ko' failed (Exec format error)
dmesg | grep joy report:
joydev: no symbol version for module_layout
Any help, any directions?
Thanks in advance!!!
I used the european I9100 source from the samsung site and the config file from the opening post when I successfully compiled my modules.
Sent from my GT-I9100 using XDA App
richyy74 said:
I used the european I9100 source from the samsung site and the config file from the opening post when I successfully compiled my modules.
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
YES SIR, will do try this src next!!!!!
richyy74 would u mind share with us which kernel are you at on your phone?
and which version of toolchain u are using on the compile?
Thanks.
A bit of update, just try with GT-I9100_Opensource.zip, nope, still no luck........
I start to think would that be problem of toolchain (which in the readme of the zip from Samsung, they are using 2009q3 while I am using the current 2011 build), or it is possible problem because my/our unsecure kernel (2.6.35.7-I9100XWKDD-CL161513)...
update: Roll back on 2009q3, nope, no luck.............
I can only thinks that it is due to the kernel I am using.............
I compiled for ke7 and kf1 cifs, slow-work and cpu governor modules.
I used the 2009 gnu/linux toolchain from codesourcery /it ends with 67 something/
I never succeded with the version mentioned in the readme.
Sent from my GT-I9100 using XDA App
richyy74 said:
I compiled for ke7 and kf1 cifs, slow-work and cpu governor modules.
I used the 2009 gnu/linux toolchain from codesourcery /it ends with 67 something/
I never succeded with the version mentioned in the readme.
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
Thanks for your direction, will do more test after my "should have slept" 5 hours session.... which end up in data center instead of bed...
utp said:
Thanks for your direction, will do more test after my "should have slept" 5 hours session.... which end up in data center instead of bed...
Click to expand...
Click to collapse
The "exec format error" means that you compiled it for the wrong architecture.
To see which arch the kernel module was compiled for, use the "file" command (found on any Linux computer but not present on the phone itself).
The file command is an extremely useful function for identifying files.
So, at a terminal, type:
Code:
file -k /user/home/output/example.ko
It should output information on the file, which will clarify whether it was statically built, which architecture, etc. Examples:
Dynamically linked executable:
Code:
"ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped"
Statically linked executable:
Code:
"ELF 32-bit LSB executable, ARM, version 1 (SYSV), statically linked, stripped"
Object file:
Code:
"ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped"
Most importantly, if it doesn't say 32bit ARM, it will not work.
So the module I cross-compiled gives me :
joydev.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped.
So it was correctly compiled, I may need to try another toolchain.
Using Sourcery G++ Lite 2009q3-68 for ARM EABI toolchain, still have the issue.
So as I use an insecure kernel, I may need to ask the author what compiler he used for it.

[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] Building an app from source [limbo-android]

Hi,
I've wanted to use the app "limbo-android" ( https://code.google.com/p/limbo-android/ ) on my Intel Atom (x86) android tablet.
Unfortunatly, I have only found an apk for arm devices that crashes when I start a VM in the app. So, I have tried to build the app myself (I was following this https://code.google.com/p/limbo-android/source/browse/README ).
So far, I have downloaded the tools (SDK, NDK r8e, Eclipse + Eclipse Android plugin) and the source ( https://code.google.com/p/limbo-android/source/browse/ ) and unpacked all of it. After that, I have tried to follow the README file. So, i have competed steps 3, 4a, but I am stuck at point 4b. (I have also copied the NDK to /usr/local/bin because even when i have configured the right folders in step 3, it sayed something like ndk-build not found)
now with that done, if i type 'make' into the terminal, this is what i have got:
Code:
mkdir -p /home/sobotkama/limbo-android/jni/..//obj/local/x86/
rm -rf /home/sobotkama/limbo-android/jni/..//libs/armeabi ../libs/armeabi-v7a ../libs/x86 ../libs/mips \
mkdir -p /home/sobotkama/limbo-android/jni/..//libs/x86/
cd /home/sobotkama/limbo-android/jni/../ && ndk-build V=1 LIMBO_JNI_ROOT=/home/sobotkama/limbo-android/jni
make[1]: Entering directory `/home/sobotkama/limbo-android'
jni/Application.mk:10: ARCH_CFLAGS = -std=gnu99 -ffunction-sections -O3 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -finline-limit=300 -DANDROID_X86
jni/Application.mk:11: LOCAL_ARM_MODE =
jni/Application.mk:12: LOCAL_ARM_NEON =
jni/Application.mk:13: NDK_DEBUG =
jni/Application.mk:14: APP_OPTIM =
jni/Application.mk:15: APP_ABI = x86
/usr/local/bin/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist' function: ''. Stop.
make[1]: Leaving directory `/home/sobotkama/limbo-android'
make: *** [sdl] Error 2
Running both Ubuntu and Windows 8.1 on my PC, doing this on Ubuntu.
Any help like what should I do or is there anyone that would build it for me, please?
Thanks, Sobotkama
Anyone?

Categories

Resources