As the source tree is public now, you can easily build CM7 on your PC!
- Decent machine (dual-core CPU and at least 2GB of RAM)
- at least 10GB of free space
- Ubuntu 10.10
-- For 32&64bit systems:
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
-- For 64bit only:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
On Ubuntu 10.10, you need to add the partner repo:
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner" sudo apt-get update
The main multi-git checkout system of Google. Manages huge lists of repositories as one.
To install it:
- Open a superuser terminal (either from menu, or by typing "sudo bash" into a terminal
- Type "curl http://android.git.kernel.org/repo > /bin/repo" to acquire the latest repo launcher
- Type "chmod a+x /bin/repo" to give the launcher run capabilities
II. Acquiring the source code
To download the source code, you already got repo.
So now, we will open a new sudo terminal (see a bit back) and checkout the source to the root partition (somewhy when I've tried to check out to manually mounted partitions, it always failed).
To do so, enter these lines to the terminal (these will create a directory "cm7" in your home directory, e.g. /home/[username]/cm7):
mkdir cm7 cd cm7 repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
Now, we initialized the repo to this folder. And now, prepare some sandwiches and coffee to your PC, the download will take a loooooong time
repo sync -j16
(The j16 addon is needed to pre-initialize 16 projects, it is a bit faster and you know what will come)
There are at this time 216 packages, some of them small (mostly the applications) or huge (prebuilt binaries, device trees).
When the sync is done, you need to add the ZTE Blade device tree to the source. The device tree is maintained by Tom G (actually, he made it work, if you didn't know, all credits for the main releases goes to him and to anyone who contributed to the tree), if you accidentally talk with him, at least don't spare a simple "thanks"
So, to get the device tree...
git clone git://github.com/TomGiordano/android_device_zte_blade.git device/zte/blade
As soon as it's done, set it up
III. Setting up the device tree
For given copyright stuff, we can't include some libraries, binaries in the device tree directly, but they are needed for building. So, you will need them from a device. Best choice is installing the latest CM7 build of Tom, and using that as a source.
Now, to set up the device tree, you need your phone connected to your PC in debug mode (if you don't know what debug mode is, why are you here?? If you don't know how to enable debug mode over USB under Ubuntu, read here).
Let's get back to that sudo terminal!
cd device/zte/blade ./extract-files.sh
to the terminal, assuming that you're still in the CM7 root directory (/home/[username]/cm7/). This will grab all needed files from your phone.
With this, you finished setting up the tree.
III.a Getting RomManager
If you're building for the first time, you may need to grab the latest RomManager.
To do so, run this command from terminal:
IV. Building the source
Building is the final and easiest part.
In the sudo terminal, go back to CM7 root
And now let's collect all devices in the source!
source build/envsetup.shThis command will list all discovered devices.
Next step is, to select the build you want to make.
For this, type
in the terminal!
This will bring up a list with a lot of devices. We specifically need the ones beginning with zte_blade-*!
Usually I like to build the eng version (meaning engineer version), but you can of course try the userdebug one too!
To select the device, look at the name, and get the number of it (in my case, zte_blade-eng's number is 34). Then type that and press enter. It will set up the environment to build CM7 for the Blade.
After that, you only need to execute the following command:
make -j[n] bacon
Replace [n] with the number of your CPU's cores!
This will take some time, but after the first build, it will be a lot faster!
After the build, you can find the output at ~/cm7/out/target/product/blade/, called update.cm-XXXX-signed.zip. Put it on your SD card, and flash from Recovery.
If you want Google Apps, download the CM7 version from here.
Edited by fonix232, 08 February 2011 - 07:06 PM.