Sony s Open Devices Project. Goals Achievements. What went right? What went wrong? Lessons learned

Similar documents
Mainline on form-factor devices / Improving AOSP

Keeping up with LTS Linux Kernel Functional Testing on Devices

CLOSE ENCOUNTERS OF THE UPSTREAM RESOURCE

Mesa i965 Scenes from a Quiet Revolution

Are you Really Helped by Upstream Kernel Code?

Consolidating servers, storage, and incorporating virtualization allowed this publisher to expand with confidence in a challenging industry climate.

The Embedded Linux Problem

[RFC] Obtaining Management Buy-in for Mainline Development

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

CASE STUDY IT. Albumprinter Adopting Redgate DLM

Long Term Support Initiative

AOSP Devboard Update & Recent/Future Pain Points. John Stultz

Embedded in 2010: An End to the Entropy? Matt Asay COO, Canonical

The Challenges for Software Developers with Modern App Delivery

The HiKey AOSP collaborative experience

Upstreaming Hardware Enablement

Case study on PhoneGap / Apache Cordova

Using GitHub to Share with SparkFun a

IT DEPT MAINTAINER. Upstream in a LEGAL. Downstream Environment. PATCHES Dinh Nguyen Senior Embedded SW Engineer ELC Dublin 2015

Ice Cream Sandwich Rapid Bring Up

Developing on DragonBoard

Understanding the Open Source Development Model. » The Linux Foundation. November 2011

Media-Ready Network Transcript

Mobile County Public School System Builds a More Secure Future with AMP for Endpoints

Manual For Android Jelly Bean Features Vs Ice

Texas Instruments Electronics Online Challenge. Discobots Team 1104A

Htc Verizon Use Manual For Samsung Galaxy S3 On Straight Talk

Methods to protect proprietary components in device drivers

A Guide to the Linux Kernel Development Process. Jonathan Corbet LWN.net

Revitalizing OSS Contributions and Participation across Mozilla

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Android In Industrial Applications. A Field Report

THE ART OF SECURING 100 PRODUCTS. Nir

IPv6 Readiness in the Communication Service Provider Industry

CASE STUDY: TRUHOME. TruHome Goes All-In on Cloud Telephony with Bigleaf SD-WAN as the Foundation

CELF Embedded Linux Conference US 16th April 2008 Hugh Blemings IBM Corporation

Binary Blobs Attack!!!

Lab 08. Command Line and Git

Kernel maintainership: an oral tradition

Ubuntu Development Primer

Mistakes to Avoid when Open Sourcing Proprietary Tech

Porting Linux to a new SoC

Device Tree as a stable ABI: a fairy tale?

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Status of Embedded Linux Status of Embedded Linux October 2014

High Availability For Private Clouds

ING DIRECT turns ideas into revenue faster with Cisco UCS.

Supporting a new ARM platform: the Allwinner example

Devicetree Specification

ARM support in the Linux kernel

15 Minute Traffic Formula. Contents HOW TO GET MORE TRAFFIC IN 15 MINUTES WITH SEO... 3

Building downloadable Sailfish OS and next steps of Jolla with Sailfish 3

Solid State Storage: Trends, Pricing Concerns, and Predictions for the Future

Project Treble. What Makes Android 8 different? August 2018

Using WireShark to support the Application June 16, 2011

Clickbank Domination Presents. A case study by Devin Zander. A look into how absolutely easy internet marketing is. Money Mindset Page 1

Figure 1: Target environment includes peripherals.

ARM: Allwinner sunxi SoC's and the community behind it

Trees need care a solution to Device Tree validation problem

HEAD OF THE DIGITAL CLASS. University of New England s latest technological innovations usher the University into a new era IN PARTNERSHIP WITH:

Some Possible Futures of Computing. Marcus J. Ranum

Below is another example, taken from a REAL profile on one of the sites in my packet of someone abusing the sites.

BUYING DECISION CRITERIA WHEN DEVELOPING IOT SENSORS

Frequently Asked Questions about the NDIS

DrupalGovcon July 20th, 2016

The Penguin and the Droid

How to git with proper etiquette

Patrick Doyle Principal Software Engineer, irobot 2017 Embedded Linux Conference, Portland OR

Considerations for Mobilizing your Lotus Notes Applications

Building the Ecosystem for ARM Servers

White Paper. How the Meltdown and Spectre bugs work and what you can do to prevent a performance plummet. Contents

IT 220 Course Notes. Don Colton Brigham Young University Hawaii

Subject: Top-Paying IT Certificates for 2015 (And Our New Courses)

Software Revision Control for MASS. Git Basics, Best Practices

MicroSurvey Users: How to Report a Bug

Java SE 11 Certification Questions Answered

5 Reasons to Choose Parallels RAS Over Citrix Solutions

Within Kodi you can add additional programs called addons. Each of these addons provides access to lots of different types of video content.

IT Project Management Challenges with Open Source. George A Pace

Carrier-grade VoIP platform with Kamailio at 1&1

Two years of ARM SoC support mainlining: lessons learned

