Android Deep Explore Nineth Chapter Summary

Source: Internet
Author: User

Learn the Nineth chapter, the Hardware abstraction layer:HAL. HALThe hardware abstraction layer is built on theLinuxa set of libraries on top of the driver. Belong toLinuxthe application layer on the kernel layer. HALThe main purpose is to avoid direct access to the applicationLinuxto protect "private property". of traditionalLinuxdrivers generally have two types of code: the code that accesses the hardware register and the business logic code. The hardware abstraction layer is the interface layer between the operating system kernel and the hardware circuitry, which is designed to abstract the hardware. It hides the hardware interface details for a particular platform,providing a virtual hardware platform for the operating system,make it hardware agnostic,can be ported on multiple platforms. The hardware abstraction layer is a programming layer that allows computer operating systems to interact with hardware devices at the logical layer rather than at the hardware level. The hardware abstraction layer can be called by either the operating system core or the hardware driver. In either case, the calling program does not need to know the specifics of the hardware design, only the parameters required by the abstraction layer. Writing SupportHALof theLinuxDriver steps:1.WriteLinuxDrive;2.WriteHAL Library;3.WriteService Library.

InAndroidused in the systemLinuxThere are two ways of driving:1.through the traditional way directly withLinuxDrive interactions. 2.androidpeculiar to, by theHALmodule. is essentially throughLinuxShared Libraries(. So)with theLinuxthe driver interacts, and then the application re-accessesLinuxshared libraries. In learningAndroidin the process of the hardware abstraction layer, we will learn how to write hardware drivers in kernel space, how to add interfaces in the hardware abstraction layer to support access to hardware, how to provide hardware access services at system startup, and how to writeJNImakes it possible to passJavainterface to access hardware, and so on.

Android Deep Explore Nineth Chapter Summary

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.