Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[TUT] Compile CM9 from source for the Xperia Play [UBUNTU]

OP KeiranFTW

21st March 2012, 12:50 AM   |  #1  
KeiranFTW's Avatar
OP Recognized Developer
Flag Sunderland
Thanks Meter: 2,728
 
2,639 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Just before we start, Google says:
Quote:

Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 90GB (or more) for a full set of builds.

Google also test compiling on Ubuntu 10.04 LTS, but I used 10.10, 32 bit. These instructions are for Ubuntu version 10.04-11.10

To install JDK6 (needed):
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
FOR 64bit: You will need the required packages, so open up your terminal and enter:
Code:
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 lib32readline5-dev lib32z-dev \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
  libxml2-utils xsltproc
On Ubuntu 10.10:
Code:
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
On Ubuntu 11.10:
Code:
sudo apt-get install libx11-dev:i386
FOR 32bit (what I used): You will need the required packages, so open up your terminal and enter:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
  libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
  libxml2-utils xsltproc
Now, onto downloading the source

First of all, you need to get the google repo tool, in a terminal:
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Then reboot the PC

Now, we will actually initialize the repository:
Code:
mkdir -p ~/android/ics/
cd ~/android/ics/
repo init -u git://github.com/CyanogenMod/android.git -b ics
Then enter your name and email address

Then:
Code:
repo sync -j8
if you have bad internet, use a smaller number than 8, eg. 4 or 2
Now, wait for the repo to sync (all 6GB of it )

Then after that is done, you need to setup vendor and device trees for our device

In the terminal again:
Code:
cd ~/android/ics/vendor/
git clone https://github.com/koush/proprietary_vendor_semc.git -b ics semc
Then:

Code:
cd ~/android/ics/device/
mkdir semc
cd semc
git clone https://github.com/CyanogenMod/android_device_semc_msm7x30-common.git -b ics msm7x30-common
git clone https://github.com/CyanogenMod/android_device_semc_zeus.git -b ics zeus
git clone https://github.com/CyanogenMod/android_device_semc_zeus-common.git -b ics zeus-common
to sync changes since last sync:
Code:
cd ~/android/ics/
repo sync
get CM props:
Code:
cd ~/android/ics/vendor/cm/
./get-prebuilts
then to build :

Setup environment:
Code:
cd ~/android/ics/
. build/envsetup.sh
then to get device list:
Code:
lunch
Now, select the number that is cm_zeus-userdebug

Now to finally build:

Code:
make -j4 bacon
again, you can use a higher value than 4 if you have more cores and more ram.

My specs:
Intel Core 2 Duo @ 1.8GHz
4GB RAM
VirginMedia 50Mbps broadband

My time:
Time to sync: 2hours+
Time to compile: 5+ hours, using -j16 which made my laptop VERY laggy

Enjoy, run into any issues, post here please
Last edited by KeiranFTW; 21st March 2012 at 08:19 PM.
The Following 19 Users Say Thank You to KeiranFTW For This Useful Post: [ View ]
21st March 2012, 12:51 AM   |  #2  
KeiranFTW's Avatar
OP Recognized Developer
Flag Sunderland
Thanks Meter: 2,728
 
2,639 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Troubleshooting:
Getting this: http://pastebin.com/Cy55wKZK ?
FIX:
In a file manager open up the directory: android/ics/frameworks/base/telephony/tests/ and delete the telephonytests folder
this is harmless
then recompile again
Last edited by KeiranFTW; 21st March 2012 at 09:43 PM.
The Following 6 Users Say Thank You to KeiranFTW For This Useful Post: [ View ]
21st March 2012, 12:51 AM   |  #3  
KeiranFTW's Avatar
OP Recognized Developer
Flag Sunderland
Thanks Meter: 2,728
 
2,639 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Reserved again

Sent from my Xperia Play using Tapatalk
The Following 2 Users Say Thank You to KeiranFTW For This Useful Post: [ View ]
21st March 2012, 12:55 AM   |  #4  
MilkyJoePD's Avatar
Senior Member
Thanks Meter: 173
 
939 posts
Join Date:Joined: Oct 2011
In case you forget what that thing you're working on was for?

Only joking, good luck and all that.
The Following User Says Thank You to MilkyJoePD For This Useful Post: [ View ]
21st March 2012, 01:03 AM   |  #5  
KeiranFTW's Avatar
OP Recognized Developer
Flag Sunderland
Thanks Meter: 2,728
 
2,639 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Quote:
Originally Posted by MilkyJoePD

In case you forget what that thing you're working on was for?

Only joking, good luck and all that.

Which thing? I happen to be working on a lot of things lol
But I was thinking, maybe I could provide something similar to CM Night lies, but obviously not every night?

Sent from my Xperia Play using Tapatalk
21st March 2012, 07:22 AM   |  #6  
IE-coRe's Avatar
Senior Member
Flag Güstrow
Thanks Meter: 180
 
1,307 posts
Join Date:Joined: Mar 2011
More
Keiran this is awesome =)

Sent from my R800i using xda premiu
The Following User Says Thank You to IE-coRe For This Useful Post: [ View ]
21st March 2012, 08:22 PM   |  #7  
KeiranFTW's Avatar
OP Recognized Developer
Flag Sunderland
Thanks Meter: 2,728
 
2,639 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Quote:
Originally Posted by IE-coRe

Keiran this is awesome =)

Sent from my R800i using xda premiu

Thanks, tutorial is now live
The Following User Says Thank You to KeiranFTW For This Useful Post: [ View ]
21st March 2012, 09:41 PM   |  #8  
CrimsonKnight13's Avatar
Senior Member
Flag Norfolk, VA, USA
Thanks Meter: 252
 
687 posts
Join Date:Joined: May 2009
More
Is there a way to implement chevyowner's CDMA changes into it for the zeusc build? Should I contact him to do so after the compile completes?
21st March 2012, 09:48 PM   |  #9  
KeiranFTW's Avatar
OP Recognized Developer
Flag Sunderland
Thanks Meter: 2,728
 
2,639 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Quote:
Originally Posted by CrimsonKnight13

Is there a way to implement chevyowner's CDMA changes into it for the zeusc build? Should I contact him to do so after the compile completes?

we don't have a zeusc vendor or device tree for ICS yet, but I can get one set up
What I need from chevyowner is a list of changes he made to get it working on CDMA

Keiran
21st March 2012, 11:24 PM   |  #10  
paxChristos's Avatar
Retired Forum Moderator
Flag Milwaukee
Thanks Meter: 1,506
 
2,036 posts
Join Date:Joined: Aug 2011
Donate to Me
More
Quote:
Originally Posted by KeiranFTW

we don't have a zeusc vendor or device tree for ICS yet, but I can get one set up
What I need from chevyowner is a list of changes he made to get it working on CDMA

Keiran

Want me to send you the libs and build.prop?

Sent from my R800x using Tapatalk

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes