Help Building 1.5 - Can build Android Master (Donut) but using -b tag with repo init to build Cupcake does not work on Ubuntu 9.10

17 views
Skip to first unread message

tantdyalf

unread,
Nov 19, 2009, 1:44:40 PM11/19/09
to android-platform
Starting from scratch with a fresh 9.10 Ubuntu build I follow the
instructions at:

http://source.android.com/download

for 32 bit Linux.

If I repo init with no -b tag, and get to the make step and "sudo
make" the build is successful and the BUILD_ID=Donut.

It starts out like:

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=1.6
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=Donut
============================================


This is all good and dandy, but I want to build cupcake, not donut.

From this group and other internet resources I understand I should:

$ repo init ... -b cupcake

I have tried this with multiple clean builds of my machine, following
all the steps in the download page above and always end with the same
problem. I can substitute android-1.5 for cupcake and get the same
result.

After the repo sync (hours of downloading) completes successfully, I
run:

$ sudo make

This gets me:

build/core/product_config.mk:261: WARNING: adding test OTA key
============================================
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
============================================
frameworks/policies/base/PolicyConfig.mk:22: *** No module defined for
the given PRODUCT_POLICY (android.policy_phone). Stop.

The most obvious thing to me is that the BUILD_ID is blank. I also
see something about an OTA key and PRODUCT_POLICY. Since the same
exact environment works when I don't use -b in my repo init command I
am unsure why these are showing. Help?

I would be very appreciative if someone could help me figure out how
to build 1.5.

Do I have to get the master then do some repo or git commands to
switch to the 1.5 branch then build? Why doesn't the -b tag seem to
work when later build steps are run?

Thanks in advance for your time helping me get the source for and
building 1.5 on my Ubuntu machine.

tantdyalf

unread,
Nov 20, 2009, 11:45:03 AM11/20/09
to android-platform
I was able to resolve this in two steps.

You can ignore the missing BUILD_ID and the OTA Key warning.

First, when you see the PRODUCT_POLICY error you need to update
findleaves.sh with this change:

http://android.git.kernel.org/?p=platform/build.git;a=commitdiff;h=239637eac86c8f4f92384891a8f99085039a5778

For some reason this is missing in the 1.5 branch but it is in the
master branch which explains why when I was using -b cupcake I wsa
getting different results.

That will get you past that error. Now if you try to make you will
get a compilation error for AST.o. The fix to this is to downgrade
GCC and G++ from 4.4 to 4.3 (I used a combination of apt-get and
update-alternatives).

After these two changes it is possible to use the -b repo tag to get
the 1.5 cupcake source and build it on Ubuntu Karmic Koala (9.10).

One more hint for people out there, be sure you have Java5 on your
system, not Java6, if you have the wrong version you will have
problems earlier in the process.

I hope this is helpful to someone out there.

Travis B

unread,
Nov 20, 2009, 2:27:21 PM11/20/09
to android-...@googlegroups.com

Try building without running sudo-- it is unnecessary and may be changing some of your environment variables.


--

You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=.


Reply all
Reply to author
Forward
0 new messages