[GT-P6800][3g]cifs.ko - module - Galaxy Tab 7.7 Android Development

Cifs.ko module for galaxy tab 7.7 for stock galaxy kernel.
EDIT - pinkowl has updated the cifs module with nls_utf8 support.
Please see use his updated download link from post 12.
cheers
Should allow mounting of windows/samba shares.
from terminal (connectbot, script etc)
$ insmod cifs.ko (where you saved cifs.ko path)
Please could you test. For me it is working. however a few issues:
but video players stutter but so far bs player lite works best me for media network streaming.
edit - is it down to poor wifi performance - however same files play fine over http streaming from nas!
so proper dev required to looked into performance issues.
Using cifs manager to mount share & es explorer free edition allows you to copy to root etc.

Looks good to me ~8mins for 501M (what are you aiming for?):
P6810(wifi), RTN-16 router,Fedora16 samba share
bash-4.2# insmod cifs.ko
bash-4.2# mount -t cifs -o user=XXX,passwd=XXXXXX //192.168.2.113/XXX /data/local/tmp/mnt
bash-4.2# pwd
/data/local/tmp
bash-4.2# cd mnt
bash-4.2# ls
Desktop
Documents
Downloads
Music
Pictures
Public
Templates
Videos
eclipse
workspace
bash-4.2# time cp /data/local/tmp/junk_1 junk_1_back
real 8m20.644s
user 0m0.275s
sys 0m35.175s
bash-4.2# time cp junk_1_back /data/local/tmp/junk_2
real 7m46.706s
user 0m0.240s
sys 0m24.630s
bash-4.2#bash-4.2# md5sum ../junk_2
b6cee9135f8f4fd8ed03bfcc641de7b1 ../junk_2
bash-4.2# md5sum ../junk_1
b6cee9135f8f4fd8ed03bfcc641de7b1 ../junk_1
bash-4.2#
bash-4.2# ls -l ../junk*
-rw-rw-r-- root root 524288000 2012-01-22 03:42 junk_1
-rw-r--r-- root root 524288000 2012-01-22 04:35 junk_2

Awesome - worked perfectly with the root pack from this forum as well.
Now.... do you have tun.ko for this tab as well please?
Ive found a couple of versions - but they have not been compiled for this rom from the looks and do not load correctly.
Is the tun.ko file available at all yet?

Did another run with some optimisations:
Locked router to N mode instead of mixed
Discovered busybox cp poor performer, used /system/bin/cat instead
Tried kernel setting on
echo 1 > /proc/sys/net/ipv4/tcp_low_latency
Which definitely helps my ssh session, but not sure much impact on this test.
#same 501M file as previous post
#copy server to 7.7
time cat junk_1_back > ../junk_1_47
real 6m52.908s
user 0m0.240s
sys 0m24.390s
#copy from 7.7 to server
bash-4.2# time cat ../junk_1 > junk_1_xxx5
real 3m35.079s
user 0m0.040s
sys 0m19.890s
#copy server to /dev/null on 7.7
bash-4.2# time cat junk_1_xxx3 > /dev/null
real 6m45.223s
user 0m0.115s
sys 0m15.695s
All files intact, I think your module is good, I think kernel tcp params or wireless may need tweaks as suspected in wireless problem thread.
---------- Post added at 11:29 AM ---------- Previous post was at 11:17 AM ----------
cbdrift said:
Awesome - worked perfectly with the root pack from this forum as well.
Now.... do you have tun.ko for this tab as well please?
Ive found a couple of versions - but they have not been compiled for this rom from the looks and do not load correctly.
Is the tun.ko file available at all yet?
Click to expand...
Click to collapse
? Its built-in to kernel:
bash-4.2# uname -a
Linux localhost 2.6.36-P6810DTKL5-CL604290 #3 SMP PREEMPT Wed Dec 14 18:05:58 KST 2011 armv7l GNU/Linux
bash-4.2# ls -l /dev/tun
crw-rw---- vpn vpn 10, 200 2012-01-24 08:23 tun

ezynow:
thanks for sharing the cifs.ko module.
willl you be kind enough to teach me how to get my Windows 7 home premium hooked with cifs?
i tried and search the www and the closest solution i had is to view my shared folder using Ghostcommander with SMB plugin.
however, i cannot mount the share drive as a folder using either
cifsmanager or mount manager
i have tried to do regedit in my Win7 home premium since there is not "local security policy" program for this version of Win7.

Sorry for disturb
Plz, can anybody tell me what is this and how to use it?

i got an error when i add the iocharset=utf8 in the option at cifs manager, how can i make it use utf8?

I place this file in root directory of my sd card.
use terminal emulator program and type
insmod /mnt/sdcard/cifs.ko
but I got
insmod: init_module '/mnt/sdcard/cifs.ko' failed (Operation not permitted)
what should i do
Sent from my GT-P6800 using xda premium

