portinig application, drivers and os
TRANSCRIPT
Porting Application, Drivers and OS
Prashant Zaveri
Android hardware Architect
Holland9
Objective
Brief over view of OS available for mobile Porting Android Kernel Patch HAL Adding custom application Conclusion
Overview of OS for Mobiles Iphone/Blackberry Windows Phone 7 Symbian Android Custom/properitary
Iphone/Blacberry
Proprietary Forget it …Get lost
Windows Mobile
New platform …Just started…7 At mercy of Microsoft Cool but costly
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
Android
Completely free Development done by Google Freedom to innovate
Android architecture
Porting Android
Android Architecture Android Kernel Android Toolchain Native libraries HAL Hardware Abstraction Layer Initialization Building the Android runtime
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.
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
Android kernel patch
IPC Binder Low memory killer Asynchronous shared memory (Ashmem) Logger Power management Android debug bridge (ADB) Hardware specific driver
Linux Kerenl patch by version
Android Toolchain
Android-toolchain-20081019 gcc 4.2.1/ binutils 2.17/ gdb 6.6 ARMV5te+ -- with-float =soft --with= fpu-vfp --enable-threads
Native libraries
Bionic LibC Functional libraries Native servers
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
Functional libraries
Libraries which perform essential part of system functionality
Webkit OpenGL/ES SQLite SGL Freetype
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
Media framework architecture
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
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
Application Framework
Core platform services that are essential to Android
Most of them run behind scenes where application don’t access them directly
Platform Initialization
Building the Android runtime
General Procedure Get the code Build it Install it http://surce.android.com
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>
Building the Android runtime
Build products Userdata.img System.img Ramdisk.img Kernel.img Run it and Android is running
Application Developers
Platform Developer
Hardware Developers
Architecture Porting