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

SFO15-401: Mainline on form-factor devices / Improving AOSP

Jan 26, 2017

Download

Technology

Linaro
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: SFO15-401: Mainline on form-factor devices / Improving AOSP

Presented by

Date

Event

Mainline on form-factor devices / Improving AOSP

John StultzJohn Stultz <[email protected]>

Thursday 24 September 2015

SFO15

Page 3: SFO15-401: Mainline on form-factor devices / Improving AOSP

Mainline on form-factor devicesWhy Bother?

Page 4: SFO15-401: Mainline on form-factor devices / Improving AOSP

Benefits

Validate upstream changes (enable CI)

Allow for more experimentation

Avoid devboard functionality gaps in testing

Enable selfish maintainer interest

Improve collaboration

Page 5: SFO15-401: Mainline on form-factor devices / Improving AOSP

HardwareKey requirements

Page 6: SFO15-401: Mainline on form-factor devices / Improving AOSP

Unlockable bootloader

Page 7: SFO15-401: Mainline on form-factor devices / Improving AOSP

Most device’s bootloader

Page 8: SFO15-401: Mainline on form-factor devices / Improving AOSP

Access to the serial UART

Page 9: SFO15-401: Mainline on form-factor devices / Improving AOSP

Nexus Headphone Debug UART

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

Page 10: SFO15-401: Mainline on form-factor devices / Improving AOSP

USB-C to the rescue?

Page 11: SFO15-401: Mainline on form-factor devices / Improving AOSP

Avoiding Binary Blobs

Page 12: SFO15-401: Mainline on form-factor devices / Improving AOSP

Binary Blobs

QmlnZ2VzdCBpc3N1ZSB3LyBHUFUKCldpZmkvQmx1ZXRvb3RoIGZpcm13YXJlIGFsc28gcHJvYmxlbWF0aWMsIHNpbmNlIHRoZXkgbGltaXQgZHJpdmVyIHVwc3RyZWFtaW5nCgpOZXQgZWZmZWN0OiBSZXN0cmljdCB1c2FibGUgaGFyZHdhcmUgZm9yIHVwc3RyZWFtIGRldmVsb3BtZW50Cg==

Page 13: SFO15-401: Mainline on form-factor devices / Improving AOSP

Android Kernel Patches

Page 14: SFO15-401: Mainline on form-factor devices / Improving AOSP

Decreasing common.git delta

Page 15: SFO15-401: Mainline on form-factor devices / Improving AOSP

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: SFO15-401: Mainline on form-factor devices / Improving AOSP

Infrastructural deltas

Android kernel and upstream kernel interfaces still differ in places.

So a fair amount of userspace may need to change

Page 17: SFO15-401: Mainline on form-factor devices / Improving AOSP

Lagging Upstream SoC Support

Page 18: SFO15-401: Mainline on form-factor devices / Improving AOSP

SoC Android Trees

Page 19: SFO15-401: Mainline on form-factor devices / Improving AOSP

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: SFO15-401: Mainline on form-factor devices / Improving AOSP

Nexus 7 (2013)Status

Page 21: SFO15-401: Mainline on form-factor devices / Improving AOSP
Page 22: SFO15-401: Mainline on form-factor devices / Improving AOSP

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: SFO15-401: Mainline on form-factor devices / Improving AOSP

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: SFO15-401: Mainline on form-factor devices / Improving AOSP

Lots left TODO

Display panelGL accelerationUSB hotplugBattery chargerPower ManagementWifi

BluetoothSensorsAudioCamerasNFCSlimport

Page 25: SFO15-401: Mainline on form-factor devices / Improving AOSP

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: SFO15-401: Mainline on form-factor devices / Improving AOSP

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: SFO15-401: Mainline on form-factor devices / Improving AOSP

Wishing and hoping

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

Standard USB-C alternative UART mode.

Page 28: SFO15-401: Mainline on form-factor devices / Improving AOSP

Improving AOSP

Page 29: SFO15-401: Mainline on form-factor devices / Improving AOSP

Admit we have a problem

Page 32: SFO15-401: Mainline on form-factor devices / Improving AOSP

Android One - Partition time

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

Page 33: SFO15-401: Mainline on form-factor devices / Improving AOSP

IRDA - Boot time

● Check BIOS/Bootloader tables at boot

● Bind-mount HAL driver directories

● Fuse Filesystem for config data

Page 34: SFO15-401: Mainline on form-factor devices / Improving AOSP

Project Ara - Run time

● Create standard device classes

● Hotplug aware HAL layers

● Slowly adapt framework

Page 35: SFO15-401: Mainline on form-factor devices / Improving AOSP

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: SFO15-401: Mainline on form-factor devices / Improving AOSP

Vendor & Reference HALs

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

Page 38: SFO15-401: Mainline on form-factor devices / Improving AOSP

Best Practices

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

applications as apks via store

Page 39: SFO15-401: Mainline on form-factor devices / Improving AOSP

Collaboration w/ AOSP

● Develop community for shared HALs

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

Page 40: SFO15-401: Mainline on form-factor devices / Improving AOSP