Linaro's Android Platform - ELinux

Transcription

Linaro's Android PlatformLinuxCon Europe 2011Zach PfefferLinaro Android Platform LeadBernhard RosenkränzerAndroid Toolchain Engineer

Mission StatementLinaro's Android platform is OpenContinuously dBuilt from the best open source components for allmember boards

Achieving our MissionRelease Android builds for our member's boards TIPanda, Beagle, Beagle xMFreescaleiMX53ST-EricssonSnowballSamsungOrigen

All Member BoardsPictures and more details.

Achieving our Mission Produce “Android-Next” with Linaro GCC 4.6Linux Kernel 3.1Android Platform Source 2.3.5Other components (libjpeg-turbo, libpng)Busybox, ffmpeg, lrzszProvide a CI loopAccept changes through GerritProvide pre-built images

Open All work is submitted to its upstream Instructions for building and loading builds areopen and easy to use AOSP, kernel, GCC, vendor patchesBuild Linaro Android from SourceTry a Pre-Built BuildAll builds provided without “registering” http://android-build.linaro.org

Open Source brant community IRC– #linaro, #linaro-android on Freenode– The Android team will answer your questions live!MumbleListslinaro-dev

Continuously Improving Monthly milestones https://launchpad.net/linaro-android/ milestone/11.0614 blueprints, 18 bugshttps://launchpad.net/linaro-android/ milestone/11.0712 blueprints, 7 bugshttps://launchpad.net/linaro-android/ milestone/11.0814 blueprints, 5 bugshttps://launchpad.net/linaro-android/ milestone/11.0927 blueprints, 19 bugshttps://launchpad.net/linaro-android/ milestone/11.1031 blueprints, 33 bugs (in progress)

Continuously Improving New release the last Thursday of the monthRelease Candidate available the Monday beforeNext cycle planning begins during release week

Continuously Improving Toolchain Benchmarking Linaro performs monthly benchmarking tests to helpgauge toolchain:Android Toolchain Benchmarks11.09, 11.08, 11.07 Comparisons are made between:–––Current Android NDKCurrent month's 4.5 and 4.6 toolchainsPrevious month's 4.6 toolchain

Continuously Improving Toolchain Benchmarking Fully automated source available here

ValidatedContinuous Integration Change ManagementGerritAutomated Regression TestingLAVA (Linaro Automated Validation Architecture) Monkey0xbenchbusyboxmmtestglmarkPre-merge Testing

ValidatedThe CI Loop

Easy-to-Use Trying Android on a member board should beeasyBuilding Android and programming it on amember board should be easy

Try a Build5 Commands and 1 minutewget --no-check-certificate https://androidbuild.linaro.org/./boot.tar.bz2wget --no-check-certificate et --no-check-certificate bzr branch ndroid-media-create --mmc/dev/sdc--dev panda--system system.tar.bz2--userdata userdata.tar.bz2--boot boot.tar.bz2

Make and Try a Build7 Commands (and 1 hour)wget x86.tar.bz2tar -jxvf android-toolchain-eabi-*.tar.bz2repo init-u -b linaro android 2.3.5-m LEB-panda.xmlrepo syncmake -j4 TARGET PRODUCT pandaboardTARGET TOOLS PREFIX /workspace/./arm-eabi- boottarball systemtarballuserdatatarballbzr branch ndroid-media-create --mmc /dev/sdc--dev panda--system system.tar.bz2--userdata userdata.tar.bz2--boot boot.tar.bz2

Validated QA 3 build/test sets a cycleRelease Candidate (RC) builds enter week-long QAcycle before final buildsQA Tests

OptimizeLet's make Android fast!!!

OptimizeSwitched compiler flags AOSP default-O2 -fno-strict-aliasingNew-O3 -fmodulo-sched -fmodulo-sched-allowregmoves -Wl,--hash-style gnu -Werror strictaliasingRemove -fno-strict-aliasing

Optimize-O3 Optimize for speed over code sizeSpeed over compilation ize-fipa-cp-clone

Optimize-fmodulo-sched -fmodulo-sched-allow-regmoves Improve loop schedulingMore info

Optimize-Wl,--hash-style gnu Improves program startup time via newhashing algorithmNeeded to patch the AOSP dynamic linker

OptimizeRemove -fno-strict-aliasing Enables better optimizationsRequires a stricter coding styleExample 1Example 2 Most violations can be found with-Werror strict-aliasing Cheat!Override with -fno-strict-aliasing

Optimize-ffast-math Dangerous– Breaks IEEE standardsUseful in the skia 2D graphics and OpenGLlibraries

OptimizeBoard specific optimizations Cortex-A9 for Panda, Origen, SnowballCortex-A8 for iMX53, Beagle, Beagle xM

OptimizeGraphite related on-ftree-loop-linearOptimization effectiveness increases with bettercompiler SMP support

Future Improvements OpenMPAPI for easy multi-core parallelization -ftree-parallelize-loops for multi-core boardsrequires android-eabi toolchain ARM vs Thumb2Locate detrimental -O3 code size-fno-inline-functions may help Find more -ffast-math compatible code

