Compiling CM7 on Fedora
I decided to have another go at compiling CM7, this time using Fedora 13 on real hardware rather than an virtualised Ubuntu 10.10, which also means adb/udev is already working from when I rooted the ZTE Blades.
I downloaded and installed the Oracle/Sun JDK 6u24 (which includes the JRE).
Setting up “alternatives” to point to the Oracle JDK instead of OpenJDK/GCJ doesn’t work 100% as at least javadoc, appletviewer and javah have to be manually symlinked:
ln -s /usr/java/jdk1.6.0_24/bin/javadoc /usr/bin/javadoc
ln -s /usr/java/jdk1.6.0_24/bin/appletviewer /usr/bin/appletviewer
ln -s /usr/java/jdk1.6.0_24/bin/javah /usr/bin/javah
None of the below tutorials explained why “alternatives” doesn’t work:
- Installing JDK in Fedora 13
- Install Sun/Oracle Java JDK/JRE 6u24 on Fedora 14
- Personal Fedora 14 Installation Guide
Just for good measure I added the following to ~/.bashrc
export JAVA_HOME="/usr/java/jdk1.6.0_24"
After that the compile worked, except it got stuck at some point with a javadoc problem, a quick “make update-api && mka” fixed that.
The cyanogen wiki instructions are incomplete regarding making an AVD using your ROM. Also CM7 now uses the 2.3.3 v10 API, so the last stage should really be:
cd ~/android-sdk-linux_x86/platforms/
cp -R android-10/ android-10-cyanogen/
cp ~/cyanogenmod/out/target/product/generic/*.img android-10-cyanogen/images/
cd ~/.android/avd/
cp -R Gingerbread.avd/ cyanogenmod.avd/
cp Gingerbread.ini cyanogenmod.ini
Edit ~/.android/avd/cyanogenmod.ini to read:
target=android-10
path=~/.android/avd/cyanogenmod.avd
Edit ~/.android/avd/cyanogenmod.avd/config.ini to read:
hw.lcd.density=240
skin.name=WVGA800
skin.path=platforms/android-10-cyanogen/skins/WVGA800
vm.heapSize=24
hw.ramSize=256
image.sysdir.1=platforms/android-10-cyanogen/images/
Then you end up with: