[TOC] # 硬件环境 * Ubuntu 14.04 64-bit * 16G 内存 * 至少30G磁盘空间 # 编译环境搭建 可参考[andorid官网](http://source.android.com/source/initializing.html) * 安装jdk7 ~~~ /home/shrimp/ $ sudo apt-get install openjdk-7-jdk ~~~ * 软件包安装 ~~~ /home/shrimp/ $ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \ lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \ libgl1-mesa-dev libxml2-utils xsltproc unzip libsdl1.2-dev \ libesd0-dev libwxgtk2.8-dev squashfs-tools libncurses5-dev \ zlib1g-dev pngcrush schedtool libxml2 libxml2-utils lzop libc6-dev \ schedtool lib32z1-dev lib32readline-gplv2-dev libswitch-perl \ libssl1.0.0 libssl-dev ~~~ # 获取fireprime android5.1源码 * 通过网盘下载fireprime_android5.1_git_20150612.tar [百度网盘](http://pan.baidu.com/s/1dDhDNGX#path=%252FDevBoard%252FFirePrime%252FSource%252FAndroid5.1) * 解压缩 ~~~ /home/shrimp/ $ cd fireprime $ tar -xvf fireprime_android5.1_git_20150612.tar ~~~ 这时会得到.git目录,需要通过git恢复命令获取到源码 ~~~ /home/shrimp/fireprime/ $ git reset --hard ~~~ 添加远程bitbucket ~~~ $ git remote add bitbucket https://bitbucket.org/T-Firefly/firenow-lollipop.git ~~~ 这样以后就可以直接从 bitbucket 处更新 ~~~ $ git pull bitbucket fireprime:fireprime ~~~