Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc.
FTF-NET-F0677
Android™ OS and Power Architecture®
June 24, 2010
Phil BrownfieldSoftware Product Manager, NMG
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 222
Objectives
►Android OS is emerging in importance for embedded systems developers
►In this session we will review recent developments in making Android OS available for Power Architecture® processors
• Overview of Android OS software components• Android OS on Power Architecture
►We will also review Freescale’s relationship with Mentor Embedded in making this possible
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 333
Agenda
►Why Android OS platform?►Overview of Android OS software stack►Android OS on Power Architecture processors►Partnership with Mentor Embedded
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 44
Why Android OS Platform?
►Android OS combines the power of an advanced applications framework with the robustness of the Linux® kernel
►Android OS provides a rich development environment►Android OS enables rapid deployment of graphical user interfaces
into embedded devices• Uses the Java Language with Android Class Libraries • Includes a byte-code virtual machine • Famously created by Google™ for cell phone applications processing
►The Android OS platform is open source, primarily under the Apache 2.0 license
►Android OS is not “yet another Linux distribution”
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 55
Freescale NMG / Mentor Embedded Partnership
►Mentor Embedded has the experience and infrastructure to support Freescale’s Power Architecture customers with Android OS development and customization services
►Mentor Embedded engineers have proven expertise on Power Architecture OS technologies, needed to perform the initial port of the Android OS code base to the architecture
• Engagement started with Embedded Alley Solutions prior to their acquisition by Mentor Graphics Corporation
TM
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 66
Android OS Software Stack
►Android OS is built above the Linux kernel, but provides its own unique userland software stack
►The Android OS application framework provides a comprehensive set of APIs for program development
►It is possible, and sometimes necessary, to run apps that are not Android-specific outside the app framework
OtherApps
AndroidAppsApp
Framework
Dalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 77
Key Differences with regard to GNU/Linux Software Stack
►The Android OS application framework takes the place of the X Window system to support graphical applications
►GLIBC is not present in the Android OS software stack; Bionic takes its place
►Android-specific modifications are required within the Linux kernel
OtherApps
GraphicalApps
X
GLIBC
Linux kernel
OtherApps
AndroidAppsApp
Framework
Dalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 88
Linux kernel under Android OS
►Android OS runs above a patched Linux kernel
►Linux kernel patches not yet integrated into kernel.org source base at time of writing
• Much recent kernel developer discussion may lead to resolution
• “wakelock” power management mechanism relied upon by Android OS is the main technical issue
►Linux kernel supports SMP, but Bionic and other Android OS core libraries’ ability to operate in an SMP environment is still evolving
OtherApps
AndroidApps
AppFrameworkDalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 99
Bionic and other core libraries
►Bionic is the Android OS system C library►Derived from BSD libc, under BSD license
• Comprehensive support for Dalvik and the overlaying Android OS application framework
• Includes some things, doesn’t include others• Examples: pthreads implementation not as
scalable as in glibc, no libm functions, no System V IPC, not built with standard linux-headers
• Unique prelinking mechanism►Android OS core libraries include its own
OpenGL ES implementation• Relies on framebuffer support in kernel• 2D, 3D acceleration via software
►SQLite, Webkit and SSL are other important libraries in the Android OS stack
OtherApps
AndroidApps
AndroidFrameworkDalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1010
Dalvik VM
►The Dalvik Virtual Machine executes Android OS applications
►Each Android OS app runs in a separate Dalvik VM instantiation (multitasking)
• Sharing to minimize memory utilization►Apps are in the .dex file format (Dalvik
EXecutable)• Implements byte codes
►Performance enhanced through JNI
OtherApps
AndroidApps
AppFrameworkDalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1111
Android OS Application Framework
►The Application Framework provides the underlying APIs and services needed by Android applications
►Supported by a large suite of class libraries• Apps written for other Java environments
likely to need adaption to this suite• External .jar libs may be utilized
►Core applications included with the Android OS SDK include web browser, email client, SMS client, contacts, calendar, maps, others
►Note that Google’s App suite is proprietary software and not part of the open source Android OS
OtherApps
AndroidApps
AppFrameworkDalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1212
Developing Android OS Apps and the Android OS SDK
►The Android OS SDK includes the Java compiler and related tools for creating Android OS applications
• Hosted on Linux, Windows® and MacOS platforms
• Utilizes the Eclipse IDE►Apps are compiled into the .dex file format
(Dalvik EXecutable), then packaged together with data into .apk file format (Android PacKage) for installation into the target device
►Numerous sample applications included in the Android OS SDK
Android SDK
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1313
C/C++ Applications in the Android OS Userland
►Various external open source packages are used for typical system housekeeping…
• dhcpcd, ppp, dropbear, openssl, bluez, others►… and for system debug and analysis
• oprofile, tcpdump, others►Since Bionic is not glibc, some porting may
be needed for existing C/C++ apps• IPC with Android OS apps may require
thought• In theory one might be able to run glibc and
Bionic side by side, but Android OS is not delivered that way today
OtherApps
AndroidApps
AppFrameworkDalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1414
Android OS Development Process
►Android OS development occurs in Google’s own private code base• Licensed to members of the Open Handset Alliance
►For each major version, Google releases code publicly to the AOSP• Mainly on ARM™ architecture; Freescale i.MX processors supported here
►Mentor Embedded maintains a private code base which includes support for Power Architecture, starting with the Android 1.5 “Cupcake” OS release
►Moving code modifications upstream is a still-evolving process
Android OpenSource Project
Googleinternal
MentorEmbedded
1.5“Cupcake”
1.5
1.6“Donut”
1.6
2.0“Eclair”
2.0
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1515
Android OS Port to Power Architecture Technology
► Mentor Embedded ported Android OS to Freescale’s MPC8536 and QorIQ P1022 processors, both based on the e500v2 core
► Linux kernel patches were ported to 2.6.28 powerpc subtree and validated. Frame buffer support for XGI graphics device integrated.
► Bionic, Dalvik and associated core libraries ported, including the “Pixelflinger” graphics JIT and hand optimized routines for OpenGL ES
► Endian dependencies eliminated throughout the software stack
► Removed assumptions for cell phone use, such as increased display size support, ability to run with mouse or without touchscreen
► Core Android OS apps just work
OtherApps
AndroidAppsApp
Framework
Dalvik VM
Bionic, other libraries
Modified Linux kernel
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 161616
Android™ OS on Power Architecture® Technology
► Enables applications that perform heavy embedded workloads to leverage the headed and headless application layer framework of Android technology
► Adds to the tools available for Power Architecture customers► Enables emerging embedded applications► Target Applications
Office AutomationMultimedia PlayersVideo SurveillanceStorage and Networking AppliancesAutomotiveMedical devices Home automation Instrumentation Industrial control
WatchMe
Pow
er A
rchi
tect
ure®
Tec
hnol
ogy
Embedded Workload
Network Services
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1717
Single Core Use Case Scenarios for Android OS
►On the single core MPC8536, there are multiple use case scenarios possible; here are a couple
►Complete use of Android OS framework applications to control all aspects of user interface and device control, as well as other system functions
►Use of Android OS applications to control the user interface, with non-Android OS framework applications handling device control
MPC8536
AndroidOS
e500v2
MPC8536
And
roid
OS App
e500v2
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 1818
Dual Core Use Case Scenarios for Android OS
► Similarly on the dual core P1022, multiple use case scenarios are possible► Android OS apps on one core framework applications controls user interface► Linux on the other core controls device operation. Alternatively, an RTOS or lighter
executive may assume this role► Other system functions may be mapped as appropriate► Operating systems may run directly on the e500v2 cores, or above a hypervisor
P1022
AndroidOS
e500v2
GNU/Linux
e500v2P1022
AndroidOS
e500v2
RTOS
e500v2
P1022
AndroidOS
Hypervisor
GNU/Linuxor RTOS
e500v2 e500v2
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 191919
Streamlining the Adoption of Android OS in Embedded Applications
►Freescale partners with Mentor Embedded to bring an integrated development path for Android OS on Power Architecture® solutions
Concept
MPC8536-ADKEvaluation and
Prototype Platform
Android OS SDK
Mentor Embedded Android Development System
Prototype
Mentor EmbeddedProfessional Services
Design Product
+
+QorIQ™ and
PowerQUICC®
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 202020
Freescale’s MPC8536-ADK Android OS Evaluation/Prototype System
►Freescale hardware• Based on MPC8536RDK
development system►Mentor Embedded Android OS
run time on Power Architecture®
technology• Prebuilt, preinstalled Android
runtime image►Mentor Embedded Android OS
build software• Source directory, make files and
tools to rebuild Android OS on MPC8536-ADK
• Subset of the “Mentor Embedded Development System for Android”
TMFreescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMARTMOS, TurboLink and VortiQa are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © 2010 Freescale Semiconductor, Inc. 2121
In Closing
►Android OS is emerging as a sophisticated platform for Power Architecture systems development
• Advanced applications framework• Linux kernel robustness• Flexible system usage models
►Freescale, with its partner Mentor Embedded, is enabling this technology on PowerQUICC and QorIQ reference platforms
TM