Compile kernel for Allwinner A20 Android Jelly Bean 4.2.2 tablet

12. December 2013 10:33 by Cameron in Android  //  Tags: , , , , , , ,   //   Comments

I recently bought an iView 777TPCII 7" Allwinner A20 tablet running Android Jelly Bean 4.2.2 and it has USB OTG support, but sadly no native joystick support! So naturally, I thought, I need to compile the necessary kernel modules to enable joysticks/gamepads. I'm no expert on compiling kernels for Android, but this method seems to work. You need to have a Linux or cygwin environment to compile your kernel. I've used VirtualBox on Windows 7 and installed Ubuntu 13.10 32-bit to setup my Linux build environment. I'm assuming you can install Linux in a virtual machine. It's fairly straight forward. After you have installed Ubuntu, you need to install the toolchain for building the kernel:

sudo apt-get install gcc-arm-linux-gnueabihf build-essential git u-boot-tools libncurses5-dev

Then you need to clone the linux-sunxi repository so you can build it:

git clone -b sunxi-3.4

After you have cloned the repository, change to the linux-sunxi directoy:

cd linux-sunxi

Then you need to setup the configuration for the A20 using this command:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- sun7i_defconfig

Now you can configure your kernel options by running:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig

Proceed to building your kernel and modules

make -j4 ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- uImage modules

The -j4 option runs 4 make instances at the same time. Adjust to your CPUs available.

Finally, you need to create a full module tree:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=output modules_install

Month List

Tag cloud