Retired Recognized Developer
Thanks Meter 2,096
Join Date: Dec 2010
Location: Queen City of the West
[REF] Compiling CM6 for Milestone XT720
First, follow these instructions to get your system setup for build:
You'll need at least 15GB of disk space. Once you've got all the prerequisites installed:
repo init -u git://github.com/Mioze7Ae/android.git -b froyo
repo sync -j 2
make -j 2 bacon
If everything goes well, the update package will be something like out/target/product/sholest/update-cm-6.1.2-0.10-11.08.08-MilestoneXT720-signed.zip
This is my current understanding of the voodoo:
- repo init : sets up your repository and downloads a manifest file that identifies other repositories
- repo sync : downloads all the repositories and checks out a working copy
- . build/envsetup.sh : parses all the makefiles and such to create a menu of available devices to build
- lunch : configures the source tree to build a specific device (run lunch with no arguments to get a menu)
- get-rommanager : apparently needed for some reason
- make bacon : actually builds everything and creates the ota package. You may want to consider something like "make -j 8 bacon >build.out 2>build.err"
repo sync takes either metric or imperial eons (whichever is larger) (-j N can help by opening multiple concurrent downloads if you have a fast uplink). On a dual AMD Opteron 248 machine with 6GB build takes about 3 hours (Ubuntu 11.04 64-bit). On a dual Xeon E5410@2.33GHz (8 cores total) with 16GB RAM running debian lenny 64-bit, build takes ~15 min. You want to pick the -j to be 1-2 times the number of CPUs (I used -j 2 on the AMD and -j 8 on the Xeon). The android build system does a pretty good job at pegging your CPUs.
I don't currently know how to tag the state of the entire tree, so when nadlabak or milaq or anyone else updates repositories that I didn't fork, there's a chance it may break things from time-to-time. I'm currently waiting for a build from a fresh checkout to complete. Hopefully it's not broken...
Edit: Fresh compile succeeded, update applied and booted. Happy hacking!
Feel free to peruse my repositories at http://github.com/Mioze7Ae
See also: http://android.doshaska.net/cm6build
Thanks: nadlabak, milaq, stlifey, #milestone-modding