Chapter One Introduction to Android system porting and driver development
Core Content Summary:
Android 's system architecture is divided into 4 Tiers:
1) Linux kernel (linux drivers and memory management, process management, power management programs, etc.)
2) code base C + + ( code base written in C + + ,dalivk virtual machine Runtime)
3) Android SDK API( various libraries written in java )
4) application (all applications belong to this layer)
The main work of Android system porting (application porting and system porting):
• Porting Linux drivers;
• Porting the HAL.
To view the Linux kernel version:
Method One: execute the following command on the Linux terminal
Uname-a
Method Two: execute the following command on the Linux terminal
Cat/proc/version
definition rules for Linux kernel version numbers:
• major version number;
• This version number;
• revision version number;
• Fine-tuned version number;
• Special tuning descriptions for specific Linux systems.
Linux device drivers:
A driver is a kind of program that interacts directly with hardware and is responsible for abstracting the hardware.
The hardware of a computer system is mainly composed of CPU, memory and peripherals.
The driver targets the memory and peripherals (internalCPU -integrated memory and peripherals), rather than the CPU cores.
Linux divides memory and peripherals into 3 major categories:
• Character devices (those that must be accessed sequentially in serial order);
• Block devices (can be accessed in any order, in block units);
• Network devices (designed for packet acceptance and delivery, which do not correspond to the node of the file system).
Linux driver:LED driver
LED -Driven code deeds many functions and structures (readl,writel,printk, Miscdevice,module_exit , etc.)
Chapter One: Introduction to Android system porting and driver development