Android system porting and Driver development overview

Source: Internet
Author: User

1.1android System Architecture

First tier Linux kernel: Drivers and programs for managing memory, process, power, and other resources

The second-tier C + + code library Linux. So files and NDK code embedded in the APK program

Third tier Android SDK API direct application-oriented Java APK

Fourth tier Application

1. The main work of 2Android system porting

System porting: Let the Android operating system run on a specific platform, provided the operating system supports the CPU architecture of the hardware platform, the porting of Linux drivers, the porting HAL (Hal is on the second tier, and the Android SDK accesses the Linux driver directly through the HAL), The latter two are the main tasks of Android system porting.

Application porting: The fourth tier application continues to a specific platform, due to differences between hardware platforms, the Android SDK API may be different, need to modify the source code, does not involve the driver and the HAL Library

1.3 Viewing the kernel version

Method 1: Execute on Linux terminal: uname-a

Method 2: Execute in Terminal: cat/proc/version

1.4linux kernel version naming rules

1.5 How to learn Linux drivers

A Linux operating system for developing and testing Linux drivers

A board test driver is able to run correctly on Android-enabled development boards

Learn Gun C gun c is an extension to standard C

Relevant hardware knowledge and continuous practice

1.6 Linux Device drivers

The same type, but different models of the device is abstracted into a unified interface, this interface is the driver, drive direct and hardware interaction.

Character devices, block devices, network devices

Linux has a load function (called when the driver is loaded) Mobule_init and an unload function (called when unloading the drive) mobule_exit

Linux drivers are only related to the Linux kernel and are not related to Linux systems. Only the kernel version number can determine whether the Linux kernel is the same. Learning Android Drive Development is essentially learning Linux driver development, Android has added a HAL to Linux, but HAL is not required, and the NDK can also access the Linux driver directly.

Android system porting and Driver development overview

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.