Recycle Your Android Devices (Slides)
Total Page:16
File Type:pdf, Size:1020Kb
Recycle Your Android Devices Run real Linux on them David Greaves lbt on #mer #sailfishos ... Co-founder of the Mer Project Who am I? work at Jolla systems and infrastructure (OBS, QA, gitlab, bz ... VMs) HA Documentation Mer tools This is not a Jolla pitch This is not a Jolla pitch ... but This is not a Jolla pitch ... but Good case study This is not a Jolla pitch ... but Galaxy S3 & Nexus 4 / 5 & more Sailfish for Android HADK ToC: • Prerequisites • Preparing Your Device • Setting up the SDKs This is not a • Building the Android HAL Jolla pitch • Setting up Scratchbox2 Target • Packaging Droid HAL ... • Creating the Sailfish OS root fs • Getting In but • Flashing the rootfs image • Manual Installation • List of Repositories • Tweaks and Patches • Building a new Device • List of Supported Devices Talk about Technology Talk about Technology JEOS Just Enough OS wayland systemd btrfs connman ofono/pulseaudio git dbus rpm Talk about blueZ Technology Gecko libzypp gstreamer eglibc glib kcalcore GeoClue kernel wayland systemd btrfs connman ofono/pulseaudio git dbus rpm Talk about blueZ Technology Gecko libzypp gstreamer eglibc glib kcalcore GeoClue kernel 5.2 Talk about Why? Technology • QML • Performant • Open Qt 5.2-ish • Not Java • Huge developer base Talk about Technology QtWayland replaces Qt 5.2-ish SurfaceFlinger More to come using hwcomposer. Talk about Technology QtWayland replaces Qt 5.2-ish SurfaceFlinger More to come using hwcomposer. Talk about Technology code Routing around the breakage of closed binary blobs Shim between GNU libc and bionic libc Talk about Technology Enables use of glibc stack on top of libhybris Android BSP Android linker code dlopen dlsym dlclose Talk about become Technology android_dlopen android_dlsym libhybris android_dlclose Patches to bionic - relatively few: • Thread local Talk about storage Technology • pthreads • errno • hard vs softfp libhybris float-abi • /dev/log android_dlopen(ªlibEGL.soº); myeglCreateWindowSurfaceFP = android_dlsym(ªeglCreateWindowSurfaceº); *myeglCreateWindowSurface(....) Talk about Gets you Technology • libEGL.so or • libGLESv2.so libhybris as wrappers which present to glibc space Rinse and repeat for: • Gralloc • OpenGL ES 1.1/2.0 • NFC • Hardware HAL Talk about • OpenCL Technology • SurfaceFlinger • OpenMAX libhybris • Camera • Hwcomposer • and so on ... HA DK • Mer SDK • Scratchbox2 •Device target Building it • Minimal Ubuntu (for Android build) HA DK Building it • Explaining the layout • Bridge Android / Linux Mer HA : (libhybris) Android HA : Qt / Wayland drivers, Kernel; bionic; Pulseaudio, ... HABUILD SDK (ARM) SB2 Device Target (ARM) Mer SDK Host OS (linux – but all kinds of variants) Mer SDK • Minimal install • Some tools • SB2 ready Building it HABUILD SDK • Grab a tarball • Install 'repo' Building it HABUILD DK • Device specific XML manifest • Sync the git repos Building it • Mix of CM & Mer • Run 'make' • Fix problems :) Mer DK • Package up the HABUILD built: •binaries •headers Building it •kernel •boot & recovery .img • Create a local rpm repository (headers) • Make an SB2 'Target' Mer SDK • Build hybris • Build drivers: • Qt hwcomposer Building it • Audio • Haptic • Sensors Mer SDK • Build SailfishOS rootfs Building it • Build <insert your system here> rootfs Flashing • Use adb or equiv Running it Booting What happens? • Bootloader • Kernel Running it • Initrd and /init • Systemd • Android 'init' Running • ssh • nodejs • ruby/python Running it • webserver • ... • Currently around 25 active developers • Working on 22 devices •Galaxy Nexus/Note/Tab2/S3/S4 •Nexus One/4/5/7's •OnePlus, Photon Q, HTC Desire SailfishOS HD •Ascend P6, G525-u00, Xperia Porters Z1 •HP Touchpad •N900, N9(50) • N4, N5, Galaxy Nexus, are most mature and images are available Status: Where are we? http://bit.ly/port-devices-status Working Together • Multirom Worked with tassadar to add multirom support for sailfishOs images • Upstreaming bugfixes code back to CM During N5 port we contributed bugfix back to the upstream CM http://review.cyanogenmod.org/#/ c/67489/ • Xdadev sailfish section and also individual device forums have SailfishOs threads • IRC channel #sailfishos-porters Talk to us • All source at https://github.com/mer- hybris • SailfishOs meetups , London, Berlin, Finland • Regular IRC meeting where developers drive the agenda Mer @ merproject.org Open • Core & some MW Source • Systems Open • Community Working Code is not enough Unlike Not that hard freenode: #mer 90 people made this: #sailfishos github/ mer-hybris merproject. org Code: “FOSDEM2015” €50 discount (€199) Jolla's 31 Jan – 8 Feb FOSDEM (One per person) Discount EU / Switzerland / Code Norway Tablet : See us on Indiegogo.