Android Froyo基于32 bit Ubuntu 10.10编译问题

已经下载并运行了Angstrom、0xdroid以及rowboat几个版本到beagleboard上试运行了,现在开始着手Android源码的编译,从上层转型到底层,很多东西都没有头绪,感觉东西很杂,只能慢慢摸索。

Android代码下载的是Froyo 2.2版本的,直接make,出现错误提示:

You are attempting to build on a 32-bit system.
                Only 64-bit build environments are supported beyond froyo/2.2

查找资料,确定下面的修改步骤(-表示删除行,+表示添加行):

1、修改build/core目录下的main.mk文件,修改策略为:
                       ifeq ($(BUILD_OS),linux)
                        build_arch := $(shell uname -m)
                       -ifneq (64,$(findstring 64,$(build_arch)))
                       +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.)

2、修改下列文件:
                       /external/clearsilver/cgi/Android.mk
                       /external/clearsilver/cs/Android.mk
                       /external/clearsilver/java-jni/Android.mk
                       /external/clearsilver/util/Android.mk
                     4个文件的修改策略相同,为:
                       # This forces a 64-bit build for Java6
                        -LOCAL_CFLAGS += -m64
                        -LOCAL_LDFLAGS += -m64
                        +LOCAL_CFLAGS += -m32
                        +LOCAL_LDFLAGS += -m32

接下来的编译可能会遇到很多因为缺少相应模块而产生的错误,请首先安装下列软件模块:

bison
                         jdk6
                        g++ (build-essential)
                        zlib1g-dev
                        flex
                        libncurses-dev
                        gperf

然后,就是make之后漫长的等待...

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wwsfyw.html