Overview

This page provides the instructions on how to setup the build environment for Android along with download and build instructions.

Initializing a Build Environment (from android.com)

Make sure you go through this: http://source.android.com/source/initializing.html Please install python-mako package which is a dependency for the piglit test suite that gets built.

Platform Code Get source and Building

On https://android-build.linaro.org we have all build listed there, most of them are made everyday. There you can see such configurations for each build. Let us consider https://android-build.linaro.org/builds/~linaro-android/armv8-android-juno-lsk/

MANIFEST_REPO=http://android.git.linaro.org/git/platform/manifest.git
MANIFEST_BRANCH=android-5.0.1_r1
REPO_GROUPS="default,-non-default,juno"
PATCHSETS=LOLLIPOP-EXPERIMENTAL-PATCHSET
LOCAL_MANIFEST=http://android.git.linaro.org/git/platform/manifest.git
LOCAL_MANIFEST_BRANCH=linaro_android_5.0.0
TARGET_PRODUCT=juno

The following will download the source for that build that you can use to build.

MANIFEST_REPO=http://android.git.linaro.org/git/platform/manifest.git
MANIFEST_BRANCH=android-5.0.1_r1
REPO_GROUPS="default,-non-default,juno"
LOCAL_MANIFEST=http://android.git.linaro.org/git/platform/manifest.git
LOCAL_MANIFEST_BRANCH=linaro_android_5.0.0

mkdir android
cd android
curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod +x ./repo
./repo init -u ${MANIFEST_REPO} -b ${MANIFEST_BRANCH} -g ${REPO_GROUPS}
 cd .repo
 git clone ${LOCAL_MANIFEST} -b ${LOCAL_MANIFEST_BRANCH} local_manifests
 cd ..
./repo sync
for i in $PATCHSETS; do
        sh ./android-patchsets/$i
done
make -j16

As you can see from above we have the REPO_GROUPS defined for the -g option of repo init command. For the detail description and available option for the REPO_GROUPS variable, your can refer to this page: Description about groups of manifest

Toolchain Code

Background information and Details on how to obtain the Linaro Android Toolchain code can be found on the dedicated Platform/Android/Toolchain wiki page.

As mentioned on that page, the Linaro Toolchain is often ahead of the latest public AOSP toolchain. As a consequence the unmodified AOSP platform code does often not build out of the box. Linaro Android Platform Team makes available Platform Code on a separate branch that allows early adopters to experiment with Android + Linaro Toolchain.

The toolchain codebase can be obtained as follows:

 mkdir android
 cd android
 repo init -u http://android.git.linaro.org/git/toolchain/manifest.git -b linaro-master
 repo sync

Help!

If Something Goes Wrong or You Have Questions


CategoryAndroidTips

Platform/Android/GetSource (last modified 2015-04-17 12:30:35)