Top Banner
Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <[email protected]> Thursday 24 September 2015 SFO15
40

Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz

Apr 25, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Presented by

Date

Event

Mainline on form-factor devices / Improving AOSP

John StultzJohn Stultz <[email protected]>

Thursday 24 September 2015

SFO15

Page 3: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Mainline on form-factor devicesWhy Bother?

Page 4: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Benefits

Validate upstream changes (enable CI)

Allow for more experimentation

Avoid devboard functionality gaps in testing

Enable selfish maintainer interest

Improve collaboration

Page 5: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

HardwareKey requirements

Page 6: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Unlockable bootloader

Page 7: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Most device’s bootloader

Page 8: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Access to the serial UART

Page 9: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Nexus Headphone Debug UART

https://android.googlesource.com/device/google/debugcable/+/master

Page 10: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

USB-C to the rescue?

Page 11: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Avoiding Binary Blobs

Page 12: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Binary Blobs

QmlnZ2VzdCBpc3N1ZSB3LyBHUFUKCldpZmkvQmx1ZXRvb3RoIGZpcm13YXJlIGFsc28gcHJvYmxlbWF0aWMsIHNpbmNlIHRoZXkgbGltaXQgZHJpdmVyIHVwc3RyZWFtaW5nCgpOZXQgZWZmZWN0OiBSZXN0cmljdCB1c2FibGUgaGFyZHdhcmUgZm9yIHVwc3RyZWFtIGRldmVsb3BtZW50Cg==

Page 13: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Android Kernel Patches

Page 14: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Decreasing common.git delta

Page 15: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Remaining areas (android-3.18)

15.9% drivers/usb/gadget/ 12.7% drivers/video/adf/ 13.4% net/netfilter/

8.7% include/

6.1% drivers/input/ 5.4% drivers/staging/android/fiq_debugger/ 4.7% drivers/cpufreq/

3.5% arch/arm/

3.3% arch/arm64/

(~25% spread out elsewhere)

Page 16: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Infrastructural deltas

Android kernel and upstream kernel interfaces still differ in places.

So a fair amount of userspace may need to change

Page 17: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Lagging Upstream SoC Support

Page 18: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

SoC Android Trees

Page 19: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Device Tree conversions

Adding support upstream using device tree has been painful for moving 3.4 board-file era devices forward.

Recent devices have been shipped using DT with 3.10 (still 11+ revisions behind).

Page 20: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Nexus 7 (2013)Status

Page 21: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>
Page 22: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Credits!

Björn AnderssonStephen BoydRob ClarkKumar GalaLina IyerIvan T. IvanovSrinivas KandagatlaAmit Pundir

Sumit Semwal Vinay SimhaArchit Taneja

And everyone else at Qualcomm, Sony, Inforce, and Linaro who have helped get code upstream

Page 23: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Currently ~25 kernel patches (v4.3-rc1)

DeviceTree changes- hw_rng- usb gadget- pinctrl / gpio-keys

Real features- mmc > 8 partitions- MTP usb gadget- “reboot bootloader”- pm8921 pmic gpio

Build helpers - flo_defconfig- Android.mk- ATAG MEM fixup

Hacks for now- virtual fb- mmc wp gpio hack- allow broken gcc 4.8

Page 24: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Lots left TODO

Display panelGL accelerationUSB hotplugBattery chargerPower ManagementWifi

BluetoothSensorsAudioCamerasNFCSlimport

Page 25: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Reproduce it yourself!$ repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.1_r6

$ git clone https://git.linaro.org/people/john.stultz/AOSP/flo-mainline/manifest.git .repo/local_manifests

$ repo sync

<fetch & install the (lmy48g) firmware blobs from

https://developers.google.com/android/nexus/drivers >

$ build/envsetup.sh

$ lunch aosp_flo-userdebug

$ make -j24

Page 26: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Already seeing benefits

Making clear what code is most critical to upstream, helping find pain points

Using as a test platform to validate transition to ConfigFS gadget

Targeting for cenalloc proof of concept

Page 27: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Wishing and hoping

$199 Nexus-like tablet released on “decently upstreamed” SoC

Standard USB-C alternative UART mode.

Page 28: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Improving AOSP

Page 29: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Admit we have a problem

Page 32: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Android One - Partition time

/system -> Architecture/vendor -> SoC/odm -> Device/oem -> OEM/Carrier

Page 33: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

IRDA - Boot time

● Check BIOS/Bootloader tables at boot

● Bind-mount HAL driver directories

● Fuse Filesystem for config data

Page 34: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Project Ara - Run time

● Create standard device classes

● Hotplug aware HAL layers

● Slowly adapt framework

Page 35: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Image by: Jeremy Keith (CC by 2.0)

Multiple solutions

● Partition based customization● BIOS specified bind mounting and

fuse filesystems● Standard device classes & Hotplus

aware HALs● Likely to see these approaches

combined!

Page 37: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Vendor & Reference HALs

● HAL unification effort● Improving Reference HALs● KMS/DRM based HWComposer

Page 38: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Best Practices

● Better reference HALs● Improving documentation● Providing tutorials● Advising vendors ship custom

applications as apks via store

Page 39: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>

Collaboration w/ AOSP

● Develop community for shared HALs

● Community reviews on Gerrit● Delegated maintenance● Delegated device validation

Page 40: Mainline on form-factor devices / Improving AOSP · 2015-09-24 · Presented by Date Event Mainline on form-factor devices / Improving AOSP John Stultz John Stultz <john.stultz@linaro.org>