Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,359 Members 41,774 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
KeiranFTW
Old
(Last edited by KeiranFTW; 21st March 2012 at 07:19 PM.)
#1  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2,727
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Default [TUT] Compile CM9 from source for the Xperia Play [UBUNTU]

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
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following 19 Users Say Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
KeiranFTW
Old
(Last edited by KeiranFTW; 21st March 2012 at 08:43 PM.)
#2  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2,727
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
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
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following 6 Users Say Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
KeiranFTW
Old
#3  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2,727
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Reserved again

Sent from my Xperia Play using Tapatalk
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following 2 Users Say Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
MilkyJoePD
Old
#4  
MilkyJoePD's Avatar
Senior Member
Thanks Meter 168
Posts: 911
Join Date: 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: [ Click to Expand ]
 
KeiranFTW
Old
#5  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2,727
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Quote:
Originally Posted by MilkyJoePD View Post
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
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
 
IE-coRe
Old
#6  
IE-coRe's Avatar
Senior Member
Thanks Meter 180
Posts: 1,298
Join Date: Mar 2011
Location: Güstrow
Keiran this is awesome =)

Sent from my R800i using xda premiu
Samsung M1 -> Motorola Defy->Xperia Play->Xperia Sola->HTC One!!

Running:
The Following User Says Thank You to IE-coRe For This Useful Post: [ Click to Expand ]
 
KeiranFTW
Old
#7  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2,727
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Quote:
Originally Posted by IE-coRe View Post
Keiran this is awesome =)

Sent from my R800i using xda premiu
Thanks, tutorial is now live
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
The Following User Says Thank You to KeiranFTW For This Useful Post: [ Click to Expand ]
 
CrimsonKnight13
Old
#8  
CrimsonKnight13's Avatar
Senior Member
Thanks Meter 252
Posts: 685
Join Date: May 2009
Location: Norfolk, VA, USA
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?

» HTC Droid DNA (dlx) [NuSenseSIX-MAX RC3.02 (4.4.2)]
» Samsung Galaxy S2 (SCH-R760 - Multimedia Player) [CM11 (4.4.4) - SPH-D710]
» Motorola Droid RAZR HD (vanquish) [CM11 (4.4.4)] - Wife's Phone
» Amazon Kindle Fire HD 7" (tate) [CM11 (4.4.4)] - Wife's Tablet
 
KeiranFTW
Old
#9  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2,727
Posts: 2,639
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Quote:
Originally Posted by CrimsonKnight13 View Post
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
Sony Xperia SP - C5303 O2

illumination app for Xperia SP
 
paxChristos
Old
#10  
paxChristos's Avatar
Retired Forum Moderator
Thanks Meter 1,487
Posts: 2,036
Join Date: Aug 2011
Location: Milwaukee

 
DONATE TO ME
Quote:
Originally Posted by KeiranFTW View Post
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
Tips:
*Logcat or it never happened. *Search before posting *Go to User CP -> Edit Options -> switch "Number of Posts to Show Per Page" to 50. *Reporting Posts

Looks like I won't be doing anything android for a long time

Thanks for the lul'z

Pax

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes