This document provides an overview of efforts to port Android 10 to inexpensive single board computers like the Orange Pi using only open source components. It discusses the requirements to use the latest Android version, a cheap board, only open source projects, and to have a working solution out of the box. The document outlines the project structure, including mainline kernel with patches, Mesa for graphics, and upstream HWComposer and audio HAL projects. It provides timeline details for graphics and video driver mainlining. Supported boards currently include Orange Pi PC, Plus2e and Raspberry Pi 4, with plans to expand support. Building instructions are provided.
7. 7
Project requirements
1. Use the last actual version of Android
2. Take cheap Single Board Computer
3. Use Open Source Projects only
4. Have an Open Source Solution
5. Have a solution from the box
6. Have fun
8. 8
Project requirements
1. Use the last actual version of Android
2. Take cheap Single Board Computer
3. Use Open Source Projects only
4. Have an Open Source Solution
5. Have a solution from the box
6. Have fun
10. 10
Theory of Configuration customization
1. Create Build Layers
2. Build variants
3. Build customization over Resource Overlays
4. Write the Makefiles
- Makefile that declares the files and modules needed for the device (device.mk)
- Product definition makefile (a specific product based on the device) (vendor.mk)
- File that points to the product's makefiles (AndroidProducts.mk)
- Makefile that contains board-specific configurations (BoardConfig.mk)
- File to add your product (a "lunch combo") to the build along with a build variant separated by a
dash (vendorsetup.sh)
- Set Product Definition Variables
- Set ANDROID_VENDOR_KEYS to connect over USB
https://source.android.com/setup/develop/new-device
11. 11
Project requirements
1. Use the last actual version of Android
2. Take cheap Single Board Computer
3. Use Open Source Projects only
4. Have an Open Source Solution
5. Have a solution from the box
6. Have fun
13. 13
Project requirements
1. Use the last actual version of Android
2. Take cheap Single Board Computer
3. Use Open Source Projects only
4. Have an Open Source Solution
5. Have a solution from the box
6. Have fun
14. 14
Project requirements
1. Use the last actual version of Android
2. Take cheap Single Board Computer
3. Use Open Source Projects only
4. Have an Open Source Solution
5. Have a solution from the box
6. Have fun
15. 15
Repo
(a Google-built repository management tool that runs on top of Git)
repo init -u $URL -b $BRANCH -m $MANIFEST
--------------------
mkdir .repo; cd .repo
git clone https://android.googlesource.com/tools/repo
git clone --bare $URL manifests.git
mkdir -p manifests/.git; cd manifests/.git
for i in ../../manifests.git/*; do ln -s $ı .; done
cd ..
git checkout $BRANCH -- .
cd ..
ln -s manifests/$MANIFEST manifest.xml
https://android.googlesource.com/tools/repo/+/maint/docs/manifest-format.txt
16. 16
Project requirements
1. Use the last actual version of Android
2. Take cheap Single Board Computer
3. Use Open Source Projects only
4. Have an Open Source Solution
5. Have a solution from the box
6. Have fun
18. 18
Guided by:
1. Trustworthiness
- Upstream as much our work as possible into mainline repositories with high acceptance criteria.
- Use repository forks only if necessary.
- Keep own code clean and easy for review.
- Avoid usage of proprietary binaries.
1. High performance (in progress)
- Continuously bring-up and improve hardware acceleration.
- Optimization in graphics path, profiling, caching.
1. Reliability (in plans after first release)
- Continue to fix existing and new bugs.
- Setup CI server to track regression and report to developer before applying new changes.
- Use and extend VTS and CTS.
- Manual testing (We hope to get your help here).
1. Free and open source
- Get as much as possible feedback from the community.
- Split development across the community.
- Keep project alive during long period of time.
19. 19
Worktree structure
Path Description GL Patches
device/glodroid Product makefiles All
prebuilts/applications Non-AOSP applications (f-droid, kodi) All
external/drm_hwcomposer Opensource HWComposer HAL based on DRM/KMS 2
external/mesa3d Opensource OpenGL & Vulkan implementation for variety of graphic cards 1
kernel/glodroid Mainline kernel (v5.4-rc7) + Google Patchset 8
external/tinyhal Opensource audio HAL from Cirrus Logic -
external/gbm_gralloc Opensource gralloc HAL that is using mesa GBM interface. -
external/u-boot Mainline u-boot v2019.10 -
kernel/glodroid-modules/rtl8189ES_linux Out of tree wifi kernel module -
prebuilts/gcc/linux-x86/arm/gcc-linaro_arm-linux-gnueabihf Prebuilt gcc from linaro (used to compile kernel and u-boot) -
Other 740+ repositories Google AOSP v10.0.0-r14 -
GloDroid
repos
Modified
Forks
Opensource
repositories
21. 21
Guided by:
1. Trustworthiness
- Upstream as much our work as possible into mainline repositories with high acceptance criteria.
- Use repository forks only if necessary.
- Keep own code clean and easy for review.
- Avoid usage of proprietary binaries.
1. High performance (in progress)
- Continuously bring-up and improve hardware acceleration.
- Optimization in graphics path, profiling, caching.
1. Reliability (in plans after first release)
- Continue to fix existing and new bugs.
- Setup CI server to track regression and report to developer before applying new changes.
- Use and extend VTS and CTS.
- Manual testing (We hope to get your help here).
1. Free and open source
- Get as much as possible feedback from the community.
- Split development across the community.
- Keep project alive during long period of time.
23. 23
Step 1. Composer-
>ValidateDisplay()
Step 2: Composer-
>PresentDisplay()
HWComposer stages
Thanks to Linaro! Link to slides: https://s3.amazonaws.com/connect.linaro.org/yvr18/presentations/yvr18-204.pdf
SurfaceFlinger
24. 24
Guided by:
1. Trustworthiness
- Upstream as much our work as possible into mainline repositories with high acceptance criteria.
- Use repository forks only if necessary.
- Keep own code clean and easy for review.
- Avoid usage of proprietary binaries.
1. High performance (in progress)
- Continuously bring-up and improve hardware acceleration.
- Optimization in graphics path, profiling, caching.
1. Reliability (in plans after first release)
- Continue to fix existing and new bugs.
- Setup CI server to track regression and report to developer before applying new changes.
- Use and extend VTS and CTS.
- Manual testing (We hope to get your help here).
1. Free and open source
- Get as much as possible feedback from community.
- Split development across the the community.
- Keep project alive during long period of time.
25. 25
Community mainlining effort
For more info visit the following links:
Raspberry PI 4 support: https://github.com/lategoodbye/rpi-zero/issues/43
Sunxi support: https://linux-sunxi.org/Linux_mainlining_effort
H3 SOC (OPI PC) H6 SOC (OPI 3) BCM2711 (RPI 4)
Device Support Kernel v3.18 Kernel v4.17 Kernel v5.5
GPU Driver Kernel v5.2 Kernel v5.5 Kernel v4.18
VPU Driver (h264) Kernel v5.3 Kernel v5.3 Optimized CPU,
GPU + NEON?
VPU Driver (h265) Kernel v5.5 Kernel v5.5 Optimized CPU,
GPU + NEON?
28. 28
Current project status
1. Android 10.0.0 Release 14
2. Linux Kernel version 5.3
3. U-Boot v2019.10
4. Mesa (upstream)
5. HW Composer (upstream)
6. Tinyhal (upstream)
7. Built by Linaro GCC for ARM v.7.4.1
29. 29
Building Android
mkdir -p GloDroid
cd GloDroid
repo init -u https://github.com/glodroid/glodroid_manifest
repo sync -cq
source ./build/envsetup.sh
lunch opi_plus2e-userdebug
make sdcard
$ dd if=out/target/product/plus2e/sdcard.img of=/dev/sdX bs=4k
$ sync