[Motorola Photon 4G] jokersax11:
First of all this is not a hand holding thread. this is only for people serious about compiling. compiling is actually pretty easy, its debugging, adding features, porting, and cleaning up for mass use thats a little more difficult.

pre-setup

get linux, ubuntu is preferred and the most supported. you'll need around 25gb free or more. wubi works but make sure its big enough. The best setup is of course a real linux setup. personally i have a 100gb ext4 partition with ubuntu 11.10 and a second 100gb ext4 partition just for compiling.

im not going into how to get ubuntu running or any of that as you shouldnt try compiling if you are unable to install ubuntu using google. hint dual boot if you want to keep windows.

setup

most of what we will be doing will be done in the terminal. if you dont like the terminal or dont know how to use it. go away, seriously.

you need to find and install

Python 2.5 -- 2.7, which you can download from python.org.

next copy paste this into terminal

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo apt-get install git
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

ok now that you have the basics its time to make your life easier.

optional only if you have at least 10+gb free

Setting up ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.

Put the following in your .bashrc or equivalent.

export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.

export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.

prebuilt/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.

all right your all set up lets get some source

getting source

repo init -u git://github.com/CyanogenMod/android.git -b ics

repo sync

git clone git@github.com:photon-dev-team/sunfire.git -b ics device/moto/sunfire/

git clone git@github.com:photon-dev-team/proprietary_vendor_motorola.git -b ics vendor/moto/sunfire/

./vendor/cm/get-prebuilts

note you may have issues with syncing

alright on to building

building

several ways to build based on what you are doing

preferred is

. build/envsetup.sh && brunch sunfire

but

. build/envsetup.sh
breakfast sunfire
mka bacon

works too.

basically run . build/envsetup.sh first

then you pick what to build with lunch,brunch, or breakfast

then you make,mka, or make bacon.

dont forget to make clean or make clobber between builds.

ill edit later on down the road.