Android operating system, with its open source advantage to sit in the embedded system faucet position. Android's custom process for specific hardware is called an Android "transplant". Android customization is mainly to complete the low-level driver development, because Android is Linux-based, so complete the Linux customization.
Liunx customization is to complete the Linux driver customization, so it is necessary to understand what the Andriod architecture and Linux drivers are related to. The Android architecture is divided into four layers: the Linux kernel is the lowest layer of Linux, it is a layer of the. so file on the top level of the three-C + + layer, and the upper Android SDK layer belongs to the Android application custom interface; The top Android application layer belongs to the APK file. So, the andriod transplant focuses on the bottom layer of the Linux kernel. What do you mean the kernel? The kernel is a system software that provides hardware abstraction layers, disk and file system control, multitasking, and more. It is a contained relationship with the operating system, so a kernel is not a complete operating system.
So how do you determine if a Linux kernel is required for our target andriod system? With the Linux kernel version, as long as the Linux kernel version of the five components and our ported Andriod system Linux kernel version exactly the same can be considered that the kernel contains the driver is available. These five sections are: Major version, minor version, revision number, fine-tuning version number, and specific system tuning description. Android devices can view the kernel version in Settings, and the Linux operating system can be used in one of two commands: Cat/proc/version; uname-a (more information).
Above, not the andriod system transplant all preparation, also need HAL transplant, that is, the hardware abstraction layer insert. Because the Andriod system is an operating system that interprets execution, it inevitably runs on the interpreter and does not directly access the drive layer, so HAL is required to abstract various andriod devices as intermediaries.
After both are ready, you need an explanation of the execution language to compile the porting of the above content, I am familiar with the Linux environment programming language is GNU C, and to run GNU C must need a Linux operating system, I use the Ubuntu unicorn. In addition, the Development Board can be better equipped, it is the power of the simulator does not have, such as the simplest led testing, AVD can not be simulated.
When it comes to hardware, Linux devices are not driven by the CPU, because many of the cores contain a variety of architecture-driven, so they are mostly storage devices and peripheral devices. Linux uses a file system whose hardware is divided into three categories: a character device, a block device, and a network device, but the first two are not the same as the order of access, but they differ greatly from the third part. The drive mainly revolves around these three kinds of research.
Finally, learning Andriod system transplant also needs to accumulate the number of subjective practice, the actual exercise is the best teacher.
http://www.cnblogs.com/lv-peng/
2016-05-02 19:46:00
Initial knowledge of Android transplant