[Q] Help building - General Questions and Answers

I want to build a module for my atrix HD w/ kernel ver 3.0.42-gebf622c. I think I found the source code, but I cannot figure out which config file to use. I have never built a linux kernel for an android before, so I am sure I will run into all kinds of trouble. Can someone give me some pointers for bootstrapping this process? I at least need to know where to find the .config file used to configure this kernel. Shorter term, does anyone have a tun.ko for this kernel?
Thanks!

Related

Rebuild Rogers kernel for tethering

I've got Ubuntu up and running and I'm willing to rebuild the kernel to enable tethering.
Problem 1 is that I have not received my Magic yet
Problem 2 is that I have no idea what I need to do
So who wants to help?
sammypwns said:
I've got Ubuntu up and running and I'm willing to rebuild the kernel to enable tethering.
Problem 1 is that I have not received my Magic yet
Problem 2 is that I have no idea what I need to do
So who wants to help?
Click to expand...
Click to collapse
I'll help. I've got tethering working using Azilink, but it would be nice to get it working using the Hero's built-in tethering option. Here's my post at ubuntuforums.org:
http://ubuntuforums.org/showthread.php?t=1202059
So are you rebuilding the kernel to get the iptables? I can't even get to make Ubuntu see the Magic as a communications device now.
It took me about 15 minutes to get the SDK up and running on Ubuntu 32 bit but I don't know where to find the source for the kernel or evena copy of the kernel itself. Once I have those it shouldn't take more than 5 minutes to compile the kernel including iptables. In fact if I had the source to a kernel that does allow tethering it would be even faster because I could just drag and drop what I need into the build directory. I haven't seen the source but I think that the HTC branded kernel only differs by a few files and it might even be easier to move the HTC files to the Google kernel. Need more help and testers.
sammypwns said:
It took me about 15 minutes to get the SDK up and running on Ubuntu 32 bit but I don't know where to find the source for the kernel or evena copy of the kernel itself. Once I have those it shouldn't take more than 5 minutes to compile the kernel including iptables. In fact if I had the source to a kernel that does allow tethering it would be even faster because I could just drag and drop what I need into the build directory. I haven't seen the source but I think that the HTC branded kernel only differs by a few files and it might even be easier to move the HTC files to the Google kernel. Need more help and testers.
Click to expand...
Click to collapse
Do you have the port tools? They allow you to unpack the boot.img. I'll upload the port tools for you:
http://www.mediafire.com/?fnzdtnj4gmy
Just put all of the tools in your /android/tools folder.
To unpack the boot.img, you just have to run this command:
unpack-H.pl boot.img
Click to expand...
Click to collapse
That's it. Good-luck. Messing around with the kernel is way above my know-how.
@hotweiss thanks a bunch
This guide shows you how to push the IP tables on the Magic:
http://android-unleashed.com/2008/1...d-g1-phone-with-iptables-no-proxy-needed.html
do I just need to incorprate the iptables binary with the kernel when I build it. Again I haven't seen either kernel to compare them.
sammypwns said:
do I just need to incorprate the iptables binary with the kernel when I build it. Again I haven't seen either kernel to compare them.
Click to expand...
Click to collapse
Haven't done it myself yet, but it looks like it's just an issue of following a few steps. The biggest problem right now is to make Ubuntu see the Magic as a modem.
again I don't have my magic yet so I can't comment on that but if anyone has a google branded version could you please check and see if you can get ubuntu to recognize it as a modem. if so then we know that it has only to do with the kernel itself.
EDIT: Also I can't get unpack-H.pl to work, i keep getting bash: /home/sammy/android-sdk-linux_x86-1.5_r2/tools/unpack-H.pl: Permission denied
sammypwns said:
again I don't have my magic yet so I can't comment on that but if anyone has a google branded version could you please check and see if you can get ubuntu to recognize it as a modem. if so then we know that it has only to do with the kernel itself.
EDIT: Also I can't get unpack-H.pl to work, i keep getting bash: /home/sammy/android-sdk-linux_x86-1.5_r2/tools/unpack-H.pl: Permission denied
Click to expand...
Click to collapse
right click on unpack-H.pl, set the permissions, and make it executable.
hotweiss said:
This guide shows you how to push the IP tables on the Magic:
http://android-unleashed.com/2008/1...d-g1-phone-with-iptables-no-proxy-needed.html
Click to expand...
Click to collapse
well you dint need go all the steps , just pushing iptables and insmod should be enough if you use wifi tethering app. but is the kernel in htc magic and g1 the same , do they run the same binary ?
i will check it but dont know if it works.
Edit :
No ipfilter in the kernel = not working
the binary itself works just fine (strange)
its because the kernel is missing netfilter too. there are actually 3 things we require for this to work. we need to build netfilter as a module, build iptables as a module and then include the iptables binary so that other programs can talk to it. unfortunately i don't have a magic but if you could pm me your im screen names we could do this faster
sammypwns said:
its because the kernel is missing netfilter too. there are actually 3 things we require for this to work. we need to build netfilter as a module, build iptables as a module and then include the iptables binary so that other programs can talk to it. unfortunately i don't have a magic but if you could pm me your im screen names we could do this faster
Click to expand...
Click to collapse
Things will be complicated by the fact that the Rogers and T-Mobile Magic's are different. I'm still confident that we'll work it out.
hotweiss the google branded ion does not require these modules

kernel configuration needed for compiling module

Greetings!
I need the kernel configuration files for the atrix2 since i want to compile a kernel module. I've tried the standard methods ( config.gz does not exist, and moto has turned off the compile options that allow us to extract it from a running kernel)
Do someone have access to one, or know how to get one - maybe from the source( it is not in the kernel/ source put out by moto, but maybe you know a way to extract it from the build source )
Thanks a ton
Manan

[Q] Kernel source compiling for Xoom.

Hi I looked for sometime for answers but could not find anything relevant.
Looking to get the ftdi VCP drivers to install on Xoom. Which means I either have to compile a kernel or add them as a module. I can not for the life of me find the correct source tree.
I downloaded kernel 2.6.36.3 from google which matches my kernel version.
My kernel version on the tablet is 2.6.36.3-gb899258 .
When I cross compile the module and try to do an insmod its complaining about the magic version is different which leads me to believe that I have the wrong kernel.
Where can I get the right stock kernel?
If i can not find it there is another option to download the config.gz from the device and recompile another version of the kernel with native support for the ftdi drivers.. How do i just install just the kernel on the device? Is it a uImage bzImage and how do I just flash that?
cd
Thanks
edit:
scrap that ...
sorry, not really helpful in your case
I'm assuming you got your source from here? This is the link from the Android website:
git clone https://android.googlesource.com/kernel/tegra.git
If you decide to go the route of compiling another kernel source, the easiest way (and a good way to keep snapshots of various configs) would be to use Koush's AnyKernel to flash the kernel. I don't know anything about what you're trying to do but I hope that helps some.
Yep the code comes from there.....
I finally got it to work , I downloaded the stock kernel from google then when I make the modules I had to modify the Makefile to get it to match the kernel versions.
It seems to work for now...
Thanks for your help

Got kexec-mod, kexec-tools working, atags in progress - Should Also Work With DroidX

I realize people gave up slightly on the whole kexec thing over radio worries, but I now have the module compiling and inserting without error into the Droid2/DroidX gingerbread kernel. Next comes cross compiling the kexec-tools for userspace, to allow us to attempt inserting a different kernel.
To build, you'll need a compiled DroidX kernel from source, as well as the android NDK.
To build, make sure you have downloaded the DroidX GB kernel source and compiled it. There are guides everywhere on how to build Android kernels. Just make sure you use the proper cross compiler.
http://sourceforge.n....l.tgz/download
When you build, make sure to use
Code:
make mapphone_defconfig
Once the kernel is built, clone my repo and edit envsetup.sh to reflect the correct paths to your kernel source directory and the android NDK.
https://github.com/i...kexec-mod-d2-dx
Then, source it:
Code:
source envsetup.sh
Then, just run
Code:
make
and cross your fingers. You should then have a fresh kexec_load.ko file!
To see if it loads, you'll need to copy it to your sdcard, and then on the phone, using a console, do the following:
Code:
su (click allow)
insmod /sdcard/path/to/kexec_load.ko
If you don't get any errors, it inserted! Now, of course, to actually use it, we'd need the kexec-tools built, which I haven't gotten ready yet...but they're coming! To remove the module (no reason to leave it in memory for now):
Code:
rmmod kexec_load
Happy hacking, and help is always appreciated!
This looks great! If you need any help just ask
Thanks! I probably could actually use some. I'm looking at eternity project's git repos now, and am trying to figure out how they managed to get atags working, with the whole procfs thing...still scratching my head there.
I'm looking at eternity project's git repos now, and am trying to figure out how they managed to get atags working, with the whole procfs thing...still scratching my head there, though I do have an atags module working, except it doesn't do anything without atags in the procfs (http://lists.infradead.org/pipermail/kexec/2011-January/004795.html).
kexec-tools:
https://github.com/i...xec-tools-dx-d2
To build, see the README.
Then, copy the binaries from /build/sbin/* to your device, and the move them to the /system/bin directory, and chmod them 770 to make them executable.
mod-atags:
https://github.com/i...mod-atags-d2-dx
Now, if I/we can just get atags and procfs stuff taken care of, we'll be able to go to the next step. I already have atags compiling as a module, but it won't stay inserted because we have no atags in the procfs. Note I can't just trace through code like this and know what everything is doing, but I know enough to hack at it and be dangerous
I know this is kind of off topic, but would this help us people with Motorola Atrix 2? Does it use the same radio?
calebcoverdale said:
I know this is kind of off topic, but would this help us people with Motorola Atrix 2? Does it use the same radio?
Click to expand...
Click to collapse
No idea. I haven't even gotten the kernel to change yet, so I haven't gotten to mess with radio yet. The method itself should/would work though, but radio will require reverse engineering...perhaps find a similar phone with an open bootloader and disassemble and attempt to clone it's modules.
The latest change I made may or may not work, it was an attempt to remove atags from the kexec module based on an old patch I found, which added the functionality. This at leaset made kexec -l zImage work, but when I run kexec -e, the kexec binary complains about atags not being there...hrmmmph.
I may have to revert it (and will if we can get atags somehow) ...but if we can get the kexec bin to ignore /proc/atags or just find a way to rip them out of the running kernel, we'll be in business.
The commit: https://github.com/ilikenwf/kexec-mod-d2-dx/commit/12dffe0ea286be0fe9ab0303a5a35ed92be4ee2c
I'm also looking into 2ndboot.
I like where this is going! Keep working!
Sent from my DROID2 using xda premium
Okies, so, I emailed aliasxerog (original kexec-mod writer), and I hope he'll get back to me. Even though his twitter says he's a "former android developer," maybe he'll be willing to give me some hints so I can pick up where he left off.
I also got the froyo version of the module building properly based on his module, yet again, (all after SBF'ing my phone back down to motoblur froyo - yech!) but neither currently work... (note there's a gingerbread and a froyo branch on my repo): https://github.com/i...kexec-mod-d2-dx
The froyo one throws the following error, which stops me dead in the water:
Code:
Could not find a free area of memory of 3007dc bytes...
The gingerbread one loads the kernel into memory but won't execute it due to our not having atags.
We've moved our git repos to an organization for easier collaboration:
https://github.com/organizations/D2-DX-Customboot
links are imcomplete.
use URL lable pls.
Cross compiler version ?
hello,
Sorry but I am not able to use the sourceforge link that you provided to download kernel source .. Also please share what cross compiler version is to be used....
Thanks in advance.

[Q] Load different kernel module

Hello all.
Sorry for noob question, but I am just a beginner.
I have a tablet (GoClever R105KB) with Rockchip RK3066 chipset.
So far, I did not find any alternative ROM for it.
I am quite happy with the stock firmware (I just rooted it), but I'd like to modify a single thing - the USB_OTG driver.
The stupid device designer compiled the kernel with the flag CONFIG_USB_OTG_BLACKLIST_HUB enabled.
Therefore my keyboard with integrated hub and mouse port does not work.
I'd like to recompile the kernel, however, the device manufacturer did not post any sources.
I am thinking about downloading the kernel sources for 3.0.8+, compile the hub.c myself and somehow force the module to the kernel.
Can anyone advice if this is even possible?
Thanks.
I now found out that there is some option to patch already running kernel, or maybe disassemble the kernel, remove the condition and assemble it back.
Does anyone have experience with such activity?

Categories

Resources