红联Linux门户
Linux帮助

LinuxMint18编译同步sudamod2.0

发布时间:2016-06-27 09:57:49来源:linux网站作者:dinphy

设置hosts,方便访问国外站点

```
$ wget https://raw.githubusercontent.com/racaljk/hosts/master/hosts -qO /tmp/hosts
$ sudo sh -c 'cat /tmp/hosts > /etc/hosts'
```


配置环境

sudo apt-get install gedit git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32ncurses5-dev gcc-multilib maven tmux screen w3m ncftp ccache pngquant maven


创建bin目录并指定路径,下载repo并赋予读写权限

$ mkdir ~/bin

$ PATH=~/bin:$PATH

$ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

$ chmod a+x ~/bin/repo


创建工作目录,初始化同步源码环境,开始同步

$ mkdir ~/sudamod

$ cd ~/sudamod

$ repo init -u git://github.com/SudaMod/android.git -b sm-2.0 --no-repo-verify

$ repo sync -c -f -j8 --force-sync --no-clone-bundle


设置编译缓存空间

$ echo "export USE_CCACHE=1" >> ~/.bashrc

$ ~/sudamod/prebuilts/misc/linux-x86/ccache/ccache -M 50G


开始编译

$ cd ~/sudamod

$ . build/envsetup.sh

$ breakfast "device name"

$ brunch "device name"


查看编译完成的刷机包

$ cd ~/sudamod/out/target/product/


再次编译,先清理,再同步更新

$ cd ~/sudamod

make clean

repo sync -j 16


本文永久更新地址:http://www.linuxdiyf.com/linux/21868.html