Debian 5 Android 编译

想在debian 5上编译android2.3.4的源码。

1.先装java sdk

确认你apt 的source list加上了no-free的源

 sudo apt-get install sun-java6-jdk

安装完以后切换java的实现到刚安装的jdk

 sudo update-alternatives --config java

2.需要安装的包可以参看:

http://source.android.com/source/initializing.html

3.修改makefile

因为是32位所以要改写makefile

build/core/main.mk:
ifneq (i686,$(findstring i686,$(build_arch)))
$(warning ************************************************************)
$(warning You are attempting to build on a 32-bit system.)
$(warning Only 64-bit build environments are supported beyond froyo/2.2.)
$(warning ************************************************************)
$(error stop)
endif

另外
external/clearsilver/cgi/Android.mk
external/clearsilver/java-jni/Android.mk
external/clearsilver/util/Android.mk
external/clearsilver/cs/Android.m

将这些.mk文件中的

LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64

全部改成

LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32

开始编译:

prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)
prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: /lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found (required by prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc)

cd cd prebuilt/linux-x86/toolchain/
mv arm-eabi-4.4.3 to arm-eabi-4.4.3.o
ln -s arm-eabi-4.4.0 arm-eabi-4.4.3
 

编译刚一开始就停下来了

target Generated: libclearsilver-jni <= out/host/common/obj/JAVA_LIBRARIES/clearsilver_intermediates/javalib.jar

target Generated: libclearsilver-jni <= out/host/common/obj/JAVA_LIBRARIES/clearsilver_intermediates/javalib.jar

host C: libneo_util <= external/clearsilver/util/neo_err.c

/bin/bash: /prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: No such file or directory

make: *** [out/host/linux-x86/obj/SHARED_LIBRARIES/libneo_util_intermediates/neo_err.o] Error 127

toolchain还是有问题,搞不定,明天装个ubuntu10.04继续

你可能感兴趣的:(android,android,Debian,职场,休闲)