Future Improvements binutils: -Bsymbolic-functions binutils/gcc: -flto, -fwhole-program Link time optimizationgcc: -fvisibility-inlines-hidden Speed up the dynamic linkerImprove start-up timeMove to GCC 4.7

OptimizeMore info here!

Thanks

All Member Boards TI: PandaBoard OMAP4430– 1 GB LPDDR21080p@30fps–– Dual Core 1 Gz Cortex-A9Encode/Decode H.264, MPEG-4, H.263Decode VP6, VP7DSP, IVA-HD, 2 Cortex-M3 Ducati, Audio back-end (ABE),Imaging Subsystem (ISS), SGX, Image Signal Processor(ISP), still image co-processor (SIMCOP)JTAG, UART, HDMI, DVI-D, Camera Connector, USBOTG/HOST, Microphone Jack, Headphone Jack, 10/100Ethernet

All Member Boards TI: BeagleBoard OMAP3530– 720 Mhz Cortex-A8110 MHz SGX256 MB NAND, 256MB DDR @ 166 MHzJTAG, UART, DVI-D, USB OTG/HOST,Microphone Jack, Headphone Jackhttp://beagleboard.org/static/BBSRM latest.pdfhttp://beagleboard.org/static/BBSRM latest.pdf

All Member Boards TI: BeagleBoard xM DM373– 1 GHz Cortex-A8200 MHz SGX512 MB DDR @ 166MHzJTAG, UART, DVI-D, USB OTG/HOST,Microphone Jack, Headphone Jack, 10/100Ethernethttp://beagleboard.org/static/BBSRM latest.pdfhttp://beagleboard.org/static/BBSRM latest.pdf

All Member Boards Freescale: i.MX53 Quick Start i.MX53– 1 GHz ARM Cortex -A81 GB DDR3SGTL5000 Audio CodecHDMI, camera connector SATA, 10/100Ethernet, Microphone Jack, Headphone Jack3D AccelerometerI2C, SSI, SPI

All Member Boards ST-Ericsson: Snowball Nova A9500– Dual Cortex 1 GHz Cortex-A9 with Advanced SIMD(Neon) ExtensionsMali-400 GPU1080p1 GB of DDR2HDMI, WLAN, Bluetooth, USB OTG, 10/100Ethernet3D Accelerometer, 3D Magnetometer, 3DGyroscope, Barometer

All Member Boards Samsung: ‘Origen’ low cost development board Exynos4210– Mali400 MP4 GPU1080p@30fps Hardware Decode of– Dual Core 1 GHz Cortex-A9 with Advanced SIMD (Neon)ExtensionsMPEG-4/H.263/H.264, MPEG-2/VC1/Xvi1GB of High Bandwidth DDR3HDMI, WLAN, Bluetooth, Camera Connector, USB2.0 OTG/HOST, SD/MMC8ch, I2C, SATA, PCI /LinaroOrigenLowCostBoard.pdf

Some Interesting Results 0xbench 3-D Across all boardsAcross all builds

Panda 0xbench 3-D Test ResultBuildToolchainKernelAndroid11.04AOSP 4.42.6.38.32.3.311.05AOSP 4.42.6.35.72.3.311.06Linaro 4.52.6.38.72.3.411.07Linaro 4.63.0.02.3.411.08Linaro 4.63.0.02.3.511.09Linaro 4.63.0.32.3.511.10Linaro 4.63.0.42.3.5

Panda 0xbench 3-D Test ResultBuildToolchainKernelAndroid11.04AOSP 4.42.6.38.32.3.311.05AOSP 4.42.6.35.72.3.311.06Linaro 4.52.6.38.72.3.411.07Linaro 4.63.0.02.3.411.08Linaro 4.63.0.02.3.511.09Linaro 4.63.0.32.3.511.10Linaro 4.63.0.42.3.5

iMX53 0xbench 3-D Test Result2520FPS15OpenGL CubeOpenGL BlendingOpenGL FogFlying id11.08Linaro 4.62.6.38.72.3.511.09Linaro 4.62.6.38.72.3.511.10Linaro 4.62.6.38.72.3.5

Origen 0xbench 3-D Test Result504540OpenGL CubeOpenGL BlendingOpenGL FogFlying roid11.08Linaro 4.63.0.32.3.511.09Linaro 4.63.0.32.3.511.10Linaro 4.63.0.42.3.5

Snowball 0xbench 3-D TestResult312927FPS25OpenGL CubeOpenGL BlendingOpenGL FogFlying KernelAndroid11.07Linaro 4.63.0.0-rc72.3.411.08Linaro 4.63.0.0-rc72.3.511.09Linaro 4.63.0.0-rc72.3.511.10Linaro 4.63.0.0-rc72.3.5

Results Slowdowns TARGET CPU SMP increases lockingoverheadGCC 4.6 performance regressionsUsing Linaro Android build parameterization totrack down regressions

11/9/11Linaro's Android PlatformLinuxCon Europe 2011Zach PfefferLinaro Android Platform LeadBernhard RosenkränzerAndroid Toolchain Engineer

11/9/11Mission StatementLinaro's Android platform is OpenContinuously dBuilt from the best open source components for allmember boards

