Reproduce Linaro Android Build from Source

Table of contents:

Environment

This task will involve "linaro_android_build_cmds.sh" to run as an automatic build script. By that mean is the whole process will be automatically done after run it, not like a step by step procedure list. Therefore if you don't want that script to do something unexpected to change your system, then an virtual machine instance is a better place to go. The Environment I'm using is:

  1. Host PC: ubuntu 14.04 64bit + VirtualBox v4.3.12 Don't forget their Extension Pack

  2. Virtual Machine Instance: ubuntu 12.04.4 64bit + Oracle JDK

Select a Linaro Android build

To exactly reproduce a build, pinned manifest is must. For example, Linaro Android build 495 for Samsung Arndale board, pinned manifest can be downloaded by run:

$ wget http://snapshots.linaro.org/android/~linaro-android/linux-linaro-arndale/495/pinned-manifest.xml

Using this manifest file you will get an exact same build as it shows on Linaro Android build service website.

Using Linaro Android build script

The script can be downloaded from the build page you selected, for example, on build 495, it can be downloaded by run:

$ wget http://snapshots.linaro.org/android/~linaro-android/linux-linaro-arndale/495/linaro_android_build_cmds.sh

Then download build-info package by run:

$ wget http://snapshots.linaro.org/android/binaries/open/20131212/build-info.tar.bz2

Some modifications need to be made before run the script:

  1. Using any text editor to open the script file, in "export" section, add WITH_HOST_DALVIK=false, this is a known issue.

  2. Double check the repo URL in script, due to this Bug

  3. Add build log re-direction to the last line (replace YYMMDD to a real date):

make -j${CPUS} boottarball systemtarball userdatatarball > build_log_YYMMDD.txt 2>&1

Save and exit the editor. Now create a folder to put the source code, then run the script:

$ mkdir arndale_full_build
$ ./linaro_android_build_cmds.sh -m pinned-manifest.xml -d /YOUR_PATH/arndale_full_build -o /YOUR_PATH/build-info.tar.bz2 -l YOUR_USERNAME -y

Note:

  1. Replace "YOUR_PATH" to a real one;
  2. "YOUR_USERNAME" means a user name is using for Linaro private git repository access. If you don't need this, remove -l option. If you're not sure, drop an email to Linaro Android mailing list

  3. To check the progress, simply using vi to open the build log file, jump to the end, or just check the file size by run: $ ls -l build_log_YYMMDD.txt If the file size didn't change for a while then it means either a compiling error occurred or build has been done successfully.

  4. If the source code compiling finished successfully, the follow the procedures here to flash SD card.

Validation

Above procedures have been tested on ubuntu 14.04 64bit Host OS + VirtualBox v4.3.12 + ubuntu 12.04.4 64bit guest virtual machine instance, with Linaro Android build script comes from Samsung Arndale build 495.

Platform/QA/Reproduce_Linaro_Android_Build_from_Source (last modified 2014-07-12 07:39:50)