Building a Linaro Android Build from Source

 In Linaro Blog

Building a Linaro Android build from scratch is a great way to learn more about Android and work more efficently with the Android team. I recently ran through these steps and produced a build that could be programmed on a Panda. These steps should work for the other boards.

If you run into problems please file bugs at

We track the tips of the technology we integrate including the toolchain, kernels and various libraries so issues are common and expected. Our goal at Linaro is to maintain complete enablement while tracking the bleeding edge.

I’m using

Commands are prefixed with $.

Grab the Source Code

$mkdir android
$cd android/
$repo init -u git:// -b linaro_android_2.3.5

Until git:// comes back online feel free to use ours:

$repo init -u git:// -b linaro_android_2.3.5 --repo-url=git://

$repo sync

Get the Toolchain

The toolchain listed on the build page.

$wget --no-check-certificate

$tar -jxvf android-toolchain-eabi-linaro-4.6-2011.08-18-2011-09-12_08-38-17-linux-x86.tar.bz2


$PATH=$PWD/android-toolchain-eabi/bin/:$PATH make -j4 TARGET_PRODUCT=pandaboard TARGET_TOOLS_PREFIX=./android-toolchain-eabi/bin/arm-eabi- boottarball systemtarball userdatatarball
Get linaro-image-tools to program the images on an SD card

Program the Image

The linaro-image-tools package allows you to easily program the compressed tar balls onto an SD card.

$bzr branch lp:linaro-image-tools

Insert an SD card

$./linaro-image-tools/linaro-android-media-create --mmc /dev/sdc --dev panda --system out/target/product/pandaboard/system.tar.bz2 --userdata out/target/product/pandaboard/userdata.tar.bz2 --boot out/target/product/pandaboard/boot.tar.bz2

Examine the Serial Port

$minicom -D /dev/ttyUSB0 -w -C minicom.txt

Try It!

Insert the card in Panda and your booting your custom built Android!

Recent Posts
Showing 5 comments
  • Sudarshan

    Hi Zach,
    I followed the steps (which u had posted here) to download the source,but while building the source iam getting the following error

    make: *** No rule to make target `linaro-supplement’, needed by `out/target/product/pandaboard/system.tar.bz2′. Stop.
    make: *** Waiting for unfinished jobs….
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.

    Plz help me to resolve this


    • Bernhard Rosenkränzer

      You’re trying to use the “default.xml” manifest in a build where it doesn’t work.

      Either update your sources (preferrably to the linaro_android_2.3.7 or even linaro_android_4.0.1 branch), or use a different manifest, e.g. by adding “-m staging-panda.xml” to the repo init line.

      Preferrably, do both: Use the best suited manifest and a current branch, e.g.

      repo init -u git:// -b linaro_android_2.3.7 –repo-url=git:// -m staging-panda.xml

  • aditya

    I have tried building the source from the following tree

    repo init -u git:// -b linaro_android_4.0.3 -b staging-panda.xml

    but the build stops in the middle.

    make[1]: Leaving directory `/home/panda/external/x264′
    make[1]: Entering directory `/home//panda/external/x264′
    install -d ../../out/target/product/pandaboard//system/bin
    install -d ../../out/target/product/pandaboard//system/include
    install x264 ../../out/target/product/pandaboard//system/bin
    install -d ../../out/target/product/pandaboard//system/lib
    install -d ../../out/target/product/pandaboard//system/lib/pkgconfig
    install -m 644 ./x264.h ../../out/target/product/pandaboard//system/include
    install -m 644 x264_config.h ../../out/target/product/pandaboard//system/include
    install -m 644 x264.pc ../../out/target/product/pandaboard//system/lib/pkgconfig
    ln -f -s ../../out/target/product/pandaboard//system/lib/
    install -m 755 ../../out/target/product/pandaboard//system/lib
    make[1]: Leaving directory `/home/panda/external/x264′
    elapsed seconds: 134
    wrote generated Main_*.java files to out/host/linux-x86/obj/EXECUTABLES/vm-tests_intermediates/main_files

    Any issue with the build i have tried can you please guide me

  • Zach Pfeffer

    Try, the tip panda build’s Android rebuild script:

    listed at: