[Q] tun.ko - T-Mobile myTouch 4G Slide

Can someone help to build tun.ko for stock doubleshot kernel?
Waiting for src code long time and seems no module available now..........
Sent from my Senseless Wonder Doubleshot using XDA App

at last Imanaged to compile by myself. here I put it in case anyone needs.

Related

[Q] kernel

Hi,
I am trying to extract the kernel from mmcblk0p20 using unpack-bootimg.pl
from this post: http://forum.xda-developers.com/showpost.php?p=2885020&postcount=1
I can get a valid ramdisk out of it but the kernel is not a gz file as it should be.
Any hint?
Etn40ff said:
Hi,
I am trying to extract the kernel from mmcblk0p20 using unpack-bootimg.pl
from this post: http://forum.xda-developers.com/showpost.php?p=2885020&postcount=1
I can get a valid ramdisk out of it but the kernel is not a gz file as it should be.
Any hint?
Click to expand...
Click to collapse
The kernel is not exactly a "gzipped" file because the first part of it has bootloader code that provides a mechanism to uncompress the remaining part of the kernel (which uses a form of gzip provided by a micro zlib).
More importantly, what are you trying to accomplish? The "kernel" image that comes from split_bootimg.pl (or such) is the actual file you use to re-pack, etc. Unless of course you're trying to decompile the kernel for reverse engineering purposes, but that would be pointless and you wouldn't be asking this question if that were the case.
If you're trying to get the kernel config, use extract-ikconfig from the 'scripts' directory in the Linux source tree. You have to invoke it by cd'ing into the Linux source directory and doing:
Code:
./scripts/extract-ikconfig /path/to/your/kernel-file &> /where/you/want/the/resulting-config
(you can't cd into 'scripts' and have it work).
Enjoy.
As you say unpacking the kernel to get the configuration is pointless: I could get it on htcdev without any effort.
I just had a boring night and I tried to kill it repacking my own flavour of android.
I was not able to make it boot so I started guessing which problem I was having; the kernel seemed a reasonable candidate (I was convinced that I was stripping the header away from it when unpacking)
how could you acquire that kernel? last time I checked there was no source?
You need the kernel source before a kernel can be made. Thats the sucky part.
Sent from my myTouch_4G_Slide using xda premium
Undeadk9 said:
You need the kernel source before a kernel can be made. Thats the sucky part.
Click to expand...
Click to collapse
Eh? No. A kernel exists, just in binary form. HTC has yet to release the source code, but unless you plan to modify parts of it, there's not much point.
nbetcher said:
Eh? No. A kernel exists, just in binary form. HTC has yet to release the source code, but unless you plan to modify parts of it, there's not much point.
Click to expand...
Click to collapse
A kernel source is no problem, I got it from android github.
The issue is the mods htc made and added, and the tools around it they used to compile.
I would like to compile my own, to optimize (did it on linux too).
If anyone can explain me simple how to use the binary kernel, I am happy too for now, if that makes me able to compile CM7
Anyone? Can't be too hard since a lot of folks pulled it of?
I have a lot of technical experience, just need some android specific info
I know nothing bout kernels. They scare me. I'll stick to ROM making.
Sent from my MyTouch 4G Slide using xda premium
OpenMinded said:
A kernel source is no problem, I got it from android github.
The issue is the mods htc made and added, and the tools around it they used to compile.
I would like to compile my own, to optimize (did it on linux too).
If anyone can explain me simple how to use the binary kernel, I am happy too for now, if that makes me able to compile CM7
Click to expand...
Click to collapse
It's not quite that simple. They don't just 'mod' the kernel, they add device support to it. The upstream Linux kernel does not support the latest and greatest Qualcomm-based devices, so HTC uses their own repository based on Codeaurora (http://www.codeaurora.org) which is downstream from Qualcomm. Confused yet?
Point being: Linux will not run properly on our device until we have either the HTC Sensation source, Doubleshot source, or someone sifts through and pieces together all of the various sources needed from Codeaurora.
To use the binary form, just use boot.img from our device's HBOOT image.
nbetcher said:
It's not quite that simple. They don't just 'mod' the kernel, they add device support to it. The upstream Linux kernel does not support the latest and greatest Qualcomm-based devices, so HTC uses their own repository based on Codeaurora (http://www.codeaurora.org) which is downstream from Qualcomm. Confused yet?
Point being: Linux will not run properly on our device until we have either the HTC Sensation source, Doubleshot source, or someone sifts through and pieces together all of the various sources needed from Codeaurora.
To use the binary form, just use boot.img from our device's HBOOT image.
Click to expand...
Click to collapse
Thank you for the explanation.
I have been compiling kernels on linux, I know we need drivers and that HTC patches the kernel. I did not know about codeaurora, thanks .
The HTC Sensation kernel source is on the HTC website:
http://developer.htc.com
I was wondering undead, how do you compile other ROMS? You just strip what is not needed? I thought you know how tot strip just the kernel, since you made a senseless rom.
I will try using the boot.img, thanks.
Does that mean porting a Sense rom would only require swapping the boot.img from another Sense 2.0/3.0 rom?
Thanks for the info
LOL. No its still the sense base and uses the stock boot.img from the stock ROM. It's still HTC at its core. Like I said I know 0 'zero' about kernels.
Sent from my MyTouch 4G Slide using xda premium
Undeadk9 said:
LOL. No its still the sense base and uses the stock boot.img from the stock ROM. It's still HTC at its core. Like I said I know 0 'zero' about kernels.
Sent from my MyTouch 4G Slide using xda premium
Click to expand...
Click to collapse
point taken . I think I just made a working zip containing only the stock kernel.
If I have time, I will try to put that kernel in a AOSP rom for the Sensation and see what that does. may take some time...
does any1 know how to mod the device checking of a rom?
i get an error 7, found it is because of the device check.
I modded the update script and binary from the Senation Alpha cm7 and got that error, which seems to point to a different model of phone.
I would like to work around it and see if the kernel works with cm7

Could someone compile a tun.ko of 2.3.6 for me?

hello, everyone. after upgrading my NS from 2.3.4 to 2.3.6, the tun module of 2.3.4 is no longer useful. So I want a new tun.ko for 2.3.6. I badly need it. Thank you!
Sent from my Nexus S using XDA App
nobody can do me such a favor?
Sent from my Nexus S using XDA App
Can't you just take it out from a kernel?
louyaorong said:
hello, everyone. after upgrading my NS from 2.3.4 to 2.3.6, the tun module of 2.3.4 is no longer useful. So I want a new tun.ko for 2.3.6. I badly need it. Thank you!
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
A kernel that boots 2.3.6 is all you need.
Just use the tun.ko that came with that kernel.
Modules match kernel versions, not android versions.
Hope this helps.
Sent from my LG-P999 using Tapatalk
As you know,offical 2.3.6 kernel for Nexus S does not include the tun.ko module for such things as OpenVPN. Previous versions did not either. Custom roms/kernels typically have it (and only if the author enabled it in kernel-config).
What I did is use my previous tun.ko module (that I found months ago) and just binary edited the magic number to match the one 2.3.6 requires. Do a "uname -a" on the 2.3.6 to see what magic number it's expecting and change it in tun.ko.
Probably could have done it on the phone, but I just copied to one of my linux machines and did a "vim -b" edit with search/replace from old to new.
morfic said:
A kernel that boots 2.3.6 is all you need.
Just use the tun.ko that came with that kernel.
Modules match kernel versions, not android versions.
Hope this helps.
Sent from my LG-P999 using Tapatalk
Click to expand...
Click to collapse
I've the same question, I tried to pull down the 2.6.35 kernel of Linux, but found no where to get the tun.ko
I did some google search that the tun.ko should located in drivers/net/ but I only found tun.c not tun.ko.
BTW, android kernel's website is highly unstable and even unaccessible these days which makes me impossible to even try compile tun.ko myself...
Guys, any other approaches?
Thanks a lot!
I not sure will this help, but it was extracted from the latest Trinity kernel
Please copy and paste it in "system\modules".
xciton said:
As you know,offical 2.3.6 kernel for Nexus S does not include the tun.ko module for such things as OpenVPN. Previous versions did not either. Custom roms/kernels typically have it (and only if the author enabled it in kernel-config).
What I did is use my previous tun.ko module (that I found months ago) and just binary edited the magic number to match the one 2.3.6 requires. Do a "uname -a" on the 2.3.6 to see what magic number it's expecting and change it in tun.ko.
Probably could have done it on the phone, but I just copied to one of my linux machines and did a "vim -b" edit with search/replace from old to new.
Click to expand...
Click to collapse
Thank u mate, but I've also tried this one, won't work neither...
Seems the only way to get tun.ko is to compile a new one.
But kernel.org for android is totally unaccessible...
morfic said:
A kernel that boots 2.3.6 is all you need.
Just use the tun.ko that came with that kernel.
Modules match kernel versions, not android versions.
Hope this helps.
Sent from my LG-P999 using Tapatalk
Click to expand...
Click to collapse
yeah, I know. But I like the stock kernel, I just want a tun.ko match the stock kernel of 2.3.6. I already have a tun.ko for the 2.3.4 kernel, but it's no longer useful.
Sent from my Nexus S using XDA App
window7 said:
I not sure will this help, but it was extracted from the latest Trinity kernel
Please copy and paste it in "system\modules".
Click to expand...
Click to collapse
It's for Trinity kernel since you extracted foe it. It cant be used for stock kernel. thank u all the same
Sent from my Nexus S using XDA App
xciton said:
As you know,offical 2.3.6 kernel for Nexus S does not include the tun.ko module for such things as OpenVPN. Previous versions did not either. Custom roms/kernels typically have it (and only if the author enabled it in kernel-config).
What I did is use my previous tun.ko module (that I found months ago) and just binary edited the magic number to match the one 2.3.6 requires. Do a "uname -a" on the 2.3.6 to see what magic number it's expecting and change it in tun.ko.
Probably could have done it on the phone, but I just copied to one of my linux machines and did a "vim -b" edit with search/replace from old to new.
Click to expand...
Click to collapse
since we both on stock 2.3.6, can you post the one you have already edited? thank you very much!
Sent from my Nexus S using XDA App
Can you try this, I edited the tun.ko file from 2.3.4 with a hex editor and it seems to be working for me but this is my first time doing this so not 100% sure...
Request moved to Q&A
@sk282 ... do you think you can do the same trick for cifs.ko ? ... thx.
I dont even know what a tun.ko is lol.
xsteven77x said:
I dont even know what a tun.ko is lol.
Click to expand...
Click to collapse
LOL ...
tun.ko is the module used to "activate" the low-level VPN support in the android platform (to access you home or company private network from outside).
cifs.ko is the kernel module used to activate windows-network-shares in the lan (very useful if you have a NAS with samba protocol at home and you want to access the data on it).
Solved it ... I was too lazy to do it.
Here are the CIFS modules that are working with 2.3.6 stock.
The kernel magic number for these files is: 2.6.35.7-gf5f63ef
Enjoy!
ro_explorer said:
@sk282 ... do you think you can do the same trick for cifs.ko ? ... thx.
Click to expand...
Click to collapse
Not sure about cifs.ko, I will try to explain what I did for tun.ko - hope it works for cifs.ko also. I downloaded a free hex editor and opened the tun.ko file I have with it. Then I found the line that had the kernel version values and changed them to the new values which you can find under Settings -> About Phone. Delete the old file from your phone and put the new one there instead (used Root Explorer).
sk282 said:
Not sure about cifs.ko, I will try to explain what I did for tun.ko - hope it works for cifs.ko also. I downloaded a free hex editor and opened the tun.ko file I have with it. Then I found the line that had the kernel version values and changed them to the new values which you can find under Settings -> About Phone. Delete the old file from your phone and put the new one there instead (used Root Explorer).
Click to expand...
Click to collapse
Thanx @sk282
the tun.ko works!
Sent from my Nexus One using XDA App
tun.ko vermagic=2.6.35.7-59465-g42bad32
nexus one android 2.3.6

SGH-I727R (Rogers) source now available!

At the usual place, Samsung OSRC. I'll get a kernel up soon
Incidentally this is the 2nd time Samsung has responded to an open source release request within 24 hours, loving it
Sent from my SAMSUNG-SGH-I727 using XDA App
Nice Find!
Sweeeeet.....
Sent from my SGH-I727R using Tapatalk
not development topic
Where can i find I727R stock kernel?
I'll have it posted in my kernel thread shortly, along with overclock/uv kernel. Stock at&t kernel is already there.
Sent from my SAMSUNG-SGH-I727 using XDA App
Stock rogers and AT&T kernel CWM zips are now posted in my kernel thread, you can use these to restore kernel/init script/lights driver that are replaced by my custom kernel.
If there's any interest in an un-modded but re-packed AT&T/Rogers kernel to enable init.d support, adb insecure, etc. I can put one of those together too - I'm sure some people would like to run a ROM with init.d support but not a modified kernel.

[Q] CM9 and Crespo Kernel Source and config

I have been using Koush's CM9 ROM for the Nexus S without problems. However, I have been unable to get the link to the Crespo kernel source to work.
Does anyone know why that link is down?
Also, does anyone know where to find a known-good .config for the Crespo kernel?
I have been using the herring_defconfig but have had no success. Probably need to get Koush's kernel patches but can't seem to find them.
Thanks.

[Q] P5113 Custom Kernel Compilation

I can't seem to get my stock AOSP build working with a standard kernel compiled from the Samsung source (I haven't made any modifications). My AOSP ROM boots and works properly if I use the kernel extracted from the stock device boot.img, but if I try to use the kernel that I compiled, the device doesn't even boot properly and just goes into an infinite boot loop.
I've tried compiling with the Code Sourcery toolchain recommeded in the Samsung Kernel README, as well as with the arm-eabi-4.4.3 tootchain, but both yield the same result. Is there something I'm missing? Has anybody else gotten the stock Samsung kernel working with their ROM?
Samsung historically has never released workable kernel source.
Sent from my Galaxy Nexus using Tapatalk 2
Yeah, that's what I'm starting to hear. Are there any good resources or articles that give some pointers on debugging for kernel development?
Sent from my GT-P3113 using XDA
panehf said:
Yeah, that's what I'm starting to hear. Are there any good resources or articles that give some pointers on debugging for kernel development?
Sent from my GT-P3113 using XDA
Click to expand...
Click to collapse
I wish I knew, because I wouldn't mind getting into development either.
Sent from my Galaxy Nexus using Tapatalk 2
I started working on this last night and had the same experience. I'll keep plugging away at it and post back what I find.
I would love a custom kernel for this thing. This thing could be so much better. A custom kernel and more ROMs would complete me.

Categories

Resources