Porting Gingerbread: what????

126 views
Skip to first unread message

G2

unread,
Dec 19, 2010, 11:37:05 PM12/19/10
to android-porting
===========================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.1
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================
Checking build tools versions...
build/core/main.mk:76:
************************************************************
build/core/main.mk:77: You are attempting to build on a 32-bit system.
build/core/main.mk:78: Only 64-bit build environments are supported
beyond froyo/2.2.
build/core/main.mk:79:
************************************************************
build/core/main.mk:80: *** stop. Stop.


Does Google have a partnership with Intel to force everybody to
upgrade their machine? ;-) :-(

Grégoire

G2

unread,
Dec 19, 2010, 11:38:59 PM12/19/10
to android-porting
And no need to try to bypass the rule! You really need a 64-bit
machine,

Grégoire

G2

unread,
Dec 20, 2010, 3:35:31 AM12/20/10
to android-porting
At least, it's successfully compiling on a 64-bit machine. Good work
Google!

Hopefully, there will be less pain for a full upgrade compared to
eclair->froyo as the jump doesn't seem to be as high on the backend
side...

Grégoire

G2

unread,
Dec 20, 2010, 2:01:30 PM12/20/10
to android-porting
The following patch works for me in order to compile Gingerbread on a
32-bit machine:

--- a/external/clearsilver/java-jni/Android.mk 2010-12-20
09:30:02.379792000 -0800
+++ b/external/clearsilver/java-jni/Android.mk 2010-12-20
02:20:58.871792000 -0800
@@ -34,8 +34,8 @@
LOCAL_CFLAGS += -fPIC

# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64

LOCAL_NO_DEFAULT_COMPILER_FLAGS := true

--- a/external/clearsilver/cgi/Android.mk 2010-12-20
09:30:11.115792000 -0800
+++ b/external/clearsilver/cgi/Android.mk 2010-12-20
02:24:39.711792000 -0800
@@ -13,8 +13,8 @@
LOCAL_CFLAGS := -fPIC

# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64

LOCAL_NO_DEFAULT_COMPILER_FLAGS := true

--- a/external/clearsilver/cs/Android.mk 2010-12-20 09:30:20.419792000
-0800
+++ b/external/clearsilver/cs/Android.mk 2010-12-20 02:24:48.375792001
-0800
@@ -9,8 +9,8 @@
LOCAL_CFLAGS := -fPIC

# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64

LOCAL_NO_DEFAULT_COMPILER_FLAGS := true

--- a/external/clearsilver/util/Android.mk 2010-12-20
09:32:13.415792001 -0800
+++ b/external/clearsilver/util/Android.mk 2010-12-20
02:24:56.767792001 -0800
@@ -18,8 +18,8 @@
LOCAL_CFLAGS := -fPIC

# This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64

LOCAL_NO_DEFAULT_COMPILER_FLAGS := true



Grégoire

Gregoire Gentil

unread,
Dec 20, 2010, 2:32:43 PM12/20/10
to n179911, android-porting
Copy the content into a file named "compile-on-32-bit.patch" and type:
patch -p1 < compile-on-32-bit.patch

Grégoire


On Mon, 2010-12-20 at 11:29 -0800, n179911 wrote:
> How can I apply this patch after I check out the source code from android site?
> Thank you.

> > --
> > unsubscribe: android-porti...@googlegroups.com
> > website: http://groups.google.com/group/android-porting
> >


Ashwin Bihari

unread,
Dec 20, 2010, 2:38:51 PM12/20/10
to greg...@gentil.com, android-porting
Did they also start using Java 1.6 or newer for the build as well by
any chance? I already knew about the 64-bit environment change and
thus have been building my Eclair version under that..

Regards
-- Ashwin

Gregoire Gentil

unread,
Dec 20, 2010, 2:42:48 PM12/20/10
to Ashwin Bihari, android-porting
Yes, 1.6 is needed now,

Grégoire

Ashwin Bihari

unread,
Dec 20, 2010, 2:57:13 PM12/20/10
to greg...@gentil.com, android-porting
Gregoire,

That's excellent..thanks for the confirmation..

-- Ashwin

Hemanth

unread,
Dec 20, 2010, 9:21:35 PM12/20/10
to android-porting
Hi,

The patch below is nice!

Some additional information.
1. we have to comment out the error statement in main.mk(just added
for the sake of being complete).
build/core/main.mk:80
$(warning
************************************************************)
-$(error stop)
+#$(error stop)

2. I use a slightly different way to change the flags. It's not better
or worse, just an alternative.
I think clearsilver code is not updated so frequently, so the patch
should be enough. But I tend to keep misplacing the patch file.
Running the below command is slower, but it ignores possible line
number changes.

In ANDROID_ROOT:
$find . -name '*.mk' | xargs sed -i 's/-m64//g'

G2

unread,
Dec 21, 2010, 2:44:02 PM12/21/10
to android-porting
Correct for the first part. I forget to mention it.

For the second point, I actually started to do the same but when I saw
a lot of "-m64" reference everywhere, I considered the sed as a little
bit more "dangerous" (even if you do -name *.mk). Imagine that you
have a file named *-m64* and it's called in an Android.mk file...

Thanks for the contribution!

Grégoire

wei-ting Chang

unread,
Dec 22, 2010, 1:07:52 AM12/22/10
to android-porting
sorry, I have a problem
----------------------------------------
target Java: Camera (out/target/common/obj/APPS/Camera_intermediates/
classes)
packages/apps/Camera/src/com/android/camera/ui/GLRootView.java:41:
cannot access javax.microedition.khronos.egl.EGLConfig
bad class file: javax/microedition/khronos/egl/EGLConfig.class(javax/
microedition/khronos/egl:EGLConfig.class)
unable to access file: corrupted zip file
Please remove or make sure it appears in the correct subdirectory of
the classpath.
import javax.microedition.khronos.egl.EGLConfig;
^
make: *** [out/target/common/obj/APPS/Camera_intermediates/classes-
full-debug.jar] Error 41

--------------------------------------------------
Can anyone help me?

hedwin

unread,
Dec 22, 2010, 10:23:34 AM12/22/10
to 張惟婷, android...@googlegroups.com
Was able to build 2.3 on a 32bit machine with jdk 1.6 on ubuntu 10.10.
Need to check but think I build generic-eng
Tried 64bit but this resulted in errors. Some source is build 32bit
but the linker wants to use 64bit lib's.


2010/12/22 張惟婷 <tt9...@gmail.com>:
> I use JDK 1.6
>
> 2010/12/22 hedwin <hedwin...@gmail.com>
>>
>> meant so say: It might or might not be related but which java sdk do you
>> use?
>>
>> On Wed, Dec 22, 2010 at 10:14 AM, hedwin <hedwin...@gmail.com> wrote:
>> > I might or might not be related but which java sdk do you use?

hedwin

unread,
Dec 22, 2010, 10:24:25 AM12/22/10
to 張惟婷, android...@googlegroups.com
Oh yeah, ubuntu (32 and 64) was running in virtualbox

2010/12/22 hedwin <hedwin...@gmail.com>:

Amit Saxena

unread,
Jan 5, 2011, 1:50:58 AM1/5/11
to android-porting
Any help ? I am also facing same issue.

Thanks
Amit.

On Dec 22 2010, 11:07 am, wei-ting Chang <tt90...@gmail.com> wrote:
> sorry, I have a problem
> ----------------------------------------
> target Java: Camera (out/target/common/obj/APPS/Camera_intermediates/
> classes)
> packages/apps/Camera/src/com/android/camera/ui/GLRootView.java:41:
> cannotaccessjavax.microedition.khronos.egl.EGLConfig
> bad classfile: javax/microedition/khronos/egl/EGLConfig.class(javax/
> microedition/khronos/egl:EGLConfig.class)unabletoaccessfile:corruptedzipfile
> Please remove or make sure it appears in the correct subdirectory of
> the classpath.
> import javax.microedition.khronos.egl.EGLConfig;
>                                      ^
> make: *** [out/target/common/obj/APPS/Camera_intermediates/classes-
> full-debug.jar] Error 41
>
> --------------------------------------------------
> Can anyone help me?
>
> On 12月22日, 上午3時44分, G2 <grego...@gentil.com> wrote:
>
>
>
> > Correct for the first part. I forget to mention it.
>
> > For the second point, I actually started to do the same but when I saw
> > a lot of "-m64" reference everywhere, I considered the sed as a little
> > bit more "dangerous" (even if you do -name *.mk). Imagine that you
> > have afilenamed *-m64* and it's called in an Android.mkfile...
> > > > > > > Grégoire- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages