• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Info/brainstorming] Compiling modules for the 2.6.32 beta kernel OBSOLETE

Search This thread

kabaldan

Inactive Recognized Developer
Dec 15, 2009
1,640
3,926
Prague
android.doshaska.net
This thread is now obsolete.
Kernel sources for build 5.26.0 have been released:
https://opensource.motorola.com/sf/go/projects.milestone/frs.milestone_source_froyo

I've pushed some new pre-compiled modules to github, though beware, I haven't had time to test all of them on device yet:
https://github.com/nadlabak/android...mmit/b300803348705d3fc5ce76d8c88d57186748a370

As the kernel sources are not yet available from the Motorola's open source project, here is an outline how I compiled the overclock and cpufreq governor modules. (Btw., the overclock module needed a substantial adaptation, see the source here: http://android.doshaska.net/2.6.32oc )

I'm using the sources from this AOSP repo:
Code:
git clone git://android.git.kernel.org/kernel/omap.git
git checkout --track -b android-omap-2.6.32 origin/android-omap-2.6.32

Use the sholes config:
Code:
make sholes_defconfig

flags that need to be disabled:

CONFIG_LOCALVERSION_AUTO
CONFIG_MODVERSIONS
CONFIG_DEBUG_MUTEXES
CONFIG_SCHEDSTATS
CONFIG_SCHED_DEBUG


[updated on 17.01.2011, thanks go to Skrilax_CZ]
At least the ext2 will work without panics when compiled using this config.

For tun, cifs and nfs there is still some additional config mismatch that prevents the modules to work without null pointer dereference oops.

Also, even when no custom kernel module is used, you can get the kernel panic very easily, try to enable wifi and do:
Code:
cat /proc/kallsyms


If you're interested in a more detailed android kernel compilation guide, you can e.g. roughly follow this Droid kernel guide: http://www.droidforums.net/forum/rescue-squad-guides/31452-how-compile-your-own-kernel.html
 
Last edited:

leobg

Senior Member
Mar 7, 2006
1,366
138
Thanks for starting this thread kabaldan! It is a great starting point in tackling the issue of adding tun support to the new kernel (tun.ko module). I am not as good as many others in this, but trying won't hurt. Meanwhile if someone else is working on tun support - share experience here!
 

xphp

Member
Feb 24, 2010
6
0
If kernel seems to be ok, sometimes mounting with new version of busybox won't work.
I used to get kernel panic when use newer version of busybox (not Android kernel but my own embedded linux)
 

yantz

Senior Member
Jul 5, 2010
147
168
same problem using droidx kernel sources. insmod ok, mount reboots the phone

yantz
 

leobg

Senior Member
Mar 7, 2006
1,366
138
I tried droid2 kernel module - doesn't work either :(

I noticed OpenVPN included in CM6 also relies on this kernel module. Hence doesn't work. I guess we won't (ever) see kernel sources for that leaked kernel we are now using. I assume Motorola will release the sources sooner or later, but not before official Froyo layout. The waiting is killing me! kabaldan, can't you try to do some magic as you did with the overclock module? The beer is from me!!!
 

kabaldan

Inactive Recognized Developer
Dec 15, 2009
1,640
3,926
Prague
android.doshaska.net
Can you test this attached tun.ko?
Insmod is OK, but I currently don't have time for any further tests...
EDIT: don't bother, kernel panic as usual
 
Last edited:

leobg

Senior Member
Mar 7, 2006
1,366
138
Module loads fine, but when attempt to use it, phone reboots, just like with the module compiled from DroidX sources.. :(
 

SophT

Senior Member
Jul 29, 2010
199
8
天津
Module loads fine, but when attempt to use it, phone reboots, just like with the module compiled from DroidX sources.. :(

So, I got it loaded - insmod works just great, just like it did on the 2.1 kernel.

I'm trying to use the CM6 built-in OVPN settings, but I can't find any documentation on the setup. How did you get it set up?

I have

/sdcard/openvpn/

cert.crt
ca.crt
config.conf
config.ovpn
pem.key

I realize that config.conf and config.ovpn are the same file- but I use this VPN on windows and on Mac, and I wasn't sure the requirements on Linux.

If I can't find some documentation I'll try downloading the OpenVPN settings app from the market and playing with that.

Also, I don't know if it's true or not, but I heard the Milestone2 source compiled driver could work.
 

leobg

Senior Member
Mar 7, 2006
1,366
138
Are you trying the module kabaldan provided? It doesn't seem to work, at least for me. Loads fine, but phone crashes when setting up tun interface. I couldn't get OpenVPN in CM6 0.3 to work so far. I am testing the tun.ko with the cisco vpn package (which worked great on the old kernel with CM6 0.2) vpnc. When I initiate the connection, phone reboots if the attached here tun.ko is used. I also tried with tun.ko compiled from DroidX sources - same thing - phone reboots. I am not sure where did kabaldan take/compile this module from.

Sent from my Milestone using Tapatalk
 

SophT

Senior Member
Jul 29, 2010
199
8
天津
I was using the same one, I was thinking maybe he could use the info from more than one phone. I'll try get-a-robot or OpenVPN Installer, but I won't hold my breathe. I was just hoping to use the built-in functionality of the ROM.

*edit* Just saw he removed it because it doesn't work yet, oh well.
 
Last edited:

yantz

Senior Member
Jul 5, 2010
147
168
the kernel doesnt seem to like any other fs not built into it. i've tried several, ext2, ext3, ext4, cifs, jffs, reiserfs etc. all modules would load without a problem but system will reboot during mount. heck i even tried creating logical volume on the partition. volume created fine, but when time to mount, it reboot

i ended up using a 2nd vfat partition for apps2vfat, on top of native froyo move to sd. moved my debian arm there and manually, yes manually, replace many symlinks in libs to copied files

hopefully next froyo release for other regions would provide a different kernel

yantz
 

kabaldan

Inactive Recognized Developer
Dec 15, 2009
1,640
3,926
Prague
android.doshaska.net
Finally some breakthrough. The great Skrilax_CZ has made some hard debugging and one very good guess:

CONFIG_DEBUG_MUTEXES must be disabled in the kernel config.

At least the ext2 module compiled this way is working without panics now.

Congrats to Skrilax!

EDIT: Tun nor nfs not tested yet..., cifs unfortunately still not working.
 
Last edited:

rcbadiale

Member
Jul 27, 2010
6
3
Finally some breakthrough. The great Skrilax_CZ has made some hard debugging and one very good guess:

CONFIG_DEBUG_MUTEXES must be disabled in the kernel config.

At least the ext2 module compiled this way is working without panics now.

Congrats to Skrilax!

EDIT: Tun nor nfs not tested yet..., cifs unfortunately still not working.

This means that now the app2ext work?

Where are the modules for we test?!

Thanks for the news!
 

kabaldan

Inactive Recognized Developer
Dec 15, 2009
1,640
3,926
Prague
android.doshaska.net
after further testing:
ext2 mounting now works, reading from ext2 partition too, but writing still causes panic
tun causes panic too

Let's hope for a soon kernel source release, as it looks like we won't get much further without it.

edowar: thanks for the link
 

alncool

Senior Member
Jan 16, 2006
169
9
Paris
@kabaldan

Could it be possible to create a swap module for milestone ?
It seems that running kernels does not have this feature yet and i'm not sure motorola to implement it for next 2.2 release so .... well just wondering !
 

Top Liked Posts