Building Android’s ‘master’ branch on a 32 bit Linux system

It seems that those who try to compile Android releases that follow ‘froyo’ on 32 bit systems are out of luck since a limitations has been imposed during the compile process. Being one of those unfortunate people I was annoyed at the fact that I am stuck with a ‘froyo’ build, luckily I have found that people have already encountered this situation before and found a solution. I will not go over the basic steps of building Android since those can be found at the Android source website but they must be performed before running the final ‘make’ command (make sure you follow the parts relating to ‘gingerbread’ and above since that’s what we’re building). I am assuming an Ubuntu environment since that’s what I have.

* This is only relevant for building on 32-bit systems if you are on a 64-bit system chances are you won’t encounter any errors by following the Android build at the website.*

First we must get the required packages, the Android website is a bit outdated so after a bit of trail and error and some Google searches we come up with the following list:

sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev git-core gnupg build-essential zip curl libncurses5-dev zlib1g-dev openjdk-6-jdk ant gcc-multilib g++-multilib

After we’ve installed these packages the next step is to remove the limitation from the make files, for those of you who are lazy I have found a patch file to do just that. In case the original file is taken down or you just want to know what the individual steps are I have copied them here:

  1. Go to ‘build/core/main.mk’, lookup ‘ifneq (64,$(findstring 64,$(build_arch)))’ and replace any reference to ’64′ with your architecture (can be retrieved by running ‘uname -a’) mine in this case is i686 so I resulted in ‘+ifneq (i686,$(findstring i686,$(build_arch)))’
  2. Go over the following files:
    • external/clearsilver/cgi/Android.mk
    • external/clearsilver/java-jni/Android.mk
    • external/clearsilver/util/Android.mk
    • external/clearsilver/cs/Android.mk

    and look for the lines stating ‘LOCAL_CFLAGS += -m64′ and ‘LOCAL_LDFLAGS += -m64′, you could either comment these lines or change it to show ‘-m32′

All that is left for us is to run make and enjoy a few hours of watching Android build on our system :)

Just a quick notice, this was tested on a clean Install of Ubuntu Server 10.10 32 bit if you encounter any errors paste them here and I’ll try to help.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值