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

Search This thread

Royalknight6190

Inactive Recognized Developer
Aug 22, 2009
1,772
1,069
Chandler
*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:
[COLOR="red"][B]$ sudo apt-get install python[/B][/COLOR]

awk and gawk
7zip
RAR


Code:
[COLOR="red"][B]$ sudo apt-get install rar[/B][/COLOR]

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:
[COLOR="red"][B]$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

$ sudo apt-get update

$ sudo apt-get install openjdk-6-jdk[/B][/COLOR]

then do

Code:
[COLOR="red"][B]$ 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[/B][/COLOR]

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:
[COLOR="Red"][B]$ sudo apt-get install git[/B][/COLOR]

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:
[COLOR="red"][B]$ sudo gedit 92-samsung.rules in /etc/udev/rules.d[/B][/COLOR]

paste

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

save and exit

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

paste

Code:
[B]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"[/B]

save and exit

Code:
[COLOR="red"][B]$ sudo gedit .bashrc[/B][/COLOR]

paste at the top

Code:
[B]#AndroidDev PATH
export PATH=${PATH}:~/androidsdk/tools
export PATH=${PATH}:~/androidsdk/platform-tools[/B]

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:
[COLOR="red"][B]$ 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[/B][/COLOR]

For 64-bit only systems:

Code:
[COLOR="red"][B]$ sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib[/B][/COLOR]


4a - Create the Directories

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


Code:
[COLOR="red"][B]$ mkdir -p ~/bin

$ mkdir -p ~/android/system[/B][/COLOR]

4b - Install the Repository

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

Code:
[COLOR="red"][B]$ curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo

$ chmod a+x ~/bin/repo[/B][/COLOR]

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:
[COLOR="red"][B]$ 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[/B][/COLOR]

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:
[COLOR="red"][B]$ cd ~/android/system/device/samsung/(DEVICE NAME)

./extract-files.sh[/B][/COLOR]

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:
[COLOR="red"][B]$ ~/android/system/vendor/cyanogen/get-rommanager[/B][/COLOR]

5a - Building CyanogenMod

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


Code:
[COLOR="red"][B]$ cd ~/android/system/

$ repo sync

$ cp build/core/root.mk -f Makefile[/B][/COLOR]

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:
[COLOR="red"][B]#Android

export ARCH=arm

export CCOMPILE=$CROSS_COMPILE

export PATH=$PATH:~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin[/B][/COLOR]

6 - Configure Build & Compile
Now, the environment must be configured to build and the ROM
compiled, from code, for the GalaxyS2.

Code:
[COLOR="red"][B]$ . build/envsetup.sh && brunch (DEVICE NAME)[/B][/COLOR]

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.
 
Last edited:

pyraxiate

Senior Member
Jun 24, 2007
2,255
800
Baltimore
You sir are awesome :-D I was just looking all of this up! Actually setting up all AOSP build envoirnments as I type this :)

Sent from my SGH-T989 using xda premium
 
Last edited:

xOrphenochx

Senior Member
May 8, 2009
62
2
I'm assuming openjdk works too.

Sent from my SGH-T989 using xda premium

Blah, keep misreading things, don't always assume on that, someone I know has issues with OpenJDK and the programs he's written in SUN's. On another note you also need to run apt-get update after adding the repo.
 
Last edited:

Royalknight6190

Inactive Recognized Developer
Aug 22, 2009
1,772
1,069
Chandler
You put openjdk not sunjdk in the code part. Gonna give this a shot myself, thanks.

I'm assuming openjdk works too.

Sent from my SGH-T989 using xda premium

Blah, keep misreading things, don't always assume on that, someone I know has issues with OpenJDK and the programs he's written in SUN's. On another note you also need to run apt-get update after adding the repo.

This is how I do it and it works every time, have set multiple computers up this same exact way.

Orphenochx - do I need to edit something in there?
 

pyraxiate

Senior Member
Jun 24, 2007
2,255
800
Baltimore
Well truthfully there's a bit more to it, the package is named sun-java6-jdk if he wants SUN's, you'll need to run apt-get update also, and I'm OCD for just editing /etc/apt/sources.list since that repository is already in there and uncommented.

Aye, I'm well aware that they are two different development kits ( and his post contradicts itself by mentioning both ). I wasn't correcting / contradicting you. I was merely asking if openjdk should also work? :) I have openjdk installed on my build server which is why I asked. Ill add sun jdk if not :)

Sent from my SGH-T989 using xda premium
 

mikeyinid

Senior Member
Sep 4, 2010
8,871
4,001
Boise
have you actually done this for the hercules? i dont think your instructions quite cover building for this device, especially since your pulling prop's for the wrong phone(as you have outlined in the op).
 

xOrphenochx

Senior Member
May 8, 2009
62
2
This is how I do it and it works every time, have set multiple computers up this same exact way.

Orphenochx - do I need to edit something in there?

Not trying to be an ass, but who knows what could happen on someone else's system. You say in the post that you need to install the SUN one, then install the OpenJDK one. Which ever one works for you the best, I'd just edit the steps to make sure you don't contradict yourself.

After "$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"" you need to run "sudo apt-get update" then install the package, else apt won't know the package is available since the source list was edited without a refresh.
 
  • Like
Reactions: Royalknight6190

Royalknight6190

Inactive Recognized Developer
Aug 22, 2009
1,772
1,069
Chandler
have you actually done this for the hercules? i dont think your instructions quite cover building for this device, especially since your pulling prop's for the wrong phone(as you have outlined in the op).

The ATT version and the T-Mobile Version are exact mirror images, that just pulls the proprietary files from the phone which are necessary for you to build a rom and Yes I just did it. It works. I was looking in the Cyanogen Source tree and there were three or four Galaxys2's. And I decided to go with the ATT version because I thought it was the closest. Non of them said T-Mobile or Hercules. I am not at my house or I would name the GalaxyS2's that are under the device/samsung/ folder. I will do it when I get home.
 

Royalknight6190

Inactive Recognized Developer
Aug 22, 2009
1,772
1,069
Chandler
Not trying to be an ass, but who knows what could happen on someone else's system. You say in the post that you need to install the SUN one, then install the OpenJDK one. Which ever one works for you the best, I'd just edit the steps to make sure you don't contradict yourself.

After "$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"" you need to run "sudo apt-get update" then install the package, else apt won't know the package is available since the source list was edited without a refresh.

Thanks, I forgot to add the $ sudo apt-get update, My fault. and I will add that about Java also, thanks man. I was just saying how I do it and what works best for me.
 
  • Like
Reactions: joemm

mikeyinid

Senior Member
Sep 4, 2010
8,871
4,001
Boise
The ATT version and the T-Mobile Version are exact mirror images, that just pulls the proprietary files from the phone which are necessary for you to build a rom and Yes I just did it. It works. I was looking in the Cyanogen Source tree and there were three or four Galaxys2's. And I decided to go with the ATT version because I thought it was the closest. Non of them said T-Mobile or Hercules. I am not at my house or I would name the GalaxyS2's that are under the device/samsung/ folder. I will do it when I get home.

I know what they are. I've been compiling cm7 for a while. I hope you understand what your telling people here. Good day sir.

Sent from my SGH-T989 using Tapatalk

---------- Post added at 02:30 PM ---------- Previous post was at 02:26 PM ----------

wait, i just thought about this a little. your telling me that you built using the att gs2 vendor platform and pulled props from your tmo gs2 and it worked? i call bs. youd have a brick if it even compiled. you should really do more research before posting brick tutorials.
 

Royalknight6190

Inactive Recognized Developer
Aug 22, 2009
1,772
1,069
Chandler
I know what they are. I've been compiling cm7 for a while. I hope you understand what your telling people here. Good day sir.

Sent from my SGH-T989 using Tapatalk

---------- Post added at 02:30 PM ---------- Previous post was at 02:26 PM ----------

wait, i just thought about this a little. your telling me that you built using the att gs2 vendor platform and pulled props from your tmo gs2 and it worked? i call bs. youd have a brick if it even compiled. you should really do more research before posting brick tutorials.


Ok so which one of the 4 would you use?
 

Romanbb

