Linaro Android running on Galaxy Nexus

 In Android, Community

No, I promise, it’s not a Last-day-of-April-Fools joke. 😉
Linaro Android, built with the Linaro toolchain (my test build was done with the gcc 4.7 based 2012.04 Android toolchain release), can run on a Galaxy Nexus phones (GSM version tested, CDMA version may or may not work).
There are a couple of limitations (GPS didn’t work, the camera didn’t work, and turning off Bluetooth caused the phone app to crash), but all the basics work fine, even 3D games could run.

If you want to check it out:

repo init -u git:// -b linaro-playground -m maguro.xml
repo sync
export TARGET_TOOLS_PREFIX=/where/you/installed/the/linaro-android-toolchain/bin/arm-linux-androideabi-
source build/
lunch full_maguro-userdebug
make -j8 otapackage

The file to flash to the Galaxy Nexus will be out/target/product/maguro/full_maguro-ota-eng.*.zip – you can flash it using e.g. the ClockworkMod Recovery.

As the branch name implies, this is not an official release, and we don’t expect to make any official releases of this in the future. However, we will accept patches. 😉

Recent Posts
Showing 16 comments
  • tynen

    Has anyone been able to compile this?

    • Bernhard Rosenkränzer

      Yes. Are you running into any problems?

      • Jeremy Schulte (Adrynalyne)

        I am having trouble compiling it (Linaro’s source). I have tried Ubuntu 12.04 and 10.04 with GCC 4.7 from a test repo as well as compiled from source. I even tried a 6-2 snapshot from GNU as well as Linaro’s version of GCC 4.7. I tried a toolchain nightly, the 12.05 4.7 toolchain, and 12.04 4.7 toolchain. Each time, I get stopped with this error:

        external/chromium/base/ error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

        I don’t have a full copy with me at the moment, but this is the gist of it. It later says that some warnings are treated as errors. I figured removed Werror flags would fix this, but there are so many in the source, I don’t know which. I did remove the one from Build tree, but that didn’t help.

        What am I missing or doing wrong?

        • Bernhard Rosenkränzer

          That’s because the manifest pulls in some tip branches (build/core among others), but stays on AOSP 4.0.4 for other projects (because by the time I did the build, we didn’t have linaro branches of those).

          Among other things, this means a change to the Makefiles that gets rid of -fno-strict-aliasing is in, but some code changes required to make that work aren’t in.

          I’ll update the manifest to match the tip builds of hardware we actually support soon-ish; in the mean time, the fix is to add -fno-strict-aliasing back to the compiler flags.

          • Jeremy Schulte (Adrynalyne)

            Ok. Thanks for the prompt reply!

          • Bernhard Rosenkränzer

            I’ve just committed an untested fix. Might work again already.

  • Michael Opdenacker

    Hi Bero,

    You forgot “repo sync”.

    I’m testing right now, and will let you know if I face any issue.



    • Bernhard Rosenkränzer

      True… Edited the article to include the line.

  • Kevin

    I wonder if there is anyone developing a kind of Linaro branch supporting for Galaxy Nexus just like the other boards (Panda, Origen, …). I want to try doing that but since I have no experience on porting the Linaro or AOSP source to a specific hardware, I’d like to learn from other professional guys.

    • Bernhard Rosenkränzer

      That’s pretty much what the tree pointed at in the article is about — there’s only 4 differences between it and our regular builds:

      1. It isn’t officially supported at this time (that may or may not change)
      2. Instead of building the systemtarball/boottarball/userdatatarball targets, we build the otaimage target – this is related to the way the boot loader works (flashing a Galaxy Nexus with linaro-image-tools would just introduce an extra layer of complexity).
      3. Because of 1., we don’t run daily builds or anything, so things can break and won’t necessarily be fixed the next day
      4. Because of 2., the Galaxy Nexus build doesn’t include a kernel build, you have to build the kernel separately the way Android usually does instead of having it all integrated the way Linaro usually does. (this may change at some point in the future.)

      But other than that, this is just the same as our regular builds — it even pulls the same branches from the same repositories.

      • Kevin

        Thanks for your reply.
        I guess I need to try Linaro on Pandaboard or Beagleboard to understand it first before going to Galaxy Nexus. The main reason that I prefer Galaxy Nexus to other boards is its convenience.

        As my understanding, from the embedded point of view, the smartphones are just similar like the dev boards except for its schematic is not provided. But it does has touchscreen LCD, sensors (GPS, G-Sensor, Gyro), camera, bluetooth, wifi, a lot of things while the other boards do not have. It also be easy to bring along with you anytime, anywhere because it uses the battery.

        I hope Linaro can support a branch for a smartphone/tablet (Nexus devices may be the best candidate) in the future. For now, it looks like GPS and camera haven’t been supported since the dev boards do not have them integrated.


  • Neil (danger-rat)

    Happy to see some interest in this!

    I was truly excited when I saw this article, and would be keen to see the Galaxy Nexus adopted for official support (maybe a long shot?).

    Anyway, I opened a thread in the Q&A section to try and see if someone would upload a flashable zip. I’m interested in taking a look at this, and believe it could generate some support/interest. I suspect Google and CM would be looking into picking up some of the details, but I personally would like to see an alternative spin on things (which appears to be Linaro’s goal?)…

    Q&A thread here:

    XDA thread here:

  • nicknowsky

    there are GPS problems with all compiled builds

  • Shahida

    hello all,
    i and trying to build linaro android releases 12.04 for panda board. i am using gcc 4.4. in my ubuntu 10.04. i am using cross compiler gcc 4.7.
    I get stopped with many errors like this
    in system/media/wilhelm/src/android/android_Effect.cpp:196:21: error:
    > > dereferencing type-punned pointer will break strict-aliasing rules
    > > [-Werror=strict-aliasing]

    where am i going wrong.
    can u suggest me some solution?

    • Bernhard Rosenkränzer

      This is off-topic here, as it isn’t related to the topic of the blog post.
      Next time, please take it to a related place, such as

      The problem you’re running into is very likely gcc 4.4 misdetecting something as a potential aliasing violation.

      One fix is to use a newer compiler (such as the gcc 4.7 and 4.6 based toolchains released by Linaro).

      The other fix is to turn off the error reporting (locate -Werror=strict-aliasing in the *.mk files and remove it), that flag is enabled mainly so our developers can spot problems.

pingbacks / trackbacks