linux solutions on omap3x
TRANSCRIPT
Linux Solutions on OMAP3x
Jesse LienEngineering Manager
MontaVista Taiwan
Agenda
• MontaVista Mobilinux Support, Services and Ecosystem
• MontaVista and Android• MVL6: MSD, Integration Platform, and MVZ
Content Server• Project Montabello
Mobile OS Market Trends – Future is Linux• Linux as a smartphone operating system
Fastest growing OS over the next five years*Compound annual growth rate in excess of 75% by 2012*Account for 31% of all smart devices by 2012*
• Benefits:Growing ecosystem of Linux based applicationsStandardization Faster time to marketFull control via open-source
*Source: ABI Research, http://www.abiresearch.com/
"We were very aware that the growth in mobile for Linux was huge, but we didn't know it was so astronomic" - Amanda McPherson, marketing director for the Linux Foundation, told LinuxInsider.
Embedded Linux Challenges
4
Quality
Integration
Support
Hardware EnablementControl
The Linux innovation engine produces software very quickly. Commercial quality is not its objective.
Code comes from different open source projects and versions; Development tools must be integrated and bolted to a custom runtime.
Open source has grown so large it can be overwhelming. Licensing is complex and can be business unfriendly.
Embedded hardware support is incomplete and disintegrated.
Empowered by open source, companies struggle to determine which work is necessary and differentiating, and which is merely interesting.
Embedded Linux Commercialization
5
QualityDisciplined processes, intensive testing and bug fixes deliver proven quality for commercial products.
IntegrationIntegrated open source code across kernel versions, tools, toolchains, and applications.
Hardware EnablementBroad and deep device support.
ControlYou decide which work is necessary and which is merely interesting.
SupportMaintenance, documentation, training, technical support, custom engineering. Access to legal expertise with GPL, open source licenses.
MontaVista Mobilinux Support, Services, Ecosystem
Mobilinux - Core OS Benefits
Dev
elop
men
t Too
ls
Performance• realtime response• great user experience• fast boot, under 5sec• fast application startup
Footprint• small footprint• library optimization tool
Power Management• dynamic power management• application APIs
Connectivity and I/O • integrated flash support • file system integrity• encrypted file system • networking support• WiFi, Bluetooth and USB• ATA/SATA support• drive/CD/DVD connectivity
Graphics & Sound• pre-integrated graphics• pre-integrated video• complete sound framework and drivers
Security• roll-based access control • authentication framework • encrypted file system• IPSec
Debug• diagnostics• serviceability• debug
MontaVista Mobilinux
Mobilinux - Core OS Features
Dev
elop
men
t Too
ls
Performance• preempt-RT• Linux fast boot• gLibc with pre-linking• Jazelle
Footprint• µcLibc with NPTL• LOT, application/kernel XIP
Power Management• kernel DPM and App APIs
Connectivity and I/O • unionFS• eCryptFS• IPv6 • WiFi• Bluetooth• USB, USB-OTG • SDIO
Graphics & Sound• directFB• GTK• gStreamer• ALSA sound
Security• µSELinux • eCryptFS• IPSec and crypto framework
Debug• KGDB over USB • LTTng • oProfile• mPatrol
MontaVista Mobilinux
Mobilinux DPM
Quality Software Development ProcessLi
nux:
~40
M li
nes
of c
ode
Integrate Improve Verify Release
Port
Port
Port
MontaVista Linux Software Factory
Support & Sustain
• Code control
• Configure
• Build
• 1,000s bug fixes
• Real-time Linux
• Power Mgmt
• Processors
• Community Leadership
• 35,000+ tests for each build,
• Test suites (kernel config, boot, I/O, stress)
• World’s largest board farm • Docs
• Installation
• Security patches, Maintenance, long term support
Editions
Archi- tectures
LSPs
Validate: Quality Assurance Infrastructure
• Automated QA essential to developing a high quality productQA infrastructure major
investmentDaily builds tested against
each host / targetRequires large HW budget
• 35,000+ test suitesCommunity originated
MontaVista Authored• Some manual testing
E.g. Installation, tools• Section of MontaVista Board Test Farm
Quality and Integration• Mobilinux 5.0 Bug Fixes
230 total bug fixes65 kernel bug fixes24 toolchain fixes
• Mobilinux 5.0 Kernel Patches316 total patches63% are bug fixes
The data here is based on Mobilinux 5.0 as of Dec. 2007 and are specifically on Mobilinux bugs.
Note that this is IN ADDITION to over 1400 bugs that were fixed in our Professional edition which Mobilinux is based from, many of which applied to Mobilinux as well.
141
65
24
0
20
40
60
80
100
120
140
160
Applications Kernel Toolchain
Bugfix, 201, 63%Integration, 37, 12%
Enhancements, 78, 25%
Mobilinux 5.0 Bug Fixes
Mobilinux 5.0 Kernel Patches
MontaVista Support & Sustain: SecuritySecurity Incident Response: Monitor Plan, Implement, Test Advise
customers
Fix QA MVZ
Customers
Fix, QA and shipin next release
LinuxForumsLinux
Forums
Debian***SecurityAlerts
Debian***SecurityAlerts
Cert.org**Cert.org**Vendor
Security List*Vendor
Security List*
MontaVistaSecurity
Team
MontaVistaSecurity
Team
CustomersCustomers
Patch statistics in MBL 5: (after release)From Jan, 2008 (release) to April, 2009 No. of security patch in Application: 76No, of security patch in Kernel: 10
Toolchain and Platform Development
• Integrated ToolchainImproved GCC, GDB, C-librariesValidated with MontaVista Linux OS
• Platform ConfigurationOS configuration and dependency
resolutionAutomated target file system
creation• Target Management
Explore target system from hostManage target system from host
Debug, Analysis and Tuning
• One click edit-compile-debug cross developmentintegrated compile, download, target debugApplication development on simulated target
• Easy-to-use analysis and tuning toolsMemory Leak DetectionSystem TracingPerformance ProfilingMemory Usage
• Choice of development philosophyIDE graphical user interfaceCommand line
MontaVista Zone
• MontaVista Zone Customer PortalTerrabyte of Embedded
Linux InformationFAQs, Tutorials, Demos
Defect trackingDistribution of patches,
product updatesInterface for standard
support
Semiconductor
Established Mobilinux Ecosystem
Java
Tools
Security / Telephony
UI/Apps Framework
Multimedia/Graphics
and others…..
Mobile Market Leadership• Market Leadership
Over 50 million handsets shipped with Mobilinux22 of 25 announced LiMo phones based on
MontaVista MobilinuxMobilinux awarded “Best Software Innovation of
the year for 2007” by EDN, awarded in April’08• Customers and Devices
Motorola mobile handsetsNEC & Panasonic – W-CDMA 3G handsets Datang Mobile (China) – Mobilinux 4.1 handsetsSeveral other projects
18
“MontaVista has a successful history of enabling differentiated products across the entire OMAP™ product family. Mobilinux 5.0 addresses real customer needs and I expect it to be the most successful yet.” - Jeff Wender, Worldwide Marketing Manager, Software Solutions, Texas Instruments
MontaVista and Android
Android Architecture
Hardware Abstraction Layer
• HAL need to be implemented to make Android work with real h/w.
• Defines the interface that Android requires hardware drivers to implement.
• Separates the Android platform logic from the hardware interface.
• Shared library need to be implemented for every supported h/w.
• Shared Library get loaded dynamically at runtime using “dlopen”dlHandle = dlopen(rilLibPath, RTLD_NOW);
Telephony (HAL)
• RIL Daemon: Initializes the Vendor RIL, processes all communication from Android telephony services, and dispatches calls to the Vendor RIL.
• Vendor RIL: Processes all communication with radio hardware and dispatches calls to the RIL Daemon (rild).
Camera (HAL)• Camera subsystem connects the camera application to the application framework and user space libraries, which in turn communicate with the camera hardware layer that operates the physical camera.
• Need to implement shared library which in turn implements interfaces defined in CameraHardwareInterface.h
Bluetooth (HAL)
• Stack uses BlueZ version 3.36 for GAP, SDP, and RFCOMM profiles
•SIG-qualified Bluetooth 2.0 host stack.
• Interacts with user-space bluez code through D-BUS
• Headset and Handsfree (v1.5) profiles are tightly coupled with the Phone App.
WiFi & GPS (HAL)
WiFi• Android uses wpa_supplicant as the platform interface to the Wi-Fi
device.
• Shared library implementing interfaces defined in wifi.h required.
GPS• Android defines a user space C abstraction interface for GPS hardware.
• Interfaces defined in gps.h need to be implemented in order to integrate real h/w.
Android Commercialization: Challenges
• Commercial Quality Linux BSP Port on the Targeted Hardware Platforms
• HAL Porting• Dynamic Power Management• Security• Multimedia support with hardware accelerator
integrated• Integrate every component with superior
performance to build a high-class commercial product
Android Porting Effort•Linux BSP Porting:
•Bootloader, Kernel, Device Driver (Flash, Wi-Fi, USB 2.0, Bluetooth, Camera, Removable Storage, Display, Keypad and buttons, GPS, Telephony Modem, Audio, Accelerometer)
•Android Middle Integration (HAL): •Hardware Graphic Acceleration, GPS, Wi-Fi, Bluetooth, Camera, Audio/Video CODEC, RIL
•Telephony Integration
•Feature Addition in Android Framework•Adding native library for new feature•Implementing JNI interface for new feature
•System Integration and Lab Testing•Integration of all modules and testing•Bug Fixing of system level issues
•Field and Networking Test•Bug fixing of issues during Network Testing/ Production testing
MontaVista and Android• MontaVista Support for Android
Ported Android to MV Linux for OMAP3Demo on OMAP2430 at ESC Apr 2008Demo on i.MX31at FTF June 2008Demo on OMAP3 at ET Japan in Nov 2008Mobile World Congress Barcelona Feb 2009Embedded World Nuremburg Mar 2009Press release issued
MontaVista Provides Commercial-quality Linux for Android™ platform World's most advanced mobile Linux delivers broadened hardware support and
improved time-to-market for developers of Android devices http://mvista.com/press_release_detail.php?fid=news/2008/MontaVista-Linux-for-Android.html
MontaVista and Android • MontaVista announces that Android was
ported to MontaVista Linux Commercial quality Android platform Enhanced security via commercial quality
processes, testing and security patches Faster time to market for device manufacturersCustomers can build Android-based devices/apps
across a wide variety of hardware architectures• Any changes/patches required will be made
available to MontaVista customers • Future Plans
Support on other platforms
MontaVista Value Add for Android• Mobilinux is the world’s most widely deployed Linux
operating system for mobile devices• Is the only Linux to demonstrate support of and
integration with all major Linux mobile software stacks• Is the only mobile Linux certified as being ready for
IPv6• Provides support for broad mobile device processors
from Texas Instruments and others• Was awarded "Best Software Innovation of the Year"
by EDN • Detailed understanding of Android software
architecture• Good experience of complete mobile phone product
development cycle
MVL6MSD, Integration Platform, andMVZ Content Server
Introducing MVL61) Market Specific Distributions
Unique for hardware platform and target marketSource drivenFully customizable and extensible
2) Software Development KitNew Integration PlatformCross-Development toolchainDevRocket Eclipse-based IDE
3) Zone Content ServerProvides single source binary downloadand cache
4) All fully supported by MontaVistaTechnical support, upgrades, and bug fixesExperts in Linux and Open Source technology
Market Specific Distributions (MSD)
• An MSD is a revolutionary new approach to embedded Linux development
Created uniquely for each target boardDetermined by market requirements and hardware target marketFeature compatible with semiconductor distributionSource driven productProvides extended functionality such as power optimization, real
time pre-empt, etc.• Support for all major platforms
Texas Instruments, and others• Extensible and customizable
Optimize and customize for your specific application requirements
MontaVista Integration Platform (MVIP)• New build environment provided by MontaVista
Based on BitBakeOpen, non-proprietary environment
• Target configuration managementCreate multiple versions for the same targetCreate incremental buildsCreate repeatable builds more easily
• Stores package information as metadataOpen, non-proprietary format called recipes
Analogous to RPM spec filesOutput any package format
Supports any open source recipe fileRecipes provide instructions for each stage of build
download, patch, configure, build, install, etc.
Bitbake
• Python based tool• Executes tasks to build kernel• The tasks are defined in "recipe" files contained in the
kernel and userland collections on the Content Server.• Can build host tools, cross tools and target
applications.• Can build full file system images.• It can refer local source as well as sources
downloaded from Internet locations or the MontaVista Content Server.
• All build and configuration operations can be performed with command line tools.
Bitbake – What It does?
1. Parses bitbake.conf, which pulls in all the other configuration files, producing a global datastore.
2. Parses in all available recipes and produces a task graph from the tasks which the recipes and their classes define.
3. Produces a runqueue of this task graph, indicating how the tasks will be executed in the correct order.
4. Executes the runqueue task by task.5. Can speed up runqueue by adding:
BB_NUMBER_THREADS=2 orPARALLEL_MAKE=“-j2” in local.conf, if you have multi core cpu
The Basics of a Recipe
do_fetchdo_fetch
STARTSTART
do_unpackdo_unpack
do_patchdo_patch
do_configuredo_configure
do_compiledo_compile
do_stagedo_stage
do_installdo_install
do_packagedo_package
ENDEND
A recipe is a file containing:• Non-executable metadata:
DESCRIPTIONLICENSEDEPENDSRDEPENDSWhich files to package into which
sub-packages• Executable tasks the Integration
Platform knows how to executeCan inherit custom definitions
from base classesCan override any definition
MontaVista Zone Content Server• Works with new Integration Platform• Source mirror provides single point of download
Archives can be downloaded on demand at build time. Source or binary downloadsProvides ability to do incremental builds
• Provide content in units called “collections”A set of collections are combined to build a project
• Each MSD includes a set of collectionsSome are common to all MSD’sSome are MSD or vertical specificKernelUserland
• Common base userland collection across MSDs
• Many recipes list several sites for downloadBitbake recipes use 6 different algorithms to download
sources:git: svn: cvs: http: https: ftp:
And yet – files and mirrors disappearOE doesn’t keep history recipes
• What if you need to build same image a year from now!Imagine if you do not keep the sources around!
• Reproducibility is a common problem today
Content Server Benefits
Integration Platform vs. Open EmbeddedInitial Time Savings vs. RYO
MVL6 Benefits• Spend more time developing your application
Less configuration required, get up and running faster and more efficiently
Focus on adding value, not building a target OS• Increased Flexibility
Easily create multiple targets and rebuild whenever neededLeverage the open source community in your design
• Complete Developer ToolkitCommand line or GUI, use your interface of choiceSpend fewer hours simply getting things to work
• Get the support you need, when you need itAccess the full resources of MontaVista technical support Search the Zone 24x7 for information, updates, and new code
Project Montabello A customizable solution for the MID and Automotive IVI market
Project Montebello Value PropInstant ON, Always ON, Always CONNECTED
• Rich end-user experience Instant ON, Always ON, Always Connected
Game changing user experience in a full featured device
• Fast time to market for explosive MID/IVI opportunitiesComplete customizable MID/IVI solution for OEMs and ODMs
• Enables product innovation for manufacturers OEMs can own the brand
Enables manufacturer differentiation
Project Montebello• Instant ON
Fast OS boot (2sec to splash screen, 5sec to app startup)Fast resume (500ms)Application startup (instant)
• Always ON Optimized for low power environments – ARM architecture Differentiated by battery life Battery life optimized with DPM
• Always CONNECTED Connection management (with auto VPN)Seamless roaming and handoffWiFi and worldwide 3G support Fully integrated I/O: Bluetooth, USB, SDIO
Project Montebello• Complete customizable MID system
Scalable hardware support – innovative form factors Completely integrated software stack
• Customizable UI look and behaviorUsage: consumer, enterprise, other UI: Windows style, Blackberry style, YourCompany style Internationalization – support for dozens of languages
• Rich application suite Open and Extensible Leverage extensive Linux software ecosystem Browser, email, VPN, document viewer
• Application developmentNative Linux SDK Java SDKs (near future)
Project Montebello Architecture
Window Manager - XFWM
Launcher – XFCE (GTK+)
UI Framework – XFCE (GTK+)
JavaVM(future)
Flash Adobe(future)
Security - uSELinux
PowerMgmt
MemoryMgmt
Audio(ALSA)
DisplayDirectFB
User InputVirtual Devices, BIO PAM
Keyboard SMBus
Touchpad SMBus
FingerprintReader
Host ECInterface
NetworkWWAN
USB
Appl
icat
ions
UI &
Mid
dlew
are
Ker
nel
Driv
ers
Integration Services by MontaVista
Instant Messaging Media Player eBook Reader RSS Reader Photo Viewer
UI Customization Services by MontaVista
V2
App
s
Others TBD
I2C/SPI HW SpecificDriversROM/RAM Audio Display GPSFlash SD/MMC Watchdog
TimerBattery
OOBE Wizard Credential
Management
Email Client Novell Evolution
UI ChangesExchange Connector
Browser Firefox
ConnectionManager
(WiFi, 3G, Wired)
Option andSettingsManager
PDF Viewer evince
VPN (OpenSSL,Cisco, etc)
FW UpgradeUtility/Driver
(OTA Upgrades - future)
Office Viewer DataViz
doc,xls,ppt,xml
GPSLocation Aware
(future)
Thank You !