theerachai said:
I place this file in root directory of my sd card.
use terminal emulator program and type
insmod /mnt/sdcard/cifs.ko
but I got
insmod: init_module '/mnt/sdcard/cifs.ko' failed (Operation not permitted)
what should i do
Sent from my GT-P6800 using xda premium
Click to expand...
Click to collapse
try from root
su
then insmod /pathtocifs.ko/

solved, thank you very much
Sent from my GT-P6800 using xda premium

The issues with video playback is not really with cifs, but with caching done by the players.
Typically, a player streaming over http expects a long delay and will use a larger buffer. Playing over cifs, the player will think it's locally stored and no buffer is necessary. That lack of buffer is causing the problems.

I have compiled the nls_utf8.ko module as well as recompilied the module cifs.ko for those of you that needs it. Files are attached in this post.
This is for the stock kernel from the LA2 firmware which I am using. If you are using the stock kernel from Samsung, this should work for you.
If this helps you, pls click on the "thanks" link.

Thanks for this module. I've known about cifs but never tried it before. Now I thought I'd give it a go and it's great. Had a few initial noob problems but now all OK. And using Cifs Manager makes mounting my NAS a breeze.
I can watch all my 720p video files stored on my NAS. Using BS player as suggested by ezynow.. Thanks ezynow!

Thank
Tested ,work well .

pinkowl said:
If this helps you, pls click on the "thanks" link.
Click to expand...
Click to collapse
I'm new here.
can you tell me where the "thanks" link is? pls
because your file helps me a lot~

pinkowl said:
I have compiled the nls_utf8.ko module as well as recompilied the module cifs.ko for those of you that needs it. Files are attached in this post.
This is for the stock kernel from the LA2 firmware which I am using. If you are using the stock kernel from Samsung, this should work for you.
If this helps you, pls click on the "thanks" link.
Click to expand...
Click to collapse
Nice one - i will update the main thread & creditation to you for this

Thanks a lot for these modules. I use them to access shares on my home network.
I found only one small problem accessing shares on my Windows 7 x64 host. If I use iocharset=utf8 as a parameter I can see the segmentation fault message when trying to mount a share from this host. Without iocharset parameter it works ok (apparently all unicode filenames are not shown correctly)
Exactly the same setup works fine with shares from my router and unicode filenames are displayed correctly.

@original poster
Can you rebuild this for ICS, please?

m0bster said:
@original poster
Can you rebuild this for ICS, please?
Click to expand...
Click to collapse
You can't rebuild this until Samsung release the ICS source code used to compile the kernel. Hopefully they do so soon but I am not holding my breath.

New kernel released. Can anyone compile cifs.ko and nls_utf8.ko?

Related

DroidX source posted! tun.ko should be possible now

