June 24, 2010 OS and Power Architecture FTF-NET-F0677 Phil Brownfield Software Product Manager, NMG 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, SMAROS, 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.
OS is emerging in importance for embedded systems developers Objectives In this session we will review recent developments in making OS available for Power Architecture processors Overview of OS software components OS on Power Architecture We will also review Freescale s relationship with Mentor Embedded in making this possible 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, SMAROS, 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. 2
Agenda Why OS platform? Overview of OS software stack OS on Power Architecture processors Partnership with Mentor Embedded 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, SMAROS, 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. 3
Why OS Platform? OS combines the power of an advanced applications framework with the robustness of the Linux kernel OS provides a rich development environment OS enables rapid deployment of graphical user interfaces into embedded devices Uses the Java Language with Class Libraries Includes a byte-code virtual machine Famously created by Google for cell phone applications processing The OS platform is open source, primarily under the Apache 2.0 license OS is not yet another Linux distribution 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, SMAROS, 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. 4
Freescale NMG / Mentor Embedded Partnership Mentor Embedded has the experience and infrastructure to support Freescale s Power Architecture customers with OS development and customization services Mentor Embedded engineers have proven expertise on Power Architecture OS technologies, needed to perform the initial port of the OS code base to the architecture Engagement started with Embedded Alley Solutions prior to their acquisition by Mentor Graphics Corporation 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, SMAROS, 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. 5
OS Software Stack OS is built above the Linux kernel, but provides its own unique userland software stack The OS application framework provides a comprehensive set of APIs for program development It is possible, and sometimes necessary, to run apps that are not -specific outside the app framework App Framework Dalvik VM Other Bionic, other libraries Modified Linux kernel 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, SMAROS, 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. 6
Key Differences with regard to GNU/Linux Software Stack Graphical X Other App Framework Other GLIBC Dalvik VM Linux kernel Bionic, other libraries The OS application framework takes the place of the X Window system to support graphical applications GLIBC is not present in the OS software stack; Bionic takes its place -specific modifications are required within the Linux kernel Modified Linux kernel 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, SMAROS, 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. 7
Linux kernel under OS 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 OS is the main technical issue Linux kernel supports SMP, but Bionic and other OS core libraries ability to operate in an SMP environment is still evolving App Framework Dalvik VM Other Bionic, other libraries Modified Linux kernel 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, SMAROS, 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. 8
Bionic and other core libraries Bionic is the OS system C library Derived from BSD libc, under BSD license Comprehensive support for Dalvik and the overlaying 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 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 OS stack Framework Dalvik VM Other Bionic, other libraries Modified Linux kernel 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, SMAROS, 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. 9
Dalvik VM The Dalvik Virtual Machine executes OS applications Each OS app runs in a separate Dalvik VM instantiation (multitasking) Sharing to minimize memory utilization are in the.dex file format (Dalvik EXecutable) Implements byte codes Performance enhanced through JNI App Framework Dalvik VM Other Bionic, other libraries Modified Linux kernel 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, SMAROS, 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. 10
OS Application Framework The Application Framework provides the underlying APIs and services needed by applications Supported by a large suite of class libraries written for other Java environments likely to need adaption to this suite External.jar libs may be utilized Core applications included with the 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 OS App Framework Dalvik VM Other Bionic, other libraries Modified Linux kernel 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, SMAROS, 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. 11
Developing OS and the OS SDK The OS SDK includes the Java compiler and related tools for creating OS applications Hosted on Linux, Windows and MacOS platforms Utilizes the Eclipse IDE are compiled into the.dex file format (Dalvik EXecutable), then packaged together with data into.apk file format ( PacKage) for installation into the target device Numerous sample applications included in the OS SDK SDK 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, SMAROS, 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. 12
C/C++ Applications in the 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 OS apps may require thought In theory one might be able to run glibc and Bionic side by side, but OS is not delivered that way today App Framework Dalvik VM Other Bionic, other libraries Modified Linux kernel 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, SMAROS, 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. 13
1.5 Cupcake 1.6 Donut 1.5 OS Development Process 2.0 Eclair 1.6 Google internal Open Source Project Mentor Embedded 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 1.5 Cupcake OS release Moving code modifications upstream is a still-evolving process 2.0 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, SMAROS, 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. 14
OS Port to Power Architecture Technology Mentor Embedded ported 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 OS apps just work App Framework Dalvik VM Other Bionic, other libraries Modified Linux kernel 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, SMAROS, 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. 15
OS on Power Architecture Technology Enables applications that perform heavy embedded workloads to leverage the headed and headless application layer framework of technology Adds to the tools available for Power Architecture customers Enables emerging embedded applications Target Applications Office Automation Multimedia Players Video Surveillance Storage and Networking Appliances Automotive Medical devices Home automation Instrumentation Industrial control Watch Me Power Architecture Technology Network Services Embedded Workload 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, SMAROS, 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. 16
Single Core Use Case Scenarios for OS On the single core MPC8536, there are multiple use case scenarios possible; here are a couple Complete use of OS framework applications to control all aspects of user interface and device control, as well as other system functions Use of OS applications to control the user interface, with non- OS framework applications handling device control OS e500v2 MPC8536 OS App e500v2 MPC8536 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, SMAROS, 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. 17
Dual Core Use Case Scenarios for OS OS e500v2 P1022 GNU/Linux e500v2 OS e500v2 P1022 RTOS e500v2 OS P1022 GNU/Linux or RTOS Hypervisor e500v2 e500v2 Similarly on the dual core P1022, multiple use case scenarios are possible 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 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, SMAROS, 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. 18
Streamlining the Adoption of OS in Embedded Applications Freescale partners with Mentor Embedded to bring an integrated development path for OS on Power Architecture solutions MPC8536-ADK Evaluation and Prototype Platform QorIQ and PowerQUICC + Mentor Embedded Development System + OS SDK Mentor Embedded Professional Services Concept Prototype Design Product 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, SMAROS, 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. 19
Freescale s MPC8536-ADK OS Evaluation/Prototype System Freescale hardware Based on MPC8536RDK development system Mentor Embedded OS run time on Power Architecture technology Prebuilt, preinstalled runtime image Mentor Embedded OS build software Source directory, make files and tools to rebuild OS on MPC8536-ADK Subset of the Mentor Embedded Development System for 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, SMAROS, 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. 20
OS is emerging as a sophisticated platform for Power Architecture systems development Advanced applications framework Linux kernel robustness Flexible system usage models In Closing Freescale, with its partner Mentor Embedded, is enabling this technology on PowerQUICC and QorIQ reference platforms 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, SMAROS, 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. 21