Android Deep Explore--hal and Driver Development----The Nineth Chapter reading notes

Source: Internet
Author: User

Google for Android to join Hal mainly for the following purposes.

The calling interface for unified hardware. Because Hal has a standard calling interface, HAL can be used to mask Linux to Drive complex, non-uniform interfaces.

GPL;" copyright issue. Because linux kernel based gpl agreement, and apache Licence 2.0, agreement. Therefore google played a" crossing ", will originally be located in Linuxlinux

For some special requirements. For some hardware, you may need to visit some user-space resources, or work that is inconvenient in the kernel space, and special needs. In these cases, the HAL code located in the user space can be used to assist the Linux driver in doing some work.

To write a Linux driver that supports HAL

Step 1, write Linux drivers

"Writing Linux drivers" is nonsense from the show, but if you want to add HAL to the Linux driver and want to protect sensitive data as much as possible. Linux- driven code should be as concise as possible to put business logic into the HAL Library .

Step 2 : Write HAL

The HAL library is an ordinary Linux library (*.so ) file. However, this type of library file has an interface. Implemented by the HAL Module_info SYM variable. The Service Library is positioned hallibrary by the ID defined in this interface .

Step 3 : Write the Service Library

Although this step is not required, the new HAL architecture requires us to do so. The Service Library is also a Linux library . This step is more flexible. The Service Library can be a generic Linux library, or it can be a JNI library.

Android Deep Explore--hal and Driver Development----The Nineth Chapter reading notes

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.