Github/Git Primer. Tyler Hague

You Can t Move Forward Unless You Can Roll Back. By: Michael Black

How to Write an MSSP RFP. White Paper

This Report Distributed By:

Version Control for Fun and Profit

Supporting a new ARM platform: the Allwinner example

Sterling Talent Solutions Automates DevOps and Orchestrates Data Center Operations. SaltStack Enterprise case study

Russell Doty Red Hat

Still All on One Server: Perforce at Scale

AVOIDING THE GIT OF DESPAIR

Kernel development: How things go wrong

Azure Sphere: Fitting Linux Security in 4 MiB of RAM. Ryan Fairfax Principal Software Engineering Lead Microsoft

Shared Logging with the Linux Kernel!!Part Deux!!

Title: Episode 11 - Walking through the Rapid Business Warehouse at TOMS Shoes (Duration: 18:10)

E-Guide WHAT WINDOWS 10 ADOPTION MEANS FOR IT

How Rust views tradeoffs. Steve Klabnik

The Cost of Going it Alone Dave Neary

Lehigh Walking Wizard Final Report Steven Costa & Zhi Huang

Manual Ios Update Iphone 4s Release Date Canada >>>CLICK HERE<<<

Transcription:

1

Sony s Open Devices Project Goals Achievements What went right? What went wrong? Lessons learned 2

Ambitious project to support open software on Sony Mobile s phone platforms 2 main areas: Android Open Source Project Mainline Linux kernel 3

4

Allow people to run as much open source software as possible on our platforms Common misconception is that the main target was standard end-user customers Lots of people skeptical of the value of this But here s a quote: if SONY gives us a fully Open Source Smartphone i will completely change my View about this Company ;) And i will definitely buy that Thing. - Jose Ramirez, G+, July 29 2015 Targets: Least important: normal customers Some importance: advanced, external developers Most important: ourselves!! 5

Allow people to run recent kernel versions on our platforms Targets: 3rd party developers Primarily our team and our own engineers 6

From least to most important: 5. Use open access to our hardware as a differentiator 4. Make it possible for users and developers to contribute to our platform 3. Allow our developers to submit patches upstream 2. Reduce our time-to-market, by lowering our own patch count 1. Reduce our time-to-market by fixing problems with kernel and hardware support before our product engineers encountered them 7

Time to Market: Market entry delays, particularly for US market was costing us dearly US phones trailed Japan and Europe by 4 to 6 months We had recurring problems in our bringup and QA Engineering costs Too many of our own patches Obstacles: Kernel version gap 3 years behind mainline kernel.org Huge patch mountain from vendor (Qualcomm) Over 20,000 commits and 1.6 million lines of code 8

Allow people to use AOSP on our phones, and build a mod community Allow people to use their hardware as they want Differentiate from other locked-down vendors 9

Allow external developers to fix bugs Allow external developers to add value to platform For example: xda-developers and cyanogenmod 10

In order to X we had to Y Reduce our time to market Reduce our patch burden Submit our patches upstream Give product engineers the capability to participate in open source community Give our engineers access to latest kernel.org version on our hardware Also known as: Closing the version gap Submit base Qualcomm processor support to mainline Lots of steps, and that last one looks very hard! 11

Reduce our technical debt Sony had 1800 patches spread across 800 git trees Different combinations cherry-picked into product trees Quality control was difficult Increased our bringup cost for a new product 12

Had previously identified technical problems that cost us a lot of time each product cycle Ex: display/touchscreen integration problems Sony Mobile had no way to fix upstream problems We couldn t push to kernel.org Because of 3-year version gap Code dumps from Qualcomm were one-way drops Only way to send something to Qualcomm is via public mailing list They won t take direct e-mails or git pulls 13

Reduce cost for our vendor, and increase quality of received software Qualcomm has ~600 kernel engineers to support their SoCs We estimated this could be reduced by half Using about 15 engineers (5 of ours and 10 of theirs) over the course of 5 years Cost of 75 man years, to save 300 man years/per year for our SoC vendor We estimated that the trickle-down benefit to Sony would outweigh our investment cost (25 man years) 14

We started pushing Qualcomm code into mainline Remember this was not Sony s code, nor was it Sony s hardware (per se) We also started Device Mainlining initiative in the Linux Foundation CE Workgroup To identify and remediate obstacles to mainlining, for industry developers 15

Small team (6 people + a manager) With some support from other developers Very experienced Isolate our group from product schedules Wrote tools to analyze Sony Mobile s commits Find duplicated work and code with relatively little dependencies (candidates for mainline) Focus on making a contribution platform Close the version gap enough so that Sony developers could mainline their code 16

17

AOSP on Xperia Were available very soon on Xperia phone hardware (one time within 24 hours of Google release) Not all platform functionality available E.g. camera functionality required binary blobs with legal issues for redistribution Mainline kernel on phone hardware QualComm SoC support Device mainlining project 18

