OpenVPN (inkl tun.ko) for SE Xperia Mini Pro (SK17i)

I just got a Sony Ericsson Xperia Mini Pro to use as my work phone. Apart from syncing my email/calendar I wanted to be able to connect to our network cluster, which is running OpenVPN. OpenVPN is available for Android, and following this tutorial I soon had it installed on my phone, the only problem was that there is no tun kernel module (tun.ko) available for the SK17i. I contacted Sony Ericsson to get some help but they don't provide kernel modules at the moment. So the only option was to build it myself, here is what I did:

Extract the Kernel Source and Android NDK/SDK to a folder (say android) in home directory. In the 4.0.A.2.364/kernel folder run:

ARCH=arm make semc_mango_defconfig

This will generate a .config file. Now edit that file and add CONFIG_TUN=m then run:

ARCH=arm CROSS_COMPILE=~/android/android-ndk-r5/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make

This will take some time, when its done run:

ARCH=arm CROSS_COMPILE=~/android/android-ndk-r5/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/arm-eabi- make modules

You will now find the resulting tun.ko in 4.0.A.2.364/kernel/drivers/net, copy it to your phone and run an insmod and you are done.