11/9/11Achieving our MissionRelease Android builds for our member's boards TIPanda, Beagle, Beagle xMFreescaleiMX53ST-EricssonSnowballSamsungOrigen

11/9/11All Member BoardsPictures and more details.

11/9/11Achieving our Mission Produce “Android-Next” with Linaro GCC 4.6Linux Kernel 3.1Android Platform Source 2.3.5Other components (libjpeg-turbo, libpng)Busybox, ffmpeg, lrzszProvide a CI loopAccept changes through GerritProvide pre-built images

11/9/11Open All work is submitted to its upstream AOSP, kernel, GCC, vendor patchesInstructions for building and loading builds areopen and easy to use Build Linaro Android from Source Try a Pre-Built BuildAll builds provided without “registering” http://android-build.linaro.org

11/9/11Open Source brant community IRC– #linaro, #linaro-android on Freenode– The Android team will answer your questions live!MumbleListslinaro-dev

11/9/11Continuously Improving Monthly milestones https://launchpad.net/linaro-android/ milestone/11.0614 blueprints, 18 bugshttps://launchpad.net/linaro-android/ milestone/11.0712 blueprints, 7 bugshttps://launchpad.net/linaro-android/ milestone/11.0814 blueprints, 5 bugshttps://launchpad.net/linaro-android/ milestone/11.0927 blueprints, 19 bugshttps://launchpad.net/linaro-android/ milestone/11.1031 blueprints, 33 bugs (in progress)

11/9/11Continuously Improving New release the last Thursday of the monthRelease Candidate available the Monday beforeNext cycle planning begins during release week

11/9/11Continuously Improving Toolchain Benchmarking Linaro performs monthly benchmarking tests to helpgauge toolchain:Android Toolchain Benchmarks11.09, 11.08, 11.07 Comparisons are made between:–––Current Android NDKCurrent month's 4.5 and 4.6 toolchainsPrevious month's 4.6 toolchain

11/9/11Continuously Improving Toolchain Benchmarking Fully automated source available here

11/9/11ValidatedContinuous Integration Change ManagementGerritAutomated Regression TestingLAVA (Linaro Automated Validation Architecture) Monkey0xbenchbusyboxmmtestglmarkPre-merge Testing

11/9/11ValidatedThe CI Loop

11/9/11Easy-to-Use Trying Android on a member board should beeasyBuilding Android and programming it on amember board should be easy

11/9/11Try a Build5 Commands and 1 minutewget --no-check-certificate https://androidbuild.linaro.org/./boot.tar.bz2wget --no-check-certificate et --no-check-certificate bzr branch ndroid-media-create --mmc/dev/sdc--dev panda--system system.tar.bz2--userdata userdata.tar.bz2--boot boot.tar.bz2

11/9/11Make and Try a Build7 Commands (and 1 hour)wget x86.tar.bz2tar -jxvf android-toolchain-eabi-*.tar.bz2repo init-u -b linaro android 2.3.5-m LEB-panda.xmlrepo syncmake -j4 TARGET PRODUCT pandaboardTARGET TOOLS PREFIX /workspace/./arm-eabi- boottarball systemtarballuserdatatarballbzr branch ndroid-media-create --mmc /dev/sdc--dev panda--system system.tar.bz2--userdata userdata.tar.bz2--boot boot.tar.bz2

11/9/11Validated QA 3 build/test sets a cycleRelease Candidate (RC) builds enter week-long QAcycle before final buildsQA Tests

11/9/11OptimizeLet's make Android fast!!!

11/9/11OptimizeSwitched compiler flags AOSP default-O2 -fno-strict-aliasingNew-O3 -fmodulo-sched -fmodulo-sched-allowregmoves -Wl,--hash-style gnu -Werror strictaliasingRemove -fno-strict-aliasing

11/9/11Optimize-O3 Optimize for speed over code sizeSpeed over compilation ize-fipa-cp-clone

11/9/11Optimize-fmodulo-sched -fmodulo-sched-allow-regmoves Improve loop schedulingMore info

11/9/11Optimize-Wl,--hash-style gnu Improves program startup time via newhashing algorithmNeeded to patch the AOSP dynamic linker

11/9/11OptimizeRemove -fno-strict-aliasing Enables better optimizationsRequires a stricter coding styleExample 1Example 2 Most violations can be found with-Werror strict-aliasing Cheat!Override with -fno-strict-aliasing

11/9/11Optimize-ffast-math Dangerous– Breaks IEEE standardsUseful in the skia 2D graphics and OpenGLlibraries

11/9/11OptimizeBoard specific optimizations Cortex-A9 for Pand

Mission Statement Linaro's Android platform is . Samsung: ‘Origen’ low cost development board Exynos4210 – Dual Core 1 GHz Cortex-A9 with Advanced SIMD (Neon) Extensions Mali400 MP4 GPU 1080p@30fps Hardware Decode of – MPEG-4/H.263/H.264, MPEG-2/VC1/Xvi 1GB of High Bandwidth DDR3 HDMI, WLAN, Bluetooth, Camera Connector, USB 2.0 OTG/HOST, SD/MMC 8ch, I2C, SATA,