Inactive Recognized Developer
Sep 18, 2009
3,591
6,961
Seattle
aokp.co
If you want to have a working T-Mobile Galaxy S2 I advise you not to follow this guide.

Source for MSM_8660 devices (read: our phones) is not open source and you can not build it yourself. An official member of the CyanogenMod team can build it as they have access to these sources.

This guide may work for the AT&T Galaxy S2 (not the Skyrocket), but it will sure as hell not work for this phone.

Also, it looks like you just took the tutorial from the CM wiki and formatted it for the forums and mixed in some of the tutorial from s.android.com... what have you actually added to this?

Good day, sir.
 

Royalknight6190

Inactive Recognized Developer
Aug 22, 2009
1,772
1,069
Chandler
none. hercules is not supported in cm atm.

But it gets them to a good starting point. Then they can work on the Proprietary files.

If you want to have a working T-Mobile Galaxy S2 I advise you not to follow this guide.

Source for MSM_8660 devices (read: our phones) is not open source and you can not build it yourself. An official member of the CyanogenMod team can build it as they have access to these sources.

This guide may work for the AT&T Galaxy S2 (not the Skyrocket), but it will sure as hell not work for this phone.

Also, it looks like you just took the tutorial from the CM wiki and formatted it for the forums and mixed in some of the tutorial from s.android.com... what have you actually added to this?

Good day, sir.

I didnt pull anything from the CM wiki nor s.android.com I pulled it from Sparksco thread, which I stated, then I added the code for Samsung rules.d along with adding in how to get the proper java, because sparksco's way wasnt working for me. Right it will work for ATT, but it gives the user a good start on if they want to start building first for other phones and 2nd to try to build for our phone.

Why does everybody have an issue with people learning how to compile from source. Let them learn and do it themselves, the more people we get to learn to build Roms the better the thread will be. I have no idea why you are hating but if this is how this thread got its bad name then I know exactly why. All you can do with somebody either trying to help or looking for help is beat them down, instead of just helping them. I said in my OP that if things need to be edited then let me know. This hostility is uncalled for. Especially from a fellow Developer, that is no way a developer should act. Is that how your mother brought you up to act, I think not. Wow this thread was starting to look good again and turn around then the wolves come out to hate again. I guess nap time was over.
 

pyraxiate

Senior Member
Jun 24, 2007
2,255
800
Baltimore
Despite what people are saying in the thread , I appreciate the effort you made Royal. Although I'm not building cm7, I'm intending to experiment on gb and ics AOSP to learn on . This does help some :)

I also think people don't know that TeamDarkside has a working cm7 port released either ..... and that you are part of it :-\

1 more thing.... ATT skyrocket roms do actually work / boot on our T989 's

http://xdaforums.com/showthread.php?t=1360355

[MOD] Skyrocket ROMS on Hercules

Sent from my SGH-T989 using xda premium
 
Last edited:

mikeyinid

Senior Member
Sep 4, 2010
8,871
4,001
Boise
Despite what people are saying in the thread , I appreciate the effort you made Royal. Although I'm not building cm7, I'm intending to experiment on gb and ics AOSP to learn on . This does help some :)

I also think people don't know that TeamDarkside has a working cm7 port released either ..... and that you are part of it :-\

Sent from my SGH-T989 using xda premium

what you dont know is he didnt compile that cm7 build. its slayhers build.
 
  • Like