Sources are here:
opensource.motorola.com/sf/frs/do/viewRelease/projects.droidx/frs.droidx_source.shado_x3_1_13_5_10
Hopefully I'll get some time to work on tun.ko for openvpn or vpnc.
But if someone beats me to it, please post it here.
Jeb
Downloading the source and pre-req's now. Will work on the tun.ko when I get back from dinner if no one else has it done.
Droid X source code! What!? Does this mean a bright future could be ahead for us?
XDA App = Pwnage
jebc4 said:
Sources are here:
opensource.motorola.com/sf/frs/do/viewRelease/projects.droidx/frs.droidx_source.shado_x3_1_13_5_10
Hopefully I'll get some time to work on tun.ko for openvpn or vpnc.
But if someone beats me to it, please post it here.
Jeb
Click to expand...
Click to collapse
What exactly is this?
drew630 said:
Downloading the source and pre-req's now. Will work on the tun.ko when I get back from dinner if no one else has it done.
Click to expand...
Click to collapse
Good luck to you and all for any work on this sweet phone. You rock!
Sent from my DROIDX using XDA App
Hi Drew,
Did you have any luck with tun.ko?
Thanks & all the best!
You can click in the bottom right of that that link and download all the files in one zip. SHADO_X3_1.13.5.10.zip is around 275MB.
I have unzipped that, then untarred all the individual archives.
According to the README, you need some files from source.android.com, but their link doesn't work, so that will take some more digging. (maybe I missed something...)
It appears to be the complete build process. I was just hoping to jump in and get a tun.ko modules compiled, but I still can't find the kernel config (I was just quickly looking around).
Anyway, bottom line is that I will have to get up to speed on the android build process, not just the cross compiled kernel process. This will take me some more time.
If anyone gets one before me, please post.
Thanks, Jeb
Anyone had any luck yet?
Sent from my DROIDX using XDA App
hmmm... I think that you should be able to compile the kernel with the default config options, but just enable the tun/tap module... I don't think that the module would really depend too heavily on any of the other config options?
I have compiled the module multiple times with multiple config files but none work. I get a exec failed error which is presumably because i compiled for the wrong architecture.
I have tried all the omap3 configs i found and the defconfig with no luck. I am away today but will look at it again tomorrow.
Sent from my DROIDX using XDA App
I'm no droid expert but it looks like according to the droid readme file you want ARM arch, but the compiler that youo should be using is arm-eabi-gcc (comes from the prebuilt tools from android) - in the Makefile set CROSS_COMPILE to /path/to/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- (or whatever the path to the file is on your build environment)
All the best,
Okay, after a bunch of hours I finally got it compiled
The 'exec format error' that you were probably seeing is not because it was compiled for the wrong architecture. I originally compiled the kernel modules with the default .config file that 'make menuconfig' generated.
When I tried to load it, I got the 'exec format error'. 'dmesg' showed:
<3>[46706.378570] tun: version magic '2.6.29 mod_unload modversions ARMv5 ' should be '2.6.29 preempt mod_unload ARMv7 '
So, that gave me a big hint - after a few hours of customizing I finally got the .config file to a version that will properly compile and load the openvpn module.
I'm attaching the .config file (config.zip) and tun.ko file (tun.ko.zip)
*NOTE* - I have not tested the kernel module yet, so I have no idea if it works. Even if it does work, the .config file is the default one that I manipulated so that the tun module would compile. You probably don't want to use the .config file as it may not match all of the hardware and configs of the droid x. If someone has the actual droid x .config file used by motorola then that would be very helpful.
*update* - the attacked files *do not work*. The working version is available at http://forum.xda-developers.com/showthread.php?p=7417520
Hmm... it looks like tun.ko does compile and install, but is not working properly
# lsmod
tun 11392 0 - Live 0xbf00c000
sec 4808 0 - Live 0xbf000000
# cat /dev/net/tun
/dev/net/tun: No such device
#
The response should be 'cat: /dev/net/tun: File descriptor in bad state'
If we only had the .config file from motorola this would be a lot easier.
mab2 said:
Hmm... it looks like tun.ko does compile and install, but is not working properly
# lsmod
tun 11392 0 - Live 0xbf00c000
sec 4808 0 - Live 0xbf000000
# cat /dev/net/tun
/dev/net/tun: No such device
#
The response should be 'cat: /dev/net/tun: File descriptor in bad state'
If we only had the .config file from motorola this would be a lot easier.
Click to expand...
Click to collapse
I'll post on Motodev board for the running .config (they should have left it in the running kernel at /prog/config.gz ...)
Anyway, thanks trying -- could you post any tips on getting a dev env setup?
I've been using linux for years, but this is my first android setup.
jebc4 said:
I'll post on Motodev board for the running .config (they should have left it in the running kernel at /prog/config.gz ...)
Anyway, thanks trying -- could you post any tips on getting a dev env setup?
I've been using linux for years, but this is my first android setup.
Click to expand...
Click to collapse
I'm in the same boat as you - android newbie, linux veteran.
I started out by getting the whole android environment - http://source.android.com/source/download.html - and ran 'repo init -u git://android.git.kernel.org/platform/manifest.git' - all of that was just so I could get the prebuilt directory with the arm-eabi- files that will be used below.
Then I just downloaded the entire project from opensource.motorola.com - extracted it all, went into the kernel directory and hacked away at the .config file from there.
To compile the kernel I ran:
CROSS_COMPILE=/home/MY_USERNAME/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make -j 4 kernel
CROSS_COMPILE=/home/MY_USERNAME/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- make modules
I spent a few hours with it - playing around with environment variables and modifying some Makefiles so I may have left out a small thing or two
It looks like running 'make mapphone_defconfig' created a functioning .config file and I used that to generate tun.ko.
I've posted the files at http://forum.xda-developers.com/showthread.php?p=7417520
Attachments removed as per OP's request.
mab2 said:
I'm no droid expert but it looks like according to the droid readme file you want ARM arch, but the compiler that youo should be using is arm-eabi-gcc (comes from the prebuilt tools from android) - in the Makefile set CROSS_COMPILE to /path/to/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi- (or whatever the path to the file is on your build environment)
All the best,
Click to expand...
Click to collapse
Thanks but I already got that, been compiling kernels for other Android devices for a while...
drew630 said:
Thanks but I already got that, been compiling kernels for other Android devices for a while...
Click to expand...
Click to collapse
didn't know that - no harm intended
All the best,
mab2 said:
Okay, after a bunch of hours I finally got it compiled
The 'exec format error' that you were probably seeing is not because it was compiled for the wrong architecture. I originally compiled the kernel modules with the default .config file that 'make menuconfig' generated.
When I tried to load it, I got the 'exec format error'. 'dmesg' showed:
<3>[46706.378570] tun: version magic '2.6.29 mod_unload modversions ARMv5 ' should be '2.6.29 preempt mod_unload ARMv7 '
So, that gave me a big hint - after a few hours of customizing I finally got the .config file to a version that will properly compile and load the openvpn module.
I'm attaching the .config file (config.zip) and tun.ko file (tun.ko.zip)
*NOTE* - I have not tested the kernel module yet, so I have no idea if it works. Even if it does work, the .config file is the default one that I manipulated so that the tun module would compile. You probably don't want to use the .config file as it may not match all of the hardware and configs of the droid x. If someone has the actual droid x .config file used by motorola then that would be very helpful.
*update* - the attacked files *do not work*. The working version is available at http://forum.xda-developers.com/showthread.php?p=7417520
Click to expand...
Click to collapse
i'm having a similar issue, how did you fix this ARMvX Version problem when compiling a module? Thanks in advance!

