Results 1 to 6 of 6

Thread: [GUIDE]Compile from CM7 Source (Kanged) Ubuntu 11.10 - 12/31/2011

      
   
  1. #1
    Recognized Developer RoyalKnight6190's Avatar
    Join Date
    Jul 2011
    Location
    Arizona
    Age
    31
    Posts
    20
    Post Thanks / Like

    [GUIDE]Compile from CM7 Source (Kanged) Ubuntu 11.10 - 12/31/2011

    *WARNING! I Am Not Responsible For Anything That Happens To Your Device or Computer*

    Here is another Gift from the DARKSIDE Dev Team:

    Compiling CM from Source
    Thank you to Sparksco for building a great base tutorial that I used help build this.
    Original Thread Found Here


    Updated info for non-debian based systems thanks to Vicodan:
    If you want to use this on fedora or non-debian based systems you will need to replace every command that says apt-get to yum. Thanks to Vicodan for pointing this out.

    *Note: Not currently working on Tmobile Hercules, for learning purposes only until source is out for our device


    If you can add anything let me know and I will add to this or edit the tutorial, 2nd post will be for building from Google Source AOSP.


    Hardware Requirements:

    - A minimum dual core pc, the more ram the better
    - A working wifi connection or network connection
    - Linux Operating System. Either 32-bit or 64-bit will work
    NOTE: 64-bit will run faster and you need 64bit to build Android 2.3 +
    You also need full access to CM source but CM is hording those


    Black Bold Print = Instructions

    Red Bold Print = Terminal Code

    Italic Font = Misc. Details

    Optional Recommended Software:

    Many of these can be found in the software center using the search box
    If you find multiple versions it's ok to install them all, unless it says
    otherwise


    Python
    Open the terminal application and type

    Code:
    $ sudo apt-get install python
    awk and gawk
    7zip
    RAR


    Code:
    $ sudo apt-get install rar
    Step 1 java:

    Setting up java is one of the most important step to getting your pc prepared for a build environment. Truly this step is whatever is going to work best on your system, I do it this way and you can try it whichever way you want. Take my advise or not.

    NOTE: On Ubuntu 11.10, and variants, you need to enable the
    parter repository to install sun-java6-jdk:


    Code:
    $ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
    
    $ sudo apt-get update
    
    $ sudo apt-get install openjdk-6-jdk
    then do

    Code:
    $ sudo apt-get install -y git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
    
    $ java -version
    The correct version is:

    java -version
    java version "1.6.0_26"
    Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
    Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
    You must have a 1.6.x to compile on the gingerbread branch of cyanogenmod. If you have the correct


    Step 2 - Install git

    Code:
    $ sudo apt-get install git
    Step 3 - Prepare the Build Environment

    NOTE: You only need to do these steps the first time you build.
    If you previously prepared your build environment, skip to Copy
    proprietary files.


    3a - Install the ADB

    To let Samsung Galaxy S2 be recognised by the debugger add these lines to 92-samsung.rules in /etc/udev/rules.d

    Code:
    $ sudo gedit 92-samsung.rules in /etc/udev/rules.d
    paste

    Code:
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8",
    ATTRS{idProduct}=="6640", MODE="0660", OWNER="root",
    GROUP="androiddev", SYMLINK+="android%n"
    SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
    save and exit

    $ sudo gedit /etc/udev/rules.d/51-android.rules

    paste

    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
    SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1″, SYMLINK+=”android_adb”, MODE=”0666″
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
    save and exit

    Code:
    $ sudo gedit .bashrc
    paste at the top

    Code:
    #AndroidDev PATH
    export PATH=${PATH}:~/androidsdk/tools
    export PATH=${PATH}:~/androidsdk/platform-tools
    save and exit

    Now to Install the SDK, be prepared this takes some time:

    Go to Android Developers SDK Download Found Here - Link
    or
    Download directly from This Link - Download Link

    Once done extract the contents to your home folder, then rename it to androidsdk.

    Once extracted and renamed go to /androidsdk/tools and double click the file android and click run in terminal.

    Android SDK updater will pop up, select the option New and start the upgrade. Now wait. When finished do new one more time to make sure you got everything, once done close SDK window and terminal window.


    3b - Install the Build Packages
    Install using the package manager of your choice:

    For 32-bit & 64-bit systems:


    Code:
    $ sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
    For 64-bit only systems:

    Code:
    $ sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib

    4a - Create the Directories

    You will need to set up some directories in your build environment.
    To create them:


    Code:
    $ mkdir -p ~/bin
    
    $ mkdir -p ~/android/system
    4b - Install the Repository

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

    Code:
    $ curl https://raw.github.com/android/tools_repo/master/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, repo sync will take a long time so sit back and watch the code on terminal scroll, dont touch it, toss in Star Wars Saga or Lord of the Rings Trilogy and watch from start to finish and it might be done:


    Code:
    $ cd ~/android/system/
    
    $ repo init -u git://github.com/CyanogenMod/android.git -b gingerbread --repo-url=git://github.com/android/tools_repo.git
    
    $ repo sync
    4c - Copy proprietary files

    NOTE: This only needs done the first time you build. If you have
    already done these steps, you may skip to Download RomManager.
    You will need to have a speedy 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.[/B]


    Code:
    $ cd ~/android/system/device/samsung/(DEVICE NAME)
    
    ./extract-files.sh
    4d - Download RomManager

    NOTE: This only needs to be done when an update to
    RomManager is released. If you are-up-to date, you may skip to Building
    CyanogenMod. Download RomManager which is needed by the build:


    Code:
    $ ~/android/system/vendor/cyanogen/get-rommanager
    5a - Building CyanogenMod

    Check for updates
    First, check for updates in the source:


    Code:
    $ cd ~/android/system/
    
    $ repo sync
    
    $ cp build/core/root.mk -f Makefile
    5b - Set up your Compiler
    This is optional but helpful for kernel compiling


    There are a lot of things that need to be added to the .bashrc to let your
    pc know about which type of compiler you want to use. The best way is
    to use the one provided in the CM7 work tree.


    Code:
    #Android
    
    export ARCH=arm
    
    export CCOMPILE=$CROSS_COMPILE
    
    export PATH=$PATH:~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
    [B]6 - Configure Build & Compile
    Now, the environment must be configured to build and the ROM
    compiled, from code, for the GalaxyS2.

    Code:
    $ . build/envsetup.sh && brunch (DEVICE NAME)
    7 - Install

    Copy your .zip file from


    ~/android/system/out/target/product/galaxys2att/update.cm-XXXXX-
    signed.zip to the root of the SD card.
    Optional: Download Google Apps for CyanogenMod 7 and place it on the
    root of the SD card.
    Flash both of these .zip files from recovery.



  2. #2
    Recognized Developer RoyalKnight6190's Avatar
    Join Date
    Jul 2011
    Location
    Arizona
    Age
    31
    Posts
    20
    Post Thanks / Like

    Re: [GUIDE]Compile from CM7 Source (Kanged) Ubuntu 11.10 - 12/31/2011

    2nd post for Building from GOOGLE Source AOSP


  3. #3
    Recognized Developer RoyalKnight6190's Avatar
    Join Date
    Jul 2011
    Location
    Arizona
    Age
    31
    Posts
    20
    Post Thanks / Like

    Re: [GUIDE]Compile from CM7 Source (Kanged) Ubuntu 11.10 - 12/31/2011

    3rd Post for anything else I add


  4. #4
    ACS Developer interdpth's Avatar
    Join Date
    Jun 2011
    Age
    22
    Posts
    27
    Post Thanks / Like

    Re: [GUIDE]Compile from CM7 Source (Kanged) Ubuntu 11.10 - 12/31/2011

    Don't forget to add how to make extract-files.sh
    How to put your own device into the device tree
    and all that good stuff


  5. #5
    ACS Developer FirehaK's Avatar
    Join Date
    Oct 2011
    Location
    Canton, OH
    Age
    21
    Posts
    33
    Post Thanks / Like

    Re: [GUIDE]Compile from CM7 Source (Kanged) Ubuntu 11.10 - 12/31/2011

    +1 for adding how to make an extract-files.sh file. I'd love to build at least aosp from source and the Replenish isn't exactly widely hacked. I have no idea where to start or what proprietary files are needed.


  6. #6
    Forum Member DreamsForgotten's Avatar
    Join Date
    Nov 2010
    Location
    Patterson, Louisiana
    Posts
    289
    Post Thanks / Like
    Awesome write up hope it inspires many!

    Sent from my Nexus S 4G using Tapatalk



Visitors found this page by searching for:

compile cm7 from source

how to compile cm7

compile cm7

how to build cm7compiling cm7cm7 source codehow to build cm7 from sourcehow to compile cm7 from sourcebuild cm7 from sourcecm7 compile guidebuilding cm7 from sourcecm7 sourceguide to compile cm7compile cm7 guidesource code wont buildcompile cm7 glacier[GUIDE]Compile CM7 AOSP (Kanged edition) For desire on Linux ...how to build a cm7 from sourceinitializing build enviroment galaxy s2compile cm7 on ubuntuguide compile cm7cm7 compile galaxy s2ubuntu htc evo shifthow to compile cm7.2 sourceshow to compile cm7 g2xcm7 transform ultracompiling cm7 from source building an cyanogen 7 from ubuntu 11.10setup build environment for cm7 ubuntucompile cm7 ubuntu evo shift
SEO Blog

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •