Give up the information immediately.
Step 1: Install the vim Tool
Step 2: Install the samba tool to create a shared folder with Windows
Step 3: Install the Android system to compile the involved development kit: Git-core GnuPG valgrind flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev
Step 4: Install java1.5 and use java1.5 to compile the android kernel.
To update/etc/APT/sources. List, add the following:
1. Run sudo gedit/etc/APT/sources. List
2. Open Sources. List and add the Deb http://mirrors.163.com/ubuntu/ at the end of the hard main multiverse save close
3. Run the sudo apt-Get update command.
4. Run the sudo apt-Get install sun-java5-jdk to download and install Java 5
It should be noted that the official documentation said that if you can use sun-java6-jdk problems, you have to use sun-java5-JDK. Tests showed that if only make (make does not include make SDK), it is no problem to use sun-java6-jdk. The Make SDK has a problem. Strictly speaking, there is a problem with make doc. It requires the javadoc version 1.5.
Therefore, we 'd better install the sun-java6-jdk after installing the sun-java5-jdk, or just install the sun-java5-jdk. Here, both sun-java6-jdkand sun-java5-jdkare installed, and only javadoc.1.gz and javadoc are modified. Because only these two are used by the make SDK. In this case, except that the javadoc tool uses version 1.5, all other tools use version 1.6:
$ Sudo apt-Get install sun-java6-jdk
Modify the link of javadoc
$ CD/etc/alternatives
$ Sudo RM javadoc.1.gz
$ Sudo ln-S/usr/lib/JVM/Java-1.5.0-sun/man/Man1/javadoc.1.gz javadoc.1.gz
$ Sudo RM javadoc
$ Sudo ln-S/usr/lib/JVM/Java-1.5.0-sun/bin/javadoc
Fifth: Compile the android kernel and Linux Kernel
Android kernel compilation method:
Note: Because the android kernel has more than 3g, it is recommended that the storage space allocated when the ubuntu11 system is installed be greater than or equal to 20G (the Android system is relatively large ), memory Allocation is greater than or equal to 1 GB (otherwise, an error occurred while compiling the Android system)
Previously, the android Kernel File and Linux Kernel File were copied to the corresponding Android file and Linux File respectively.
As you can see, the android system is very huge. Many beginners cannot compile it smoothly, and it takes a long time to compile it (1.5-4 hours or even longer ), for ease of use, we have prepared ready-made source code packages and made three scripts for compiling and creating andoid systems: Build-Android and genrootfs. SH and genrootfs-s.sh
Run the following command on the command line:
# Cd and Android-2.3
#./Build-android
It takes a long time to compile the Android-2.3 system. We recommend that you do not use virtual machine compilation for Android development. Using a multi-core CPU and a real Linux system will be faster. Then, execute the script:
#./Genrootfs. Sh
We can extract the target file system from the compiled Android system, and finally generate the rootfs_dir Directory, which is exactly the same as the rootfs_android content mentioned above. Tip: using the genrootfs-s.sh script, you can compile an LCD package for the serial touch screen controller.
How to compile the Linux kernel:
The Linux Kernel used by Android is different from the standard Linux kernel, but the method and steps are similar. If you are not familiar with Linux Kernel configuration, we recommend that you use the default Kernel configuration.
To compile the kernel for the n43 LCD, use the default Kernel configuration as follows:
# Linux-2.6.36-android/CD
# Cp config_android_n43. config; note that there is a "." In front of config "."
# Make
The zimage will be generated in the arch/ARM/boot directory. We will rename it azimage_n43 and place it in the disc to differentiate
To compile the kernel for the a70 LCD, use the default Kernel configuration as follows:
# Linux-2.6.36-android/CD
# Cp config_android_a70. config; note that there is a "." In front of config "."
# Make
The zimage will be generated in the arch/ARM/boot directory. We will rename it azimage_n70 and place it in the CD for differentiation.
Problems and Solutions during Android Compilation:
1,
Make: *** [out/host/linux-x86/obj/static_libraries/libutils_intermediates/refbase. O] Error 1
Make :***
Solution:
Gedit frameworks/base/libs/utils/Android. mk
Set
Local_cflags + =-dlibutils_native = 1 $ (tool_cflags)
To:
Local_cflags + =-dlibutils_native = 1 $ (tool_cflags)-fpermissive
2,
Make: *** [out/target/common/obj/java_libraries/framework_intermediates/noproguard. classes-with-local.dex] killed
Solution:
Allocate 1 GB of memory to the Ubuntu System of the VM.
3,
<Command-line>: 0: 0: Error: "_ fortify_source" redefined [-werror]
Make: *** [out/host/linux-x86/obj/executables/obbtool_intermediates/Main. O] Error 1
Solution:
Modify build/CORE/Combo/HOST_linux-x86.mk 61 lines, Set
Host_global_cflags + =-d_fortify_source = 0
Modify
Host_global_cflags + =-u_fortify_source-d_fortify_source = 0