Why do we need a userspace HAL

Not all components have standardized kernel driver interfaces Kernel drivers are GPL which exposes any proprietary IP Android has specific requirements for hardware drivers

Hardware Abstraction Layer

HAL Header Example r

// must be provided by each Acme hardware implementation typedef struct {

} AcmeFunctions;

const AcmeFunctions *Acme_Init(const struct Env *env, int argc, char **argv);

Hardware Abstraction Layer

Hardware Abstraction Libraries r

• Libraries are loaded dynamically at runtime as needed dlHandle = dlopen("/system/lib/libacme.so", RTLD_NOW);

acmelnit = (const AcmeFunctions *(*)(const struct Env *, int, char **))dlsym(dlHandle, "Acme_Init");

acmeFuncs = acmeInit(&env, argc, argv);

Hardware Abstraction Layer

Agenda

• Android Anatomy

• Native Libraries

• Android Runtime

• Application Framework

• Android Physiology

• Start-up Walkthrough

• Layer Interaction

Android Anatomy

Libraries

Andrdid Runtime

Surface Manager

Media Framework

SQLite

Core Libraries

OpenGL|ES

FreeType

WebKit

DalvikVirtual Machine

SGL SSL Libe

Linux Kernel

Display Driver

Camera Driver

Bluetooth Driver

Shared Memory Driver

Binder (IPC) Driver

USB Driver

Keypad Driver

WiFi Driver

Audio Drivers

Power Management

+1 0

Responses

  • sally
    Why we need android hardware abstraction layer?
    6 years ago

Post a comment