portinig application, drivers and os

31
Porting Application, Drivers and OS Prashant Zaveri Android hardware Architect Holland9

Upload: momobangalore

Post on 06-May-2015

5.105 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Portinig Application, Drivers And Os

Porting Application, Drivers and OS

Prashant Zaveri

Android hardware Architect

Holland9

Page 2: Portinig Application, Drivers And Os

Objective

Brief over view of OS available for mobile Porting Android Kernel Patch HAL Adding custom application Conclusion

Page 3: Portinig Application, Drivers And Os

Overview of OS for Mobiles Iphone/Blackberry Windows Phone 7 Symbian Android Custom/properitary

Page 4: Portinig Application, Drivers And Os

Iphone/Blacberry

Proprietary Forget it …Get lost

Page 5: Portinig Application, Drivers And Os

Windows Mobile

New platform …Just started…7 At mercy of Microsoft Cool but costly

Page 6: Portinig Application, Drivers And Os

Symbian OS

Leading OS in number of units Still of last decade Very difficult to innovate Finally free..but how much !!! Will keep a watch on this

Page 7: Portinig Application, Drivers And Os

Android

Completely free Development done by Google Freedom to innovate

Page 8: Portinig Application, Drivers And Os

Android architecture

Page 9: Portinig Application, Drivers And Os

Porting Android

Android Architecture Android Kernel Android Toolchain Native libraries HAL Hardware Abstraction Layer Initialization Building the Android runtime

Page 10: Portinig Application, Drivers And Os

Android kernel

Android relies on Linux version 2.6 for core system services such as security, memory management, process management, network stack, and driver model

The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.

It comes up with several patch for “kernel enhancement” to support Android.

Page 11: Portinig Application, Drivers And Os

Why Linux ?

Android needed an open source kernel to build upon.

Linux is already open source. Very good memory and process

management Good driver model Support for shared libraries Permission based security model

Page 12: Portinig Application, Drivers And Os

Android kernel patch

IPC Binder Low memory killer Asynchronous shared memory (Ashmem) Logger Power management Android debug bridge (ADB) Hardware specific driver

Page 13: Portinig Application, Drivers And Os

Linux Kerenl patch by version

Page 14: Portinig Application, Drivers And Os

Android Toolchain

Android-toolchain-20081019 gcc 4.2.1/ binutils 2.17/ gdb 6.6 ARMV5te+ -- with-float =soft --with= fpu-vfp --enable-threads

Page 15: Portinig Application, Drivers And Os

Native libraries

Bionic LibC Functional libraries Native servers

Page 16: Portinig Application, Drivers And Os

Bionic

What is Bionic ? Custom libc implementation optimized for

embedded. Why Bionic ? To keep code in control and keep GPL out of

user space To keep small foot print To keep it fast for embedded processors

Page 17: Portinig Application, Drivers And Os

Functional libraries

Libraries which perform essential part of system functionality

Webkit OpenGL/ES SQLite SGL Freetype

Page 18: Portinig Application, Drivers And Os

Media framework

Android media framework is based on Packet Video’s OpenCORE framework

It supports standard formats for Audio/Video and still images

It has got pluggable architecture for hardware/software codes using OpenMAX IL interface

Media playback, streaming, downloading Also support speech codec OpenMAX standard compliant

Page 19: Portinig Application, Drivers And Os

Media framework architecture

Page 20: Portinig Application, Drivers And Os

Hardware Abstraction Layer

Why is HAL layer needed in Android ? Seperates the Android platform logic from

hardware interface Defines the interface that Android driver

requires hardware “drivers” to implement

Page 21: Portinig Application, Drivers And Os

Android Runtime

Android’s custom clean room implementation virtual machine

Provides application portability and runtime consistency

Runs optimized file format (.dex) and Dalvik bytecode

Java .class/.jar file converted to .dex at build time

Page 22: Portinig Application, Drivers And Os

Application Framework

Core platform services that are essential to Android

Most of them run behind scenes where application don’t access them directly

Page 23: Portinig Application, Drivers And Os

Platform Initialization

Page 24: Portinig Application, Drivers And Os

Building the Android runtime

General Procedure Get the code Build it Install it http://surce.android.com

Page 25: Portinig Application, Drivers And Os

Building the Android runtime

The code 2.1 gb of git tree #repo init –u

git://android.git.kernel.org/platform/manifest.git

# repo sync ….. tweaks….modifications…. Make <target>

Page 26: Portinig Application, Drivers And Os

Building the Android runtime

Build products Userdata.img System.img Ramdisk.img Kernel.img Run it and Android is running

Page 27: Portinig Application, Drivers And Os

Application Developers

Page 28: Portinig Application, Drivers And Os

Platform Developer

Page 29: Portinig Application, Drivers And Os

Hardware Developers

Page 30: Portinig Application, Drivers And Os

Architecture Porting

Page 31: Portinig Application, Drivers And Os

Thank YouPrashant Zaveri

[email protected]

Mobile Developer Conference by

MoMoBhttp://momob.in