Skip to main content

Posts

Showing posts from June, 2011

Compiling tun.ko for Android - OpenVPN

I have a Xoom, and a Galaxy S, and need to be able to compile my own tun.ko for the kernel version I have. As you all know, if the kernel version of the module you are trying to insert isn't the same, it won't insert, and will give you errors like:


<3>[95175.874872] tun: version magic '2.6.36.4-athm1-OV-launchpad-1.2.2+ SMP preempt mod_unload ARMv7 ' should be '2.6.36.3-gc2bee64 SMP preempt mod_unload ARMv7 '

in dmesg. We need to compile the module for the right version of the kernel


Download the Kernel source - normally from http://android.git.kernel.org/. The Xoom can be found at http://android.git.kernel.org/kernel/tegra.git, and the Galaxy S can be found at http://android.git.kernel.org/kernel/samsung.git. Use

$ pwd
   /scratch/xoom
$ git clone http://android.git.kernel.org/kernel/tegra.git to clone the Xoom kernel sourceCopy your old kernel config from your device

$ pwd
   /scratch/xoom
$ adb pull /proc/config.gz
$ gunzip config.gz
$ mv config.gz tegr…