Reactions: XAviierG

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    If you want to have a working T-Mobile Galaxy S2 I advise you not to follow this guide.

    Source for MSM_8660 devices (read: our phones) is not open source and you can not build it yourself. An official member of the CyanogenMod team can build it as they have access to these sources.

    This guide may work for the AT&T Galaxy S2 (not the Skyrocket), but it will sure as hell not work for this phone.

    Also, it looks like you just took the tutorial from the CM wiki and formatted it for the forums and mixed in some of the tutorial from s.android.com... what have you actually added to this?

    Good day, sir.
    6
    *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:
    [COLOR="red"][B]$ sudo apt-get install python[/B][/COLOR]

    awk and gawk
    7zip
    RAR


    Code:
    [COLOR="red"][B]$ sudo apt-get install rar[/B][/COLOR]

    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:
    [COLOR="red"][B]$ sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
    
    $ sudo apt-get update
    
    $ sudo apt-get install openjdk-6-jdk[/B][/COLOR]

    then do

    Code:
    [COLOR="red"][B]$ 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[/B][/COLOR]

    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:
    [COLOR="Red"][B]$ sudo apt-get install git[/B][/COLOR]

    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:
    [COLOR="red"][B]$ sudo gedit 92-samsung.rules in /etc/udev/rules.d[/B][/COLOR]

    paste

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

    save and exit

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

    paste

    Code:
    [B]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"[/B]

    save and exit

    Code:
    [COLOR="red"][B]$ sudo gedit .bashrc[/B][/COLOR]

    paste at the top

    Code:
    [B]#AndroidDev PATH
    export PATH=${PATH}:~/androidsdk/tools
    export PATH=${PATH}:~/androidsdk/platform-tools[/B]

    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:
    [COLOR="red"][B]$ 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[/B][/COLOR]

    For 64-bit only systems:

    Code:
    [COLOR="red"][B]$ sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib[/B][/COLOR]


    4a - Create the Directories

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


    Code:
    [COLOR="red"][B]$ mkdir -p ~/bin
    
    $ mkdir -p ~/android/system[/B][/COLOR]

    4b - Install the Repository

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

    Code:
    [COLOR="red"][B]$ curl https://raw.github.com/android/tools_repo/master/repo > ~/bin/repo
    
    $ chmod a+x ~/bin/repo[/B][/COLOR]

    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:
    [COLOR="red"][B]$ 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[/B][/COLOR]

    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:
    [COLOR="red"][B]$ cd ~/android/system/device/samsung/(DEVICE NAME)
    
    ./extract-files.sh[/B][/COLOR]

    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:
    [COLOR="red"][B]$ ~/android/system/vendor/cyanogen/get-rommanager[/B][/COLOR]

    5a - Building CyanogenMod

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


    Code:
    [COLOR="red"][B]$ cd ~/android/system/
    
    $ repo sync
    
    $ cp build/core/root.mk -f Makefile[/B][/COLOR]

    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:
    [COLOR="red"][B]#Android
    
    export ARCH=arm
    
    export CCOMPILE=$CROSS_COMPILE
    
    export PATH=$PATH:~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin[/B][/COLOR]

    6 - Configure Build & Compile
    Now, the environment must be configured to build and the ROM
    compiled, from code, for the GalaxyS2.

    Code:
    [COLOR="red"][B]$ . build/envsetup.sh && brunch (DEVICE NAME)[/B][/COLOR]

    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.
    6
    The point is, you cannot build CM7 for the SGH-T989 through source.

    Call me a douchebag all you like, it still doesn't change the facts.

    Your intentions are good, but this guide is misleading. Sharing IS caring, but sources are closed for msm8660 devices and someone following this guide would potentially flash Exynos builds to their phone.

    Edit: Also calling me a douchebag is very warranted. My post was a little more hostile than intended
    5
    Unless TeamDouche open source their CM7/9 repos for this device, you can't have a complete build using this guide.

    The guide itself is nice and lowers the entry barriers for many noob developers and enthusiasts but again, you CANNOT build a working CM7 for this particular device.
    3
    _Thursday is a stand up person and a great dev XDA should be ashamed of themselvs. They are losing all there great devs for stupidity. He has been a great help to me by giving me advise and helping me with issues. He is not just a great Dev but a great person also. We have had great talks on Gtalk. He is proper and polite and that is what XDA needs but instead they ban the good polite devs and keep the arogant, cocky, and big headed devs. Bad move XDA. What happened to you XDA you used to be such a great site and now your turning into something that is being more like a dictatorship. _Thursday helped this forum out by bringing great roms to us and then he gets banned yes he was a person that was previously banned but that was a mistake also. His thread was proper and not bashing he kept it clean and nice and did not act out nor flame in it. XDA just loss one of there great devs. This phone loss a great dev we should all moran the loss of __THURSDAY AKA Master&Slave. I for one am thinking hard of bringing my roms to another site XDA is just not what it used to be to many cry baby arrogant bastards. Seems like junior high all over again.

    ...:†:...Dewizzed...:†:...