Android system porting and driver development

Source: Internet
Author: User

Android developed very quickly in the 21st century, with a large share of the market, far ahead of iOS, largely because anyone could use Android's source code to customize the embedded development system entirely, without having to pay Google a penny.

With the rapid development of the communications and electronics industries, a large number of new chips are produced every day, and a large number of new boards are designed, so there will also be a large number of device drivers that need to be developed, driven, or run in a simple single-tasking environment, or run on VxWorks, Linux, Windows and other multi-tasking operating environments, play an irreplaceable role.

Build Android systems from zero for specific hardware platforms, including platform porting, application development, kernel development, and driver development. At present, the demand for Android talent is mainly distributed in the application development and the bottom system development two aspects, today's enterprise is the most scarce is both a versatile system engineer, and embedded Linux talent demand is basically similar. The driver communicates the hardware and application software, while the driver engineer communicates with the hardware engineer and the application software engineer.

Android is based on the Linux kernel. Because Android native code does not support many devices, so we want to run Android perfectly on our devices, we need to develop some other programs so that Android can recognize the various hardware in the corresponding device, this process is called "porting". Any Linux driver has a load function and an unload function, which are specified by Module_init and module_exit macros, respectively.

We want to know that Android is a very good embedded operating system. It has its own perfect system architecture, divided into 4 layers: 1th tier, Linux kernel, android using Linux2.6 kernel, 2nd layer, C/C + + code base, mainly including Linux. So files and NDK code embedded in the APK program; 3rd layer, due to Android The SDK API is written in the Java language, so this layer can also be called the Java API layer. This layer is a variety of libraries written in Java, the 4th layer, the application, the equivalent of the Android UI. This layer is for all Android users to contact.

However, one of the first conditions for an operating system to run on a particular hardware platform is that the operating system supports the CPU architecture of the hardware platform. Of course, this is not enough, but also need to migrate Linux drivers, which are mainly done by the Linux kernel, the protagonist is the Linux driver. In addition, a hardware abstraction Layer,hal, hardware abstraction layer is added to the Android system, but HAL is not required.

Operating system through a variety of drivers to control the hardware device, it has shielded a variety of devices for users, drive hardware is the most basic function of the operating system, and provide a unified operation. The device driver is one of the most basic components of the operating system, and also occupies more than 60% of the Linux kernel source program. Therefore, it is important to be familiar with driver writing.

The structure of the kernel in Android and the standard Linux2.6 kernel are basically the same, and Android has added private content on its basis. Android's main additions to the Linux kernel are drivers, which are mainly divided into two types: Android-specific drivers and device drivers used by Android. Through this chapter, we have a preliminary understanding of the driver concept and the development principle of Android drive.

Android system porting and driver development

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.