How to compile tun.ko For Android (Commtiva Z71)
March 21, 2011
By clintcan
I’ve been too busy these days to compile a kernel module for android.
For those who want to compile a tun.ko kernel for Android (a commtiva z71 variant), here are the general steps. You need a linux environment to compile this module.
1. Download the kernel and supporting files for commtiva z71 devices here: [Tienes que estar registrado y conectado para ver este vínculo] and extract it to a directory of your choice.
2. Download the SDK and NDK for android: [Tienes que estar registrado y conectado para ver este vínculo] and [Tienes que estar registrado y conectado para ver este vínculo]
3. Copy config.gz from your phone and place it into your kernel source folder. To get it from your phone, type:
adb pull /proc/config.gz .
gunzip config.gz
mv config .config
4. Edit .config so as TUN module will be included into the kernel:
CONFIG_TUN=m
5. Run uname to get running kernel version of your phone:
uname -a
Linux localhost 2.6.32.9 #7 PREEMPT Tue Jan 4 16:51:45 CST 2011 arv61 GNU/Linux
6. If there was some extra characters in your kernel version, like 2.6.32.9-063c4d24, you’d have to edit the Makefile to use the corresponding version:
EXTRAVERSION = -063c4d24
7. Set your environment variables:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~[path of your arm-eabi compile toolkit binary in android ndk]
8. cd to your kernel folder and make modules
cd ~[path of your kernel source]
make modules
Resulting tun.ko should be in the drivers/net folder of your kernel source.
Just beware, it is not for the fainthearted.
Further information:
[Tienes que estar registrado y conectado para ver este vínculo]
Interpretacion.
Instala algun distro linux preferentemente si quieres seguir el tuto al pie de la letra, debian o ubuntu te serviran...
baja el kernel de tu rom... y sigue el proceso.
Es facil
March 21, 2011
By clintcan
I’ve been too busy these days to compile a kernel module for android.
For those who want to compile a tun.ko kernel for Android (a commtiva z71 variant), here are the general steps. You need a linux environment to compile this module.
1. Download the kernel and supporting files for commtiva z71 devices here: [Tienes que estar registrado y conectado para ver este vínculo] and extract it to a directory of your choice.
2. Download the SDK and NDK for android: [Tienes que estar registrado y conectado para ver este vínculo] and [Tienes que estar registrado y conectado para ver este vínculo]
3. Copy config.gz from your phone and place it into your kernel source folder. To get it from your phone, type:
adb pull /proc/config.gz .
gunzip config.gz
mv config .config
4. Edit .config so as TUN module will be included into the kernel:
CONFIG_TUN=m
5. Run uname to get running kernel version of your phone:
uname -a
Linux localhost 2.6.32.9 #7 PREEMPT Tue Jan 4 16:51:45 CST 2011 arv61 GNU/Linux
6. If there was some extra characters in your kernel version, like 2.6.32.9-063c4d24, you’d have to edit the Makefile to use the corresponding version:
EXTRAVERSION = -063c4d24
7. Set your environment variables:
export ARCH=arm
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:~[path of your arm-eabi compile toolkit binary in android ndk]
8. cd to your kernel folder and make modules
cd ~[path of your kernel source]
make modules
Resulting tun.ko should be in the drivers/net folder of your kernel source.
Just beware, it is not for the fainthearted.
Further information:
[Tienes que estar registrado y conectado para ver este vínculo]
Interpretacion.
Instala algun distro linux preferentemente si quieres seguir el tuto al pie de la letra, debian o ubuntu te serviran...
baja el kernel de tu rom... y sigue el proceso.
Es facil