Build CM7 from source | Developer's area Getting the source and building it is actually fairly straight-forward. For this guide, I'm going to assume that you're using Ubuntu 10.10 or higher. I'm using 11.10, but I'm pretty sure most of this is still applicable to Maverick (10.10). Also, the steps following getting the build-deps on Ubuntu should be usable in any other Linux distro (Fedora, openSUSE, etc.). You'll just have to find the proper way to getting the environment set-up on that distro. I've adapted this guide from the Cyanogen wiki to fit specifically for the Motorola Triumph. Essentially, I've modified their repo manifest to add my Triumph repo as well. By using these instructions, you have the same thing that I've been working on in my Github: https://github.com/ikarosdev NOTE: I'd like this thread to stay on track. Remember, this is a guide about building Android. I'm assuming you know your way around Linux distributions. However, I do encourage any help on getting things working with CM7. Part I - Prepare your Build Environment Let's go ahead and prepare our comps for building. Go ahead and open up your terminal. You'll need to add a partner repository from Maverick in order to get sun-java6. I don't think openjdk is compatible. Code (Text): sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner" We've enabled the repo, but we need to update our package lists. Code (Text): sudo apt-get update Now, we'll need to install our build dependencies. There are build-deps only applicable to the 64-bit (x86_64) systems. However, both 32-bit and 64-bit share common build-deps. For 32-bit & 64-bit: Code (Text): 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 64-bit only: Code (Text): sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.4-multilib g++-4.4-multilib NOTE: According to the original guide gcc and g++ multilib is not necessary. However, I always install them anyways. Now, we can create directories for the build: Code (Text): mkdir -p ~/android/system && mkdir -p ~/bin Now, we need to download the program "repo" and make it executable: Code (Text): curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo Make it executable: Code (Text): chmod a+x ~/bin/repo NOTE: You'll need to logout for this to take effect. Now, we initialize the repository and grab the source: Code (Text): cd ~/android/system Code (Text): repo init -u [URL="git://github.com/CyanogenMod/android.git"]git://github.com/ikarosdev/android.git[/URL] -b gingerbread Code (Text): repo sync -j16 NOTE: Due to the large size, this make take several hours depending on your connection. Part II - Pull proprietary files from device Still with me? Alright, after staring at repo pulling all those files, guess what? You get to pull more files! However, this part only takes a few seconds. First, you'll need to get ADB set-up. Thankfully, the CM-wiki has a nice how-to on doing so. Follow these instructions and then come back: Howto: Install the Android SDK - CyanogenMod Wiki NOTE: You'll need to enable USB Debugging on the Triumph. You can achieve this by going to Settings --> Applications --> Development and lastly, enable "USB Debugging." Okay, let's navigate to our device directory and pull the files. Make sure the device is plugged into the comp. Code (Text): cd ~/android/system/device/motorola/triumph Code (Text): sh ./extract-files.sh NOTE: This is a work in progress. There are some files that still need to be pulled. However, at the moment, CM7 will still build "correctly" regardless. Part III - Configure and Build Now, we're getting to the fun part. First, we need to get ROM-Manager. CM7 will fail to build without it. Get back to the home folder: Code (Text): cd Now, run this: Code (Text): ~/android/system/vendor/cyanogen/get-rommanager Once that finishes, we can finally build CM7: Code (Text): cd ~/android/system Code (Text): repo sync -j16 NOTE: This makes sure that everything is up-to-date. While this is recommended, it is not required. However, sometimes there are changes to the source that will be missed if you do not do this. Code (Text): . build/envsetup.sh && brunch triumph This will take some time. Depending on how fast your comp is, this could take several hours. For me, on a dual-core system, it takes about an hour. After it is done, you'll find a zip generated in: Code (Text): ~/android/system/out/target/product/triumph/update.cm-XXXXX-signed.zip And that's all there is to it. Build ClockworkMod Recovery Now, that I've fixed my CWM port specifically for the Triumph, I'll show you guys how to build that as well. Make sure the build directory is clean: Code (Text): make clean && make clobber NOTE: make clean isn't technically necessary Now, we'll get the build prepped for building a recovery: Code (Text): . build/envsetup.sh && lunch cyanogen_triumph-eng And lastly, we'll build a recovery image: Code (Text): make -j4 recoveryimage That's it! You'll find a generated recovery.img file in: Code (Text): ~/android/system/out/target/product/triumph/recovery.img Follow the usual steps to get CWM on our phones.