Android system porting and Driver development----Chapter I.

Source: Internet
Author: User

Chapter One Android system porting and driver development

Android source code customization completely belongs to their own embedded system, but the number of supported devices is not many, so to be ported, and in the process of porting the use of the need to mention the driver development.

The Android system architecture consists of four levels: Linux kernel, C + + code base, Android SDK API, application. In the first tier of Linux mainly include drivers, memory management, process management, power management programs, but different versions of the system is not the same driver, remember not to be generic. There are. So files and virtual machine runtime in the second-tier C/S code base, the third-tier Java language is based on the library, and the fourth-tier application corresponds to the UI and relies on the library.

Android system porting is divided into application porting and system porting, but application porting is generally not used. So Android porting refers to having the operating system run on a specific hardware platform: CPU architecture and identifying hardware devices, with drivers done in the kernel, case: WiFi. Also added Hal, which is located in the second layer, Android does not have a direct access driver, but instead passes the HAL. The root of the system migration is the source code, the main work is: porting Linux drivers, porting HAL. Hal is unique to the Android system.

There are two ways to view the Linux kernel version: 1. Terminal command: Uname–a;2.cat/proc/version.

Linux kernel version number components: Major version number, minor version number, revision number, fine-tuning version number, special correction description, for example: 2.6.29.7-FLYKERNEL-12A.

How to learn Linux driver development: Prepare a familiar Linux operating system for developing and testing Linux drivers, suggest using Ubuntu Linux10.04 above, a development board, learn gun C, learn relevant knowledge, and keep practicing.

It turns out that there is no software hardware that is connected to each other through hardware interfaces, and now the hardware abstraction is greatly facilitated by the use of drivers. Linux divides memory and peripherals into 3 major categories: Character devices, block devices, and network devices. Difference: Character devices are accessed in serial order without fast buffering, while block devices can be accessed randomly, in blocks, through fast buffering, but for the user it is used by the file system via open (), close (), read (), write () to access, And the network device is data-oriented receiving and sending. Case: USB,PCI,LCD.

What you need to understand here is that there is a load function and an unload function in the Linux driver.

Android system porting and Driver development----Chapter I.

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.