Solved basic issues running vanilla AOSP on Xperia devices Gave us enough support to use as contribution platform Contributed many Android patches to Google Good enough for daily use by engineers Found and fixed bugs in Android before Google and Sony engineers Reworked internal deployment flow for daily builds Worked with Sony and Qualcomm legal to allow public release of some binary blobs 19

Full support for AOSP on (many) Xperia devices Documentation for 3 rd parties to load platform Github account for kernel access and contribution 3 rd party contributions 17 authors contributed 69 commits (3.4 kernel project) From Feb 17 to March 17 (one month) https://github.com/sonyxperidev/kernel/pulse/monthly hero open source developers program David Viteri (not a Sony employee) contributed 121 accepted commits in a 2-month period to AOSP project 20

Device drivers for core Qualcomm infrastructure Jointly developed with Qualcomm, Linaro, Redhat and the Linux community Framework changes needed to implement these Devicetree definitions for multiple products Anyone can use latest Linux kernel.org kernel and get clocks, regulators, gpios, uart, i2c etc. on a Honami Documentation 21

July 2015 mainline kernel running on Xperia phone Phone shipped commercially with 3.4 Kernel at time was 4.1 Immediately saw use by external party to develop GPU driver for Qualcomm chip (Rob Clark) By November, we had: Display running with acceleration WiFi, USB, touchscreen 22

Survey of obstacles for industry engineers White paper Overcoming Obstacles/Best Practices talk given at 6 events in 2014/2015 Identify major out-of-mainline areas in kernel Discussed some issues at Kernel Summit 2015 Work with Linaro and community to address specific needs (technical projects) Ex. USB charger framework 23

5. Open access as a differentiator 4. Facilitate user contributions 3. Submit patches upstream 2. Lower our patch count 1. Fix problems before our engineers 0. Reduce time-to-market 24

5. Open access as a differentiator 4. Facilitate user contributions 3. Submit patches upstream 2. Lower our patch count 1. Fix problems before our engineers 0. Reduce time-to-market 25

26

We made significant progress on milestone deliveries and some key low-level features Our efforts were visible outside the company, and caught the attention of customers and 3 rd party developers Our team was successfully insulated from product issues External developers contributed to, and built on our work We actually achieved our technical milestones!!! 27

28

It took us too long Some patches took longer to get upstream than we expected Some community maintainers were unresponsive or stubborn Needed a faster mechanism to fail forward (more persistence in pushing patches) Some patches were impossible to get upstream, but it took months to figure this out (ex: NFC) We kept trying small patches that ended up requiring substantial changes upstream At first, we didn t work on the dependencies in order Some key management was unconvinced of the eventual savings 29

We couldn t apply pressure to Qualcomm through our purchasing channel We were missing key information about the SOC Undocumented registers cost us at least 3 months on one driver Is a significant problem proxying someone else s driver Some of our team members didn t get proficient with upstreaming Reduced our capacity 30

We ran out of runway Due to version gap, our mainline work was not going to show up in Sony products for 4 years Business climate for our division put our group on the chopping block after 2.5 years We had bad luck with our location in the overall business (US division) We didn t make it to phase 2 We fought with our own infrastructure for the first year Campus experimented with IPV6, but it failed Took us too long to set up contribution infrastructure Our team also did other activities Not product stuff, but I did CEWG stuff, others did other internal projects we were not concentrated enough 31

We ran out of runway Due to version gap, our mainline work was not going to show up in Sony products for 4 years Business climate for our division put our group on the chopping block after 2.5 years We had bad luck with our location in the overall business (US division) We didn t make it to phase 2 We fought with our own infrastructure for the first year Campus experimented with IPV6, but it failed Took us too long to set up contribution infrastructure Our team also did other activities Not product stuff, but I did CEWG stuff, others did other internal projects we were not concentrated enough 32

We were too slow to call for management help from the community Sometimes we would wait 2 months before escalating a maintainer issue to a higher authority We didn t push maintainers hard enough (it s really hard we understand they re busy, but we let things go too long) Not enough experience with the technology E.g. USB we weren t the original authors of the code Took me 6 months just to learn technology Was a proxy problem Kernel code was changing underneath us We started on 3.10, moved to 3.14, and started major contributions on 4.1, then incremental updates after that Each kernel version change brought changes to some of the subsystems we were working on (kernel frameworks were changing) 33

We didn t get support from internal technical teams Could have helped with proxy problem Remote office was a factor (main developers in Japan and Sweden we were in US) Underestimated the difficulty of changing the industry dynamics Version inertia much higher than expected When we started, version gap was 3 years. We hoped to get it to 1 day for our contribution platform, and 1 year for products. It got bigger during our project! Weird dependencies between Google, SoC Vendors 34

35

You need enough time to reap the benefits Should consider mainlining like you would R&D With long-term payoff Very hard to quantify ROI If we had succeeded, Sony Mobile engineers would have magically had less work to do during their product development (because we solved their problems in advance) Would have magically met our time-to-market goals, by reducing issues during bring-up and QA But no one would have thanked us 36

Get required expertise Be more persistent with community Build relationships early Build out contribution infrastructure immediately Keep management informed and interested 37

38