The first chapter of the book is mainly about Android system, to understand the pre-transplant of Android system, as well as the Linux kernel and drive to explain.
Android is already forming a very complete embedded operating system. Android's system architecture is divided into 4 layers: the first layer of the Linux kernel, mainly including the driver and the management of memory, process, power and other resources of the program; the second C + + code base includes Linux. So files and the NDK code embedded in the APK program; third-tier Android SDK API, Java APK for direct application, fourth tier application, Java application directly to end user. All Android apps belong to this layer.
Android migration can be divided into two parts: application porting and system porting.
Application porting refers to porting the fourth tier of applications to a specific hardware platform. There are differences between the Android SDK APIs because of the differences between the hardware platforms.
System porting refers to having the Android operating system run on a particular hardware platform. One of the first conditions in which an operating system runs on a particular hardware platform is that the operating system supports the CPU architecture of the hardware platform. Linux itself supports many CPU architectures. Therefore, in addition to porting the CPU architecture, the most important thing is to migrate Linux drivers.
For the Linux kernel, there are rules for naming the Linux kernel version number. The Linux kernel version number consists of the major version number, the minor version number, the revision number, the fine-tuning version number, and the special tuning for a particular Linux system. How do I see the version of the Linux kernel? You only need to enter the Cat/proc/version command at the terminal to view it.
The driver targets the memory and peripherals. Linux divides memory and peripherals into three categories: character devices, block devices, and network devices. Character devices must be accessed sequentially in sequential order, block devices can be accessed in any order, and network devices are packet-oriented acceptance and delivery.
Learn Linux driver programming It is important to understand that Linux drivers are only relevant to the Linux kernel and are not related to the Linux system used by the user. Learning about Android-driven development is learning Linux-driven development.
Android Drive porting and Driver development overview