Gingerbread in AOSP: some practical details

698 views
Skip to first unread message

Jean-Baptiste Queru

unread,
Dec 17, 2010, 8:19:19 PM12/17/10
to android-...@googlegroups.com
A few noteworthy details about Gingerbread in AOSP:

-Gingerbread requires a 64-bit JDK 1.6 (which implies that you need a
64-bit host to build it). The instructions at source.android.com are
outdated, and 64-bit Ubuntu 10.4 is the preferred environment. We'll
be updating those instructions in the coming weeks.

-You should expect that Gingerbread will use at least 12GB of disk
space after syncing and building. The number will be higher if you
build for multiple hardware targets.

-Android likes to be built on machines with lots of RAM. There are
benefits up to at least 12GB of RAM (and more if you routinely work in
multiple branches simultaneously).

-The toolchain in android-2.3_r1 is known to work well for ARMv7
targets, but it sometimes generates incorrect ARMv5 code. The
toolchain in the gingerbread branch contains a fix for the ARMv5 code
generation, but hasn't been tested nearly as much.

JBQ

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Jey Michael

unread,
Dec 20, 2010, 12:50:46 PM12/20/10
to android-...@googlegroups.com
Is 10.6 required, on OSX, for gingerbread ?

thanks,
-Jey

> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

Jean-Baptiste Queru

unread,
Dec 20, 2010, 1:00:41 PM12/20/10
to android-...@googlegroups.com
10.5 is supported as well.

JBQ

Jey Michael

unread,
Dec 20, 2010, 1:17:16 PM12/20/10
to android-...@googlegroups.com
Thanks JBQ. This makes it easy to switch completely to 10.6 post-Gingerbread.

On the same note, Would 32-bit Ubuntu host be un-supported on Gingerbread?
Wondering what would be your recommendation to handle two builds
(post/pre Gingerbread) on the same linux machine.
thanks,
-Jey

Jean-Baptiste Queru

unread,
Dec 20, 2010, 1:21:26 PM12/20/10
to android-...@googlegroups.com
You can build froyo and gingerbread on the same linux host by having
Sun JDK 1.5 installed and default, and Sun JDK 1.6 installed (but not
default).

In that case, the envsetup.sh from gingerbread will switch to the 1.6
JDK. Caveat: once you do that in a terminal, you won't be able to use
the same terminal for froyo any more.

JBQ

Jey Michael

unread,
Dec 20, 2010, 1:46:17 PM12/20/10
to android-...@googlegroups.com
I am hoping the lower layer pieces from external vendors can work this
way too. There are issues (probably non-AOSP code) that I see on
32-bit Linux that I will have to figure out.

Thanks again.
-Jey

Samuel B. Quiring

unread,
Dec 20, 2010, 2:50:06 PM12/20/10
to android-...@googlegroups.com
Hi,

I've downloaded and built the gingerbread source (thanks!). I executed the
resulting system.img on the emulator and it works.

Now I'm trying to set up my Eclipse environment. I decided to take a walk
on the wild side and use Eclipse version "Helios" (3.6.1-linux-gtk-x86_64)
configured to use JRE java-6-sun-1.6.0.22.

I am following the instructions on
http://source.android.com/source/using-eclipse.html.
The first stumbling block is when you reach this step:

5. Select "Create project from existing source", enter the path...

There is no "Create project from existing source" option in Helios. I found
some instructions on the net that said:

uncheck the "Use default location" box.
browse to the location where you extracted the source
# I assumed this is the directory where I copied the .classpath file

I hit "Finish" and the wizard and Eclipse just sat there a long time and
then correctly populated my workspace.

But there was a red exclamation point next to my project in the package
explorer and in the Problems window there are 3 errors:

project 'ginger' is missing required library:
'out/target/common/obj/JAVA_LIBRARIES/google-common-intermediates/javalib.ja
r
project 'ginger' is missing required library:
'out/target/common/obj/JAVA_LIBRARIES/gsf-client-intermediates/javalib.jar
The project cannot be built until build path errors are resolved.

Recalling that I had a similiar experience with froyo
(http://groups.google.com/group/android-building/browse_thread/thread/217007
0bd7b81302), I followed the instructions there:

In the "Libraries" tab of the Java Build Path:

- Remove those two .jar files from my build path
- add this .jar to the build path:

out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/javalib.ja
r

hit ok

Everything compiles cleanly. Thanks.

-Sam

GetItNow Marketing

unread,
Dec 22, 2010, 7:57:16 AM12/22/10
to Android Building
I having an issue with prelinking in gingerbread. Apriori compiles
with warnings http://pastebin.com/0zpqJLgw and only 3 modules listed
in prelink map actually end up prelinked. The rest are picked up as
not prelinked and were verified with isprelinked. Any ideas I've never
had this issue with froyo or before and just switched to x64 distro to
build gingerbread.

