Pages

Build custom ROM for Allwinner A10 based Android Tablets 1

  • PART I
For the sake of this tutorial I will assume that you know your way around Linux but is starting fromk scratch on Android.
Building ROMs and kernels for your tablets or phones can be exhilarating when it works and depressing when it does not. Some time it simply will not work due to an unknown reason , no matter what you throw at it or how many hours you sink, if that happens do not get disheartened , just close it and move on to another ROM or Kernel build or search and wait till more information is available about the target device. This will help to keep your creative juices flowing, avoid disturbing thoughts of inflicting self injury
To build an Android kernel or ROM you will need a decently powered machine so that old pentium iv will not work. You will need a machine with
1. A 64bit dual core cpu (like Core2Duo etc(
2. 2 GB or more of RAM
3. Free hard disk space of 80 GB atleast, if you can invest in a separate HDD.
4. A decent internet connection of 512 kbps or more.
Once you get the hardware ready. Download Ubuntu 64bit 10.04 LTS. In this case the latest is not necessarily the greatest. Android kernels are almost always compiled on Ubuntu 9.xx or Ubuntu 10.04. So stick to it and you will avoid problems later on.
Once you have downloaded Ubuntu 10.04, burn in on to a CD and install it on the machine you prepared for kernel building purpose. If you are using the same machine, you can dual boot it.
After you have installed Ubuntu, configure your network connection and connect to the internet. If you are using wifi to access internet, do not worry, most wifi adapters like Dlink, Netgear are detected automatically on Ubuntu and gets configured without you having to lift a finger.
Now that Ubuntu is installed and working and you are connected to the Internet, the fun begins. Open the terminal and start typing

Step 1
We will need JDK 6 for our purpose and it has been removed from the Ubuntu repositories, so need to do install it from a PPA. Type the following

sudo add-apt-repository ppa:ferramroberto/java sudo apt-get update sudo apt-get install sun-java6-jdk sudo apt-get install sun-java6-jdk sun-java6-jre sun-java6-plugin sun-java6-fonts
After all this is complete

java -version
The output should look the one shown below
Now with Java out of the way, let us download the essential tools for compiling a kernel

Step 2
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc
The time taken will depend upon the speed of your internet connection.

Step 3
mkdir ~/bin PATH =~/bin:$PATH
Now we will have to get the “repo” client, this is what downloads the Android kernel sources to your computer. Think of it as a download manager for “git” repositories.

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo   ~/bin/repo chmod a+x ~/bin/repo

Step 4
We have to download the Allwinner kernel sources.

mkdir ~/a10 cd ~/a10 git clone https://github.com/allwinner/linux-2.6.36  " onclick="javascript:_gaq.push(['_trackEvent','outbound-article','http://github.com  ']);">https://github.com/allwinner/linux-2.6.36 
lichee Once the download is complete, look inside the “lichee” directory and it should look like this

Step 5
Now we need to get the Android AOSP. You can download all the versions of Android or you can download a specific version. Since the Allwinner kernel is based on 2.3, for this purpose we will only download 2.3.7. This is the latest version of the Gingerbread. In the future when Allwinner releases source for ICS 4.X we can download that too.
Note this download can take many hours, so prepare to start it and leave your machine switched on and connected to the internet. I do this at night and leave the machine to download and check it in the morning.

mkdir android cd android repo init -u https://android.googlesource.com/platform/manifest   -b android-2.3.7_r1 repo sync
After this command completes, list all the files and your directory should look like this. If for any reason the download doesnot complete or hangs, close the terminal, open a new terminal and
type

repo sync
It will start downloading where it last stoppped, than wait for it to complete.
If repo completed successfully move to the next step.

Step 6
cd ~/android/system/core git pull git://github.com/arpandeb/allwinner_a10_core.git

Step 7
Now we need to download the board files for the tablets. I have found the board files for Ainol Novo 7 and the general crane motherboards(essential). In a later tutorial I will show you how to build board files for your specific tablet, which is what I am doing for the VeeDee D10/Ployer MOMO9, XTAB A10, iBerry BT07i.

cd ~/android/device git pull git://github.com/arpandeb/allwinner_board_files.git softwinner
Now that we have downloaded all that we need, next we have to configure the cross compilers to build kernels for the ARM architecture.
More to come…

  • Source :
http://arpandeb.com/03/2012/tech-guides/how-to-build-custom-rom-for-allwinner-a10-based-android-tablets-a-tutorial-and-guide.html
Related Posts Plugin for WordPress, Blogger...