[Q] CIFS Manager - problems

I have a little problem with run CIFS Manager on my NookColor rooted.
references:
http://forum.xda-developers.com/showthread.php?t=761414&page=7
http://forum.xda-developers.com/showthread.php?t=783117
I have no ideas where can i download my kernel(2nd link) to prepare my own cifs.ko module ( I think there is a problem ... )
In addition I had tried add through insmod cifs.ko from HTC ARIA and Samsung Galaxy S but without any luck...
after uname -r i have
Code:
2.6.29-omap1
kernel, I's custom rom, I'm a little newbie in this world, so I'll be appreciate if someone could help me.

[DEV] Loadable Modules for Gingersense Incredible [Updated 9/18 - Support for OTA]

HTC released gingerbread via OTA but they did not support additional modules. This thread has flashable zips for both the leaked kernel and the one from the "OTA".
Added flashable modules to attachments that are flashable in recovery.
I have created a zip of some of the more useful modules for our device:
Code:
cpufreq_conservative.ko
cpufreq_smartass.ko (thanks Chad for the help here)
ext4.ko
jbd2.ko (necessary for me to load ext4)
tun.ko
perflock_disable.ko (I actually compiled this one a little different but confirmed it would load and not get the exec format error)
Update: Smartass is working now with assistance from chad in resolving those errors. Decided to not worry about interactive for now.
Further information:
If you don't use the CWM flashable zip you will need to load perflock_disable a special way as it needs to be called with a special parameter to make it work correctly. Try adding below to a script. Credit to Calkulin for the script.
Code:
if [ -e /system/lib/modules/perflock_disable.ko ]; then
insmod /system/lib/modules/perflock_disable.ko
if [ $? -eq 0 ]; then
echo "Perflock DISABLED"
else
addr=`awk '$3 == "perflock_notifier_call" { print "0x"$1; }' /proc/kallsyms`
if [ -n "$addr" ]; then
insmod /system/lib/modules/perflock_disable.ko "perflock_notifier_call_addr=$addr"
if [ $? -eq 0 ]; then
echo "Perflock DISABLED"
else
echo "ERROR!!! Perflock could NOT be DISABLED"
fi
fi
fi
fi
Credits:
Conap (for BootManager and helping me test ext4 on an SD ROM)
XDA (for teaching me so much about Android)
HTC (for the kernel source)
Chad0989 (for assistance in getting smartass CPU governor working)
Coolbho3000 (perflock_disable)
Calkulin for the module load script
anyone else who inspired me (apologize if I forgot)
I have attached a zip file to this. If you are not a dev you can still use the modules here but some basic ADB/terminal knowledge would be needed. The modules are open for testing though.
Attached zip files and CWM-flashable zip files for both OTA and leak-based ROMs.
inc_modules.zip - Just the loadable modules.
inc_modules_ota.zip - just the loadable modules - OTA-based ROMS (August leak)
inc_modules_ota_091811.zip - just the loadable modules - OTA-based ROMS (actual OTA from September)
inc_modules_CWM_flashable.zip - flashable zip that will also autoload modules at boot.
inc_modules_ota_CWM_flashable.zip - flashable zip that will also autoload modules at boot - OTA-based ROMS (August leak)
inc_modules_ota_091811_CWM_flashable.zip - flashable zip that will also autoload modules at boot - OTA-based ROMS (Actual OTA from September)
I'm glad some one took this up I had been wondering the same thing since HTC opened the dev section. I had found another site that had a more extensive write up on how to build kernels but I'm not very fluent in linux and was a little intimidated at trying. At least I now know that it can be done. Maybe we can get Chad to try and port it over?
Awesome. A ray of hope.
Good job Tiny! I know someone was just asking for a tun.ko module and now I can't remember who it was. Hopefully they see your post.
jermaine151 said:
Good job Tiny! I know someone was just asking for a tun.ko module and now I can't remember who it was. Hopefully they see your post.
Click to expand...
Click to collapse
Thanks!
I'm trying to add more existing modules but my compiler treats warnings as errors so it won't build. Chad, if you see this post, any advice here?
tiny4579 said:
Thanks!
I'm trying to add more existing modules but my compiler treats warnings as errors so it won't build. Chad, if you see this post, any advice here?
Click to expand...
Click to collapse
--prefix
Sent from my ADR6300 using XDA App
hightech316 said:
--prefix
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
I actually got them to build but they won't load still. I will play around with it more.
This is awesome. I was hoping for a tun.ko module! Now, do I just grab these and drop then in system/lib/modules and they should just work? Or are there steps I need to take to make them work? (I am honestly only concerned with the tun.ko)
oh wow this is incredible great job tiny!!! and the reason you probably cant get those other governors to work is because htc released an uncomplete source
jskolm said:
This is awesome. I was hoping for a tun.ko module! Now, do I just grab these and drop then in system/lib/modules and they should just work? Or are there steps I need to take to make them work? (I am honestly only concerned with the tun.ko)
Click to expand...
Click to collapse
Just drop in the ones you want and run insmod /system/lib/modules/tun.ko for tun.ko. You will have to do it at boot each time or get the dev to write an init.d script to load it.
tiny4579 said:
Just drop in the ones you want and run insmod /system/lib/modules/tun.ko for tun.ko. You will have to do it at boot each time or get the dev to write an init.d script to load it.
Click to expand...
Click to collapse
would i need to make one for every module?
JoelZ9614 said:
would i need to make one for every module?
Click to expand...
Click to collapse
Joel,
No, just one script should work. I believe Synergy ROM already has the init.d script for some of them. See 00cpufreq_modules in /system/etc/init.d
All,
Updated OP with latest zip file. If you have downloaded previously, redownload to get the latest.
would it be likes this?
http://www.multiupload.com/J9WTSA4VWF
JoelZ9614 said:
would it be likes this?
http://www.multiupload.com/J9WTSA4VWF
Click to expand...
Click to collapse
The first line should be:
Code:
#!/system/bin/sh
and it needs to have execute permissions or it won't execute. Also make sure to save it in UNIX format. I would also add the smartass module as it is quite popular. To test type lsmod from adb or terminal after boot. Hope this helps.
tiny4579 said:
The first line should be:
Code:
#!/system/bin/sh
and it needs to have execute permissions or it won't execute. Also make sure to save it in UNIX format. I would also add the smartass module as it is quite popular. To test type lsmod from adb or terminal after boot. Hope this helps.
Click to expand...
Click to collapse
eeh im not good with init.d scripts lol
ok i think i got it would it be like this?
Code:
#!/system/bin/sh
/system/bin/insmod /system/lib/modules/tun.ko
Every shell script should contain
#!/system/bin/sh
Sent from my ADR6300 using XDA App
JoelZ9614 said:
ok i think i got it would it be like this?
Code:
#!/system/bin/sh
/system/bin/insmod /system/lib/modules/tun.ko
Click to expand...
Click to collapse
Exactly!
Then just make a line for each module.
EDIT: Though you could just write it like this:
Code:
#!/system/bin/sh
insmod /system/lib/modules/tun.ko
Though to be safe and to make sure you are running that particular insmod command you can leave it the way you have it.
ok done its in my rom RLS3 Thanks Tiny Great work
JoelZ9614 said:
ok done its in my rom RLS3 Thanks Tiny Great work
Click to expand...
Click to collapse
No prob! It's been a good project for me.

[Q] [KERNEL] ARMv6 vs ARMv7 cross-compile question / tun.ko for LG Revo

hello all -- ive mostly been a lurker (been too busy), but i finally found some time to try and get the ipsec vpn working on my stock-but-rooted LG Revo. despite some ardent googling, i couldn't find a working tun.ko that would work with vpc/VPN Connections. so i decided to compile my own.
i figure since there's certainly nothing in the LG Revo boards here specific to compiling tun.ko for the LG Revo, i'd start this thread and document my steps along the way. i figure other board users can use for reference etc. hope it's ok mods/admins!
the short version/TL;DR:
i have compiled my own tun.ko for my stock/rooted LG Revolution. i have the correct kernel version (etc) but am stuck because i dont seem to be able to compile ARMv7, only ARMv6. this is the error i receive when i try to insmod:
Code:
tun: version magic '2.6.32.9-perf preempt mod_unload ARMv6 ' should be '2.6.32.9-perf preempt mod_unload ARMv7 '
basically i need to compile it for ARMv7 not ARMv6. i don't know how.
the long version, aka the steps i took:
starting in a nice clean folder, download the linux kernel src specific to the version of the kernel on my rooted stock LG Revo. i obtained this earlier (you can check via Settings -> About Phone -> Kernel version. if you have a stock (rooted or not) LG Revolution it will be: 2.6.32.9-perf.
Code:
$ mkdir -p $HOME/tmp/lgrevosrc
$ export LGREVOSRC=$HOME/tmp/lgrevosrc
$ cd $LGREVOSRC
$ wget -q http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.9.tar.bz2
$ wget -q http://dl.google.com/android/android-sdk_r10-linux_x86.tgz
$ wget -q http://dl.google.com/android/ndk/android-ndk-r5b-linux-x86.tar.bz2
$ tar xjf linux-2.6.32.9.tar.bz2
$ tar xzf android-sdk_r10-linux_x86.tgz
$ tar xjf android-ndk-r5b-linux-x86.tar.bz2
earlier, i copied the config file for the kernel specific to my LG Revo by using Root Explorer and copying the /proc/config.gz file. i now copy this into my linux kernel src tree, being sure to gzunzip it first and to copy it to the src folder as ".config", not "config".
Code:
$ cd $LGREVOSRC/linux-2.6.32.9
$ gzip -d ~rickt/tmp/from_my_lgrevo/config.gz
$ cp ~rickt/tmp/from_my_lgrevo/config .config
now we have to edit the .config file and add the tun module so it will be compiled. i added the following line to the .config file:
Code:
CONFIG_TUN=m
now, we compile the modules, being sure to set the environment variables for the architecture we NEED, not the one we're compiling on:
Code:
$ export ARCH=arm
$ export CROSS_COMPILE=arm-eabi-
$ export PATH=$PATH:$LGREVOSRC/android-ndk-r5b/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin
$ make modules
HOSTCC scripts/basic/fixdep
HOSTCC scripts/basic/docproc
HOSTCC scripts/basic/hash
HOSTCC scripts/kconfig/conf.o
< snipped, for brevity >
LD [M] net/sched/cls_flow.ko
CC net/sched/sch_dsmark.mod.o
LD [M] net/sched/sch_dsmark.ko
$
let make sure the tun.ko module was compiled, and we'll see what type of arch it was compiled for:
Code:
$ find . -name tun.ko
./drivers/net/tun.ko
$ ls -l ./drivers/net/tun.ko
-rw-r--r-- 1 root root 190705 Aug 19 06:35 ./drivers/net/tun.ko
$ file ./drivers/net/tun.ko
./drivers/net/tun.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
$ strings ./drivers/net/tun.ko | grep -i arm
vermagic=2.6.32.9-perf preempt mod_unload ARMv6
BOOM! note the ARMv6. this is important, because when i try to insert the module into the kernel on my android (after copying it over, obviously) i get:
Code:
# insmod tun.ko
insmod: init_module 'tun.ko' failed (Exec format error)
ok, so i start nosing around in the logs to see what i can see, and i see:
Code:
<3>[122130.240509] tun: version magic '2.6.32.9-perf preempt mod_unload ARMv6 ' should be '2.6.32.9-perf preempt mod_unload ARMv7 '
so... i guess this was a long and drawn-out way of saying that i have a great desire to have a tun.ko for our beloved LG Revolution, but i'm not sure how to have gcc on a linux box cross-compile for ARMv7, not ARMv6.
anyone? bueller?
I work quite a bit with cross-compilers in my day job, but I haven't tried to use any of the pre-packaged ones in the Android SDK(s).. however, until I have time to play with them, the ARMv6 versus 7 probably relates to these 2 variables:
$ export ARCH=arm
$ export CROSS_COMPILE=arm-eabi-
Also, gcc has -march and -mtune params that can sometimes be used to select specific CPUs and/or sub-architectures within a main CPU family.. if someone (e.g. LG) gave out an SDK for the Revo specifically, their gcc would probably already be "spec'ed" to march and mtune for the specific CPU..so maybe the generic Android ARM gcc cross-compiler defaults to ARMv6.
I may have time to poke into this later, but it probably won't be today..
- Phil
I've been informed that GCC cannot output ARMv7. I think licensed developer tools are needed. Can anyone confirm this?
RMT.
GCC4.3 added ARMv7 support. This discussion seems to confirm the various details:
I think in GCC 4.3 is where you get ARMv7 architecture support, (see
http://gcc.gnu.org/gcc-4.3/changes.html), which is EABI and at GCC 4.4
you have "EABI-compatible profiling interface for EABI targets." (again see
http://gcc.gnu.org/gcc-4.4/changes.html).
So I've chosen to work on 4.4 just to be sure, and it also supports Cortex-A9, as
well as VFPv3 (yeah!).
Click to expand...
Click to collapse
Full discussion here:
http://freebsd.1045724.n5.nabble.com/ARMv7-EABI-Cross-Compiler-tp4201510p4201523.html
Depending on who is providing the cross-compiler you are trying to use, they may either be using something prior to gcc4.3, or, they are providing a compiler which has not been enabled with the ARMv7 target. You could try using Kegel's cross-tool with a recent gcc (4.4 or 4.5) to build your own ARMv7 cross-compiler, but not sure how deep you want to go with this!
- Phil
I haven't been able to get a working tun.ko for this either. I've having trouble compiling my own. Could you post the adapter you're working with?
I just saw a verizon update come down, but kernel is 2.6.32.9-perf [email protected] #1.
Bumping this ol' thread hoping that progress has been made or someone knows about a thread I missed. Trying (hoping) to get OpenVPN going with my Revo so I'm hoping there's a tun.ko available.
I successfully compiled a tun.ko for mine using the "crossdev" package on gentoo. Just setting ARCH=arm CROSS_COMPILE=arm-eabi- did the trick for me.
I believe older verions of gcc were not yet capable of producing ARMv7.
gcc 4.5.3 certainly is. I would try upgrading to that if possible and that ought to work.
I'd be happy to share my tun.ko with anyone that wants it as well...
Slightly unrelated, I also found that loading the module (insmod tun.ko) did not cause the /dev/net/tun node to be created for some reason...
a simple
Code:
mkdir /dev/net
mknod /dev/net/tun c 10 200
as root, and AFTER loading the module resolves that problem, at least until the next reboot. I haven't figured out how to get it to run a script at boot yet to automate it.
If anyone wants the tun.ko let me know and I'll upload it somewhere.
Bait-Fish said:
Bumping this ol' thread hoping that progress has been made or someone knows about a thread I missed. Trying (hoping) to get OpenVPN going with my Revo so I'm hoping there's a tun.ko available.
Click to expand...
Click to collapse
Blitz includes tun.ko
Sent from my VS910 4G using xda premium
nasaiya said:
I'd be happy to share my tun.ko with anyone that wants it as well...
Click to expand...
Click to collapse
Thanks you very much for the offer. I am a total noob as far as compiling goes!
mtmichaelson said:
Blitz includes tun.ko
Click to expand...
Click to collapse
Damn sweet! I never needed it before so that went right over my head previously. Can I simply extract it or would I have to be on BK? (which I'm not)
Sent from my VS910 4G using Tapatalk
I believe you need to install ClockWorkMod to flash blitz onto your phone. You can backup first and try it out safely with CWM. Just follow the instructions in the thread it's easy.
Here's my tun.ko for anyone that wants it. I found "openvpn installer" and "openvpn settings" apps perfect for my needs (only issue is I still have to manually add the device node -- even with blitzkrieg, but it's no big deal)
http://www.box.com/s/a50pnexofiej4in7s5h7
Bait-Fish said:
Thanks you very much for the offer. I am a total noob as far as compiling goes!
Damn sweet! I never needed it before so that went right over my head previously. Can I simply extract it or would I have to be on BK? (which I'm not)
Sent from my VS910 4G using Tapatalk
Click to expand...
Click to collapse
You could try pulling it from the blitz zip and dropping it in your /system/lib/modules and see if it works!
Sent from my VS910 4G using xda premium
Cool, thanks. I'll attempt the 'easy' way first.
Sent from my VS910 4G using Tapatalk

[KernelModule] Overclock

**** Do Not Repost! Link back to this thread! ****
*** Update: This works on Thrill/Optimus 3D. There are seperate kernel modules for Froyo/GingerBread/CyanogenMod kernels***
Here ya go... I prefer this method rather than hard coding changes in the kernel. Assuming you have both kernel modules extracted to /sdcard
Switch to root
Code:
$ su
Copy files from sdcard to /system/lib/modules directory - You only do this once
Code:
# cp /sdcard/symsearch.ko /system/lib/modules/symsearch.ko
# cp /sdcard/opperator.ko /system/lib/modules/opperator.ko
Load modules, always do symsearch.ko first - You do this every time you reboot
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/opperator.ko
Set Frequency - You do this when you want to change frequency - in hz, that's 6 additions Zero's to make Mhz
Code:
# echo 1188000000 > /proc/opperator
This uses SYMSEARCH by Skrilax_CZ
https://github.com/SkrilaxCZ
Inspired by Milestone Overclock by Tiago Sousa, but totally rewritten for omap kernel 2.6.35-7 and above.
http://code.google.com/p/milestone-overclock/
This is a stripped down version. I'm working on a fully featured version, that will allow you to play with voltage as well. There are some hurdles to overcome before that is ready for prime time... In the mean time, lets see what stock voltage can do... 1188 is my sweet spot on stock voltage, what is yours? I get up to 1235 without reboots, or real noticeable lags but the linkpacks are all over the place, where it stays in the 80's at 1188. And remember, the number is in hz a.k.a. cycles per second, so to get Mhz, you must add 'Six Zeroes' to the end of your desired Mhz.
* Note2Devs: Feel free to put this in your ROM, but please do credit me for the Overclock in your release, and link back to this thread. You can also post a link to your ROM here as a way to make myself and other aware of it. Thanks...
* Echts shows us how he integrate's the module into his own ROM. TY, Echts...
http://forum.xda-developers.com/showpost.php?p=19542521&postcount=52
* Thanks to greenbats for helping figure out the O3D gingerbread kernel issue!
** And don't ask to put it in an app. I won't be happy about that. I'm serious! **
Here go some of my Recording Engineer work...
http://www.youtube.com/watch?v=Je8K_hCej3s
http://www.youtube.com/watch?v=yfBfcdSL1pc
http://www.youtube.com/watch?v=iIU8DO4rdKI
http://www.youtube.com/watch?v=msavF7LIdvY
Essentially, hardware wise, the Thrill has exactly the same specs as the Optimus 3D ? I mean, CPU wise.
It's the same hardware
omgomg said:
Essentially, hardware wise, the Thrill has exactly the same specs as the Optimus 3D ? I mean, CPU wise.
Click to expand...
Click to collapse
Yes, give this a go on the O3D, the module is actually compiled against the cyanogenmod cosmo kernel, which is really for the O3D. Should work.
for test \
How do I install this on the optimus 3D?
greenbat said:
How do I install this on the optimus 3D?
Click to expand...
Click to collapse
No real installing... It's just the modules... You can throw them in /system/lib/modules, and then use an init script to load them up, then set the frequency, but don't do that until you know what works *STABLE* for you.
If you have a favorite ROM, let the dev know about this, and maybe they'll integrate it.
I'm not sure if custom kernels like acurateam's might be too different to work properly at this point. But it won't hurt to try. Just don't start loading it at boot right away.
tekahuna said:
No real installing... It's just the modules... You can throw them in /system/lib/modules, and then use an init script to load them up, then set the frequency, but don't do that until you know what works *STABLE* for you.
If you have a favorite ROM, let the dev know about this, and maybe they'll integrate it.
I'm not sure if custom kernels like acurateam's might be too different to work properly at this point. But it won't hurt to try. Just don't start loading it at boot right away.
Click to expand...
Click to collapse
Thanx for your advice and Great find!!!
I have send your xda link to acura. Hopefully he can integrate it.
greenbat said:
Thanx for your advice and Great find!!!
I have send your xda link to acura. Hopefully he can integrate it.
Click to expand...
Click to collapse
I didn't find this. I made it! First OC'd OMAP4 period! Unless you count RAZR's... hah
Great invention
tekahuna said:
I didn't find this. I made it! First OC'd OMAP4 period! Unless you count RAZR's... hah
Click to expand...
Click to collapse
Great invention and congratulations!
Great job.... we use to use this type of script in motorola defy and moto bravo. It was easier with those because of the 2nd init recovery booting.
Sent from my LG-P925 using XDA App
tekahuna said:
**** Do Not Repost! Link back to this thread! ****
Here ya go... I prefer this method rather than hard coding changes in the kernel. Assuming you have both kernel modules extracted to /sdcard
Switch to root
Code:
$ su
Copy files from sdcard to /system/lib/modules directory - You only do this once
Code:
# cp /sdcard/symsearch.ko /system/lib/modules/symsearch.ko
# cp /sdcard/opperator.ko /system/lib/modules/opperator.ko
Load modules, always do symsearch.ko first - You do this every time you reboot
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/opperator.ko
Set Frequency - You do this when you want to change frequency - in hz, that's 6 additions Zero's to make Mhz
Code:
# echo 1188000000 > /proc/opperator
Is it possible for you to change this into a scriptmanager file?
Click to expand...
Click to collapse
Type this in scriptmanager shell.
greenbat said:
tekahuna said:
**** Do Not Repost! Link back to this thread! ****
Here ya go... I prefer this method rather than hard coding changes in the kernel. Assuming you have both kernel modules extracted to /sdcard
Switch to root
Code:
$ su
Copy files from sdcard to /system/lib/modules directory - You only do this once
Code:
# cp /sdcard/symsearch.ko /system/lib/modules/symsearch.ko
# cp /sdcard/opperator.ko /system/lib/modules/opperator.ko
Load modules, always do symsearch.ko first - You do this every time you reboot
Code:
# insmod /system/lib/modules/symsearch.ko
# insmod /system/lib/modules/opperator.ko
Set Frequency - You do this when you want to change frequency - in hz, that's 6 additions Zero's to make Mhz
Code:
# echo 1188000000 > /proc/opperator
Is it possible for you to change this into a scriptmanager file?
Click to expand...
Click to collapse
What I'd really like is for the ROM making dev's to come to a consensus as to how to integrate this... Mainly, the best place to throw the script that does this at boot on these phones. I know how we did it on droid X, but I haven't dug deep enough into this phone just yet to be sure... I'll update the OP as methods improve and I get more feedback.
Click to expand...
Click to collapse
Or use callmearia kernel and make script for system/etc/init folder... havent tried his kernel but it should support the script at boot up. Acura roms should work that way too.
The way most roms use overclock is the init script that starts at boot...
Sent from my LG-P925 using XDA App
rdannar said:
Great job.... we use to use this type of script in motorola defy and moto bravo. It was easier with those because of the 2nd init recovery booting.
Sent from my LG-P925 using XDA App
Click to expand...
Click to collapse
Those would have been based on Milestone Overclock... Which is where I gained most of my knowledge by contributing to getting the droidx/2 side of things working. MO's method of manipulating frequency and voltage no longer works on OMAP4, or rather kernel 2.6.35+... I had to come up with a new way of doing things, which didn't fit well under the existing framework of MO. So, I started from scratch... This is just the tip of the iceberg... Basic, basic, basic...
i get insmod: init_module /system/lib/modules/symsearch.ko failed (exec format error).
What am i doing wrong?
I also get the same error: insmod: init_module '/system/lib/modules/symsearch.ko' failed (exec format error)
Is it because I have gingerbread?
Must I use froyo?
borelis said:
i get insmod: init_module /system/lib/modules/symsearch.ko failed (exec format error).
What am i doing wrong?
Click to expand...
Click to collapse
Both O3D's, huh? What kernel are you running? give me output of
# dmesg
and
# busybox uname -a
And if it's acurateam, a link to their kernel source
tekahuna said:
What kernel are you running? give me output of
# dmesg
and
# busybox uname -a
And if it's acurateam, a link to their kernel source
Click to expand...
Click to collapse
"LINK Boot_2.0 More RAM, No Lags, More Speed.." from acura. Think he uses stock kernel. Im on GB by the way.
Outputs is a bit over my head. Tell me how and i´ll provide it for you.

Categories

Resources