`
mmdev
  • 浏览: 12952247 次
  • 性别: Icon_minigender_1
  • 来自: 大连
文章分类
社区版块
存档分类
最新评论

Galaxy Nexus (GSM): Compile CyanogenMod 9 (Linux)

 
阅读更多


How to compile CyanogenMod for Maguro (GSM Galaxy Nexus).

This how-to was written for Ubuntu 12.04 for Maguro running CyanogenMod 9.x (Ice Cream Sandwich), on 12 April 2012.

Contents

[hide]

Prepare the Build Environment

NOTE: These steps only need to be performed once. If the build environment is already prepared, skip to Copy proprietary files.

Install the ADB

Install the Android SDK.

Install the Build Packages

Install using preferred package manager:

For 64-bit systems:

git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 g++-multilib mingw32 openjdk-6-jdk pngcrush schedtool tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386

Create the Directories

You will need to set up some directories in your build environment.

To create them:

mkdir -p ~/bin
mkdir -p ~/android/system

Install the Repository

Enter the following to download make executable the "repo" binary:

curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.

Now enter the following to initialize the repository:

cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j16

Sync Relevant Repositories

NOTE: This only needs to be done the first time after installing the repository. If you have already done this step, you may skip to Copy Proprietary Files.

By default, CyanogenMod 9 only syncs the core android repositories and none of the device or kernel trees to save both bandwidth and time. Run the following command to sync the necessary components for the device:

. build/envsetup.sh && brunch maguro

Copy Proprietary Files

NOTE: This only needs to be done the first time you build. If you have already done these steps, you may skip to Download Prebuilts.

You will need to have a maguro with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.

Connect the device to the computer and ensure that ADB is working properly.

cd ~/android/system/device/samsung/maguro/
./extract-files.sh
NOTE: If some hardware isn't functioning properly, you may need to run the above command again for updated proprietary files.

Download Prebuilts

Download Prebuilts needed by the build:

~/android/system/vendor/cm/get-prebuilts

Building CyanogenMod

Check for updates

First, check for updates in the source:

cd ~/android/system/
repo sync

Configure Build & Compile

Now, the environment must be configured to build and the ROM compiled, from code, for the maguro.

. build/envsetup.sh && brunch maguro

Install

  1. Copy your .zip file from ~/android/system/out/target/product/maguro/update.cm-XXXXX-signed.zip to the root of the SD card.
    Optional: Download Google Apps for CyanogenMod 9 and place it on the root of the SD card.
  2. Flash both of these .zip files from recovery.
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics