Android Deep Exploration (Vol. 1) HAL and Driver Development Chapter I

Source: Internet
Author: User

The Android system framework consists of four layers:

Top level is the application layer (application layer)

The second layer is the application framework layer (the framework layer)

The third layer is the System runtime layer (Android runtime layer, someone will unify two or three layers together)

At the bottom is the Linux kernel layer (including hardware drivers).

Linux divides memory and peripherals into 3 basic categories:

Character device.     Block devices. Network devices.

(character devices are devices that must be accessed sequentially sequentially, such as a touchscreen, a tape drive, a mouse, and so on.) Block devices can be accessed in any order, in blocks, such as hard disks, eMMC, and so on. The driver design of the character device and the block device varies greatly, but for the user, they are accessed using the file system's operating interface open (), close (), read (), write (), and so on. )

Device-driven role:

The operation of any computer system is the result of joint efforts of hardware and software, no hardware is castles in the castle, and no software hardware is just a pile of scrap metal. Hardware is the underlying foundation, is the platform for all software to run, the code will eventually be implemented as a combination of hardware logic and timing logic, software implementation of the specific application, it according to a variety of business needs and design, and complete the user's final request. Hardware is fixed, software is flexible, can adapt to a variety of complex and changeable applications. Therefore, the hardware and software of the computer system have achieved each other.

However, there is also a paradox between hardware and software, that is, the hardware should not penetrate into each other's territory. In order to complete the design as quickly as possible, the application software engineer does not want or care about the hardware, and the hardware engineer is also difficult to have enough leisure and ability to account for the software. For example, application software engineers do not have to care about interrupts on the NIC, registers, storage space, I/O ports, chip selection, and any other hardware vocabulary when calling sockets to send and receive packets, and when using the printf () function to output information, He does not need to know how the underlying information is output to the screen or serial.

Android Deep Exploration (Vol. 1) HAL 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.