I am making the switch to Linux Mint for my build environment. I am creating this thread to help others that might need assistance during the setup process. I am just adding notes as I go along.
How to Setup the Environment and Build Eclipse
This is only for Linux Mint 14 64-bit! Make sure you install Mint 14 64-bit and all updates first! Now open a terminal and get going!
Install Sun Java JDK 6 (Google's instructions no longer work and I found this to be easier for new Linux users)
Installing Sun JDK 6
Download the sun jdk 6 bin (not the RPM) fromhttp://www.oracle.com/technetwork/ja...s-1859587.html.
Make the bin file executable:
Extract the bin file:
chmod +x jdk-6u37-linux-x64.bin
Move extracted folder to this location:
Install new java source in system:
sudo mv jdk1.6.0_37 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_37/bin/javac 1
Choose default java:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_37/bin/java 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_37/bin/javaws 1
sudo update-alternatives --config javac
java version test:
sudo update-alternatives --config java
sudo update-alternatives --config javaws
Verify the symlinks all point to the new java location:
ls -la /etc/alternatives/java*
Installing Required Packages
sudo apt-get update
sudo apt-get install git-core gnupg flex bison gperf dpkg-dev g++-4.7-multilib gcc-multilib build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 git linux-libc-dev pngcrush
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Option for quicker compiles when building for multiple devices
Set up ccache - Put the following at the end of .profile and .bashrc in your home directory
If you do not have a .bashrc file in your home directory create it now (please note the "." before bashrc
*Note for later: The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.
prebuilts/misc/linux-x86/ccache/ccache -M 50G
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Time to get the source!
For Android 4.2.2
repo init -u https://github.com/nitroglycerine33/android.git -b jb422
For Android 4.3
repo init -u https://github.com/nitroglycerine33/android.git -b jb43
Drink a few beers and come back in 60-180 minutes depending on your internet connection
Build the Source!
It will build for about 60-120 minutes. When complete just flash the Eclipse/Elemental zip in the target folder!
make clean (only required if you want to build fresh)
(select which eclipse device, example: eclipse_toro)
make eclipse -j* (or whatever your processor can handle such as j4)
* = number of threads your processor is. Using all available threads will leave the computer pretty useless but will build much faster. Standard dual core 2 duo would be j4, i5 would be j8, etc..
If you are building for a device that has a cm.dependencies file in its device tree make sure you delete the following file before performing a repo sync to get the latest code.
.repo -> local manifests -> delete roomservice.xml