How to build a CM9 ROM from source
It was almost exactly this time last year that I got my first Android device. I had absolutely no development experience whatsoever, so if anybody told me that I'd make a Cyanogenmod 7 Gingerbread ROM for the Kindle Fire in 11 months from that time, I would've thought they were crazy.
Android is the easiest to build on Linux, primarily Ubuntu. This guide is designed around building on Ubuntu as well. The first thing you need to build from source is to actually get the source. For Cyanogenmod 9 (Ice Cream Sandwich) you'll have to pull from the Cyanogenmod repository. You'll also have to download a few packages for Linux like Java, and they will have to be put in a PATH folder. In the guide here
(which is meant to build CM7 for the Droid X) it's identical for the Kindle Fire. You can follow that guide up until you do this command "cd ~/android/system/" The next step of that guide would pull the CM7 repository, but we want CM9 (ICS). Instead of pulling Gingerbread, you'll want to pull ICS copy this:
repo init -u git://github.com/CyanogenMod/android.git -b ics
It may ask you for your name and email address. Once that's done, you can "repo sync -j16" and it will start downloading the source. This will take a very long time ~2 hours here, but once that's done, you can move on :)
Each device has its own device configuration and vendor files for building. Luckily for you, I've already setup the necessary stuff to get ICS to build for the Fire. You can download my source from my github here https://github.com/jackpotclavin
You'll have to download the ICS-Kindle-Fire-Device and ICS-Kindle-Fire-Vendor files and place them in specific spots. For the vendor files, they go into /android/system/vendor/amazon/otter
You'll have to make the amazon and otter folders, but the vendor files should go in them so any random file, say, otter-vendor.mk will be placed so it's like this
/android/system/vendor/amazon/otter/otter-vendor.mk, with the proprietary folder inside /amazon/otter/.
It's almost the same with the device files. Once you download those, you place them into the /android/system/device/amazon/otter/ folder that you'll have to make, so any random file, say, system.prop goes would be located at /android/system/device/amazon/otter/system.prop
Once that's all done, you can download the prebuilts. For this you'll have to navigate into /android/system/vendor/cm and execute the get-prebuilts file. This will download a few files needed for building that will halt the build process if they're missing. Once those are done, it's building time. In the terminal, navigate to your /android/system/ folder, and type the command:
. build/envsetup.sh && brunch otter
That should be it! If somebody gets stuck, reply in this thread and I'll tell them where to go, and I'll update the post to help out :) happy building