Compiling CM14.1 (sudmod71.1) Process records

Source: Internet
Author: User

Compile CM14.1 memory requirements are very high, at least 8G above, my 6G can also be done, swap space allocation a little bit larger.

1. Installation Platform

It is recommended to install Deepin 15.3 Desktop System, the system UI looks good.

2. Configure the Environment

(1) Install the build dependent library

1 sudo apt-get  updade2 sudo apt-get  upgrade3 sudo apt-get install Git-core GnuPG Flex Bison gperf libsdl1. 2-dev libesd0-dev libwxgtk3. 0-dev squashfs-tools build-essential Zip curl libncurses5-dev zlib1g-dev openjdk-8-jre openjdk-< C13>8-jdk pngcrush schedtool libxml2 libxml2-utils xsltproc lzop libc6-dev schedtool g++-multilib lib32z1-dev lib32 Ncurses5-dev gcc-multilib maven tmux screen w3m ncftp Liblz4-tool

(2) Create a bin folder to save the repo file

1 #新建文件夹 2 mkdir ~/bin3#设置路径 4 path=~/bin: $PATH5#下载repo  6 Curl https://Commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin /repo7#赋予权限 8 chmod a+x ~/bin/repo

(3) Set up GitHub account User.Name and email user.email

1 git config--global  user.name username2 git config--global User.email [ Email protected]

(4) Update/replace system hosts for easy access to foreign sites

1 wget https://2'cat/tmp/hosts >/etc/hosts'

If sudo appears: Unable to resolve host:dinphy- -310CN: Connection timeout Similar to the problem, please refer here to solve: http://www.cnblogs.com/dinphy/p/5660645.html

3, download CM14.1 source code and compile

(1) Create a new source folder and initialize it

~/~/-u git://github.com/sudamod/android.git-b sm-3.0-c-f-j8-- Force-sync--no-clone-bundle

If the synchronization AOSP source process is slow, you can change the Google source address for the domestic address, such as Tsinghua University image source. The method is:

You only need to .repo/manifest.xml change the AOSP of this remote fetch from https://android.googlesource.com https://aosp.tuna.tsinghua.edu.cn/ .

1<manifest>2 3<remote name="AOSP"4-Fetch="https://android.googlesource.com"5+ fetch="https://aosp.tuna.tsinghua.edu.cn"6review="android-review.googlesource.com"/>7 8<remote name="GitHub"

After modification, you can continue synchronizing repo sync-c-f-j8--force-sync--no-clone-bundle .

(2) Add Device compilation three kit and dependent files (this step can be ignored, you can also join the penultimate line of ~/sudamod/.repo/manifests/snippets/cm.xml ), such as my device:

<!--Start Device--<project path="Device/xiaomi/ido"Name="Cyanogenmod/android_device_xiaomi_ido"Remote="GitHub"revision="cm-14.1"/> <project path="Vendor/xiaomi/ido"Name="Dinphy-dev/sudamod_vendor_xiaomi_ido"Remote="GitHub"revision="sm3.0"/> <project path="kernel/xiaomi/msm8916"Name="cyanogenmod/android_kernel_xiaomi_msm8916"Remote="GitHub"revision="cm-14.1"/> <project path="External/sony/boringssl-compat"Name="Cyanogenmod/android_external_sony_boringssl-compat"Remote="GitHub"revision="cm-14.1"groups="PDK"/> <project path="External/stlport"Name="Cyanogenmod/android_external_stlport"Remote="GitHub"revision="cm-14.1"groups="PDK"/> <project path="packages/resources/devicesettings"Name="cyanogenmod/android_packages_resources_devicesettings"Remote="GitHub"revision="cm-14.1"groups="PDK"/><!--END Device--

Device compilation three suite and dependent files can also be git clone separately, and then put in the appropriate folder. My device code is Ido, the processor is msm8916, so put in the path can refer to the section of the quotation mark in the path above.

(3) After the source synchronization is complete, start compiling

" Export use_ccache=1  >> ~/. bashrc# given a 50G space to shorten the compilation time ~/sudamod/prebuilts/misc/linux-x86/ccache/ccache-M 50g# Initialize the compilation, note ". "Don't forget it." Build/"device name", mine is idobrunch Sm_ido-userdebug

4, my memory is 6G, compile-time prompt memory space is insufficient error and Jack error, if there is the same problem, please refer to: http://www.cnblogs.com/dinphy/p/6138803.html

5. End of compilation.

Compiling CM14.1 (sudmod71.1) Process records

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.