Android Deep Explore (Volume one) HAL and Driver Development Chapter Nineth

Source: Internet
Author: User

By learning Android Deep Exploration (Volume one) HAL and Driver Development Nineth Chapter Let me know the HAL hardware abstraction layer, why to add Hal and Android Hal Architecture in Android.

Hal is a set of libraries built on Linux drivers. This library is not part of the Linux kernel, but is the application layer on top of the Linux kernel layer, the main purpose of which is to avoid direct access to the Linux driver, but also the important reason is to protect "private property."

Linux drivers in traditional Linux systems typically have two types of code: Access to hardware register code and business logic code. So the main reason to join HAL is: 1, unified hardware call interface, because HAL has a standard call interface, so you can use Hal Shield Linux Drive complex, non-uniform interface; 2, solve the GPL copyright issue, because the Linux kernel based on the GPL protocol, While Android is based on the Apache licence2.0 protocol, and Hal has a layer of sensitive code that was originally in Linux drivers, 3, for some special requirements, for some hardware, may need to access some user's space resources, Or work that is inconvenient in the kernel space, and special requirements, in which case the HAL code located in the user space can be used to assist the Linux driver in doing some work.

The basic principle of the HAL architecture is to use the library in the Android system to invoke Linux drivers located in kernel space, and then the Android application can access the libraries in the HAL through the NDK program, or access the libraries in the HAL directly in the Android application.

Android Deep Explore (Volume one) HAL and Driver Development Chapter Nineth

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.