On Dec 20, 2:50 pm, "Samuel B. Quiring" <s...@sbqsam.com> wrote:
> Hi,
>
> I've downloaded and built the gingerbread source (thanks!).  I executed the
> resulting system.img on the emulator and it works.
>
> Now I'm trying to set up my Eclipse environment.  I decided to take a walk
> on the wild side and use Eclipse version "Helios" (3.6.1-linux-gtk-x86_64)
> configured to use JRE java-6-sun-1.6.0.22.
>
> I am following the instructions onhttp://source.android.com/source/using-eclipse.html.
> The first stumbling block is when you reach this step:
>
>     5. Select "Create project from existing source", enter the path...
>
> There is no "Create project from existing source" option in Helios.  I found
> some instructions on the net that said:
>
>     uncheck the "Use default location" box.
>     browse to the location where you extracted the source
>        # I assumed this is the directory where I copied the .classpath file
>
> I hit "Finish" and the wizard and Eclipse just sat there a long time and
> then correctly populated my workspace.
>
> But there was a red exclamation point next to my project in the package
> explorer and in the Problems window there are 3 errors:
>
> project 'ginger' is missing required library:
> 'out/target/common/obj/JAVA_LIBRARIES/google-common-intermediates/javalib.j­a
> r
> project 'ginger' is missing required library:
> 'out/target/common/obj/JAVA_LIBRARIES/gsf-client-intermediates/javalib.jar
> The project cannot be built until build path errors are resolved.
>
> Recalling that I had a similiar experience with froyo
> (http://groups.google.com/group/android-building/browse_thread/thread/...
> 0bd7b81302), I followed the instructions there:
>
>    In the "Libraries" tab of the Java Build Path:
>
>    - Remove those two .jar files from my build path
>    - add this .jar to the build path:
>
> out/target/common/obj/JAVA_LIBRARIES/android-common_intermediates/javalib.j­a

Jimmy

unread,
Dec 26, 2010, 10:21:38 PM12/26/10
to Android Building
Hi JBQ,

For building froyo and gingerbread on the same linux host, we still
need a 64 bit linux host, right?
Should JDK1.5 32 bit or 64 bit installed?
Thanks.

Jimmy

On 12月21日, 上午2時21分, Jean-Baptiste Queru <j...@android.com> wrote:
> You can build froyo and gingerbread on the same linux host by having
> Sun JDK 1.5 installed and default, and Sun JDK 1.6 installed (but not
> default).
>
> In that case, the envsetup.sh from gingerbread will switch to the 1.6
> JDK. Caveat: once you do that in a terminal, you won't be able to use
> the same terminal for froyo any more.
>
> JBQ
>
>
>
>
>
>
>
>
>
> On Mon, Dec 20, 2010 at 10:17 AM, Jey Michael <jey.mich...@gmail.com> wrote:
> > Thanks JBQ.  This makes it easy to switch completely to 10.6 post-Gingerbread.
>
> > On the same note,  Would 32-bit Ubuntu host be un-supported on Gingerbread?
> > Wondering what would be your recommendation to handle two builds
> > (post/pre Gingerbread) on the same linux machine.
> > thanks,
> > -Jey
>
> > On Mon, Dec 20, 2010 at 10:00 AM, Jean-Baptiste Queru <j...@android.com> wrote:
> >> 10.5 is supported as well.
>
> >> JBQ
>

Jean-Baptiste Queru

unread,
Dec 28, 2010, 10:41:47 AM12/28/10
to android-...@googlegroups.com
Yes, you need a 64-bit host.

On my machine, JDK 1.5 is installed in 64-bit, but I don't remember
whether that was a hard requirement or not.

JBQ

Walt Chen

unread,
Dec 28, 2010, 11:02:33 AM12/28/10
to android-...@googlegroups.com
I have successfully built froyo with full_passion as target on my new 64bit ubuntu 10.04 host (AMD 6-core CPU, much faster than my previous 32bit host).

I only installed JDK 1.6. The only tricky point is to comment line 104-132 in build/core/main.mk which is used to check java version.

2010/12/28 Jean-Baptiste Queru <j...@android.com>

Jean-Baptiste Queru

unread,
Dec 28, 2010, 11:07:43 AM12/28/10
to android-...@googlegroups.com
You need to be aware of two things when building froyo with JDK 1.6:

-This hasn't been tested by Google. While unlikely, there's a
possibility that subtle differences in the toolchain could creep up as
bugs.

-If you're sharing your source tree with other people, you need to be
very careful to not use @Override on interface methods, as JDK 1.5
doesn't support that.

JBQ

Reply all
Reply to author
Forward
0 new messages