New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
KeiranFTW
Old
(Last edited by KeiranFTW; 21st March 2012 at 07:19 PM.)
#1  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2535
Posts: 2,586
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 U ST25i - AOKP ICS Milestone 6 - KXP Build 2
KeiranFTW - KangXperiaProject - Maintainer for kumquat

Asus Google Nexus 7 - CyanogenMod 10.1
The Following 17 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 2535
Posts: 2,586
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 U ST25i - AOKP ICS Milestone 6 - KXP Build 2
KeiranFTW - KangXperiaProject - Maintainer for kumquat

Asus Google Nexus 7 - CyanogenMod 10.1
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 2535
Posts: 2,586
Join Date: Nov 2011
Location: Sunderland

 
DONATE TO ME
Reserved again

Sent from my Xperia Play using Tapatalk
Sony Xperia U ST25i - AOKP ICS Milestone 6 - KXP Build 2
KeiranFTW - KangXperiaProject - Maintainer for kumquat

Asus Google Nexus 7 - CyanogenMod 10.1
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 140
Posts: 789
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 2535
Posts: 2,586
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 U ST25i - AOKP ICS Milestone 6 - KXP Build 2
KeiranFTW - KangXperiaProject - Maintainer for kumquat

Asus Google Nexus 7 - CyanogenMod 10.1
 
IE-coRe
Old
#6  
IE-coRe's Avatar
Senior Member
Thanks Meter 164
Posts: 1,203
Join Date: Mar 2011
Location: Güstrow
Keiran this is awesome =)

Sent from my R800i using xda premiu
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 2535
Posts: 2,586
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 U ST25i - AOKP ICS Milestone 6 - KXP Build 2
KeiranFTW - KangXperiaProject - Maintainer for kumquat

Asus Google Nexus 7 - CyanogenMod 10.1
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 226
Posts: 617
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 [Stock ICS v4.1.1 ~ Build 2.06.605.1 710RD]
» ASUS Transformer Pad TF300T 32GB + 64GB MicroSDXC [Rooted Stock JB v4.2.1 ~ Build JOP40D.US_epad-10.6.1.15.3-20130416]
» Raspberry Pi Model B Rev 2.0 + 64GB SDXC [Raspbian Wheezy + Hexxeh Next Branch FW]
 
KeiranFTW
Old
#9  
KeiranFTW's Avatar
Recognized Developer - OP
Thanks Meter 2535
Posts: 2,586
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 U ST25i - AOKP ICS Milestone 6 - KXP Build 2
KeiranFTW - KangXperiaProject - Maintainer for kumquat

Asus Google Nexus 7 - CyanogenMod 10.1
 
paxChristos
Old
#10  
paxChristos's Avatar
Retired Forum Moderator
Thanks Meter 1277
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

Link to My Mediafire Folder (R800x Goodies) | Link to common Xperia Play fixes
My Work: Roms for R800x that i've ported/tweaked | Team Gummy Rom | Codename Android | CM9 | In Progess: Jelly Bean (CM10 (Pre-Alpha) then AOSP) | Codename Android GSM