From the Linux drive to Android Drive development for half a year, the beginning of a very tangled goal and problem, is the constant Google how to porting android! The result of this problem was lost to the fledgling me. With the need for work, their own experience will slowly increase, these fog also slowly untie, here to thank my own efforts and the boss of the careful cultivation of senior engineers.
On the other side, porting Android to a specific hardware platform, the core of which is the BSP construction work, BSP is a board-level support package, not a specific file, but a functional understanding of a hardware adaptation package, its core is:
1. Linux kernel hardware related parts (mainly Linux device drivers);
2. Hardware abstraction layer for Android user space. (hal,hardware abstract layer).
Linux drivers work in kernel space, and the Android HAL works in user space, with the combination of these two parts, which allows a huge Android system to run on a specific hardware platform.
After having a specific hardware platform, in order to adapt to different versions of the Android system, its BSP part of the code usually needs to be rewritten or modified, the device driver can be reused, the hardware abstraction layer needs to be modified.
The BSP work and core should be the original hardware underlying. For example, Bluetooth headset, Bluetooth transmission files, Bluetooth chat and other programs depend on the hardware is Bluetooth, cameras, cameras, barcode recognizer and other programs are dependent on the underlying camera, automatic screen, shaking the screen control of the various games, are also dependent on the accelerometer.
At present, the general processor or hardware platform of the BSP (Board Support package) is done by the chip manufacturers unified , and has matured. so the main work of the developer is not to build the full BSP, but to debug and modify the existing BSP. In fact, each chip manufacturers will have a hardware platform reference design, such as PMU,EMMC,WIFI,CODEC,CTP. If there is not much change, the original BSP generally can be run up, for a piece of hardware changes to modify the driver and Hal, for the new added hardware, write the relevant driver, and then provided to the Java Local Framework layer interface can be. for some simple device drivers, you can not write the HAL code, in fact, many times do not write, a common situation is the JNI part of the code directly call the driver device node or use the Sys file system. It is also possible to directly provide a file interface for the/sys/properties file (which can be read and written by Cat and Echo) directly to the Java layer code call.
Android'sMain driverYes:
1. Display driver displays driver: Commonly used for Linux-based framebuffer frame buffer drivers.
2. Flash memory drive Flash Memories Driver: MTD-based flash driver.
3. Camera-driven camera driver: Linux-based v4l video for Linux drivers.
4. Audio driver: Based on ALSA Advanced Linux sound architechure driver.
5. WiFi driver: Driver based on the IEEE801.31 standard.
6. Keyboard driver Keyboard driver: Keyboard driver as input device.
7. Bluetooth Drive Bluetooth diver: Unlimited transmission technology based on the IEEE801.35.1 standard.
8. Binder IPC Driver: Android A special driver, with separate device node, provides the function of interprocess communication.
9. Power Management Energy Management: Manage battery power and other information.
android** Main Libraries * * are:
1. C Library, based on the implementation of Linux system call Library, C language standard library, is also the bottom of the system library.
2. Multimedia Framework Media framwork
3. sgl:2d Image Engine
4. SSL Secure Socket Layer: Provides security support for data communication
5. Open GL: Support for 3D
6. Interface Management Tools Surface management
7. SQLite: A common embedded database
8. Webkit: The core of web browser
9. Free type bitmap and vector font features
The Android main framework is:
1. Active activities
2. Boardcast Intent receiver Broadcast intent receiver
3. Content Provider Contents Provider
4. Intent and Intent filter Intent and intent filters
Android's application framework is an API for app development and is actually an application framework that is used directly by Api,java developers who are well-established by Google. This layer provides the first control that the UI program needs, such as the View Control, which includes List,grid,text,box,button, and even an embedded web browser.
Android BSP and hardware related subsystem reading notes (1) Android BSP porting overview