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

Just before we start, Google says:
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.
Click to expand...
Click to collapse
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

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

Reserved again
Sent from my Xperia Play using Tapatalk

In case you forget what that thing you're working on was for?
Only joking, good luck and all that.

MilkyJoePD said:
In case you forget what that thing you're working on was for?
Only joking, good luck and all that.
Click to expand...
Click to collapse
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

Keiran this is awesome =)
Sent from my R800i using xda premiu

IE-coRe said:
Keiran this is awesome =)
Sent from my R800i using xda premiu
Click to expand...
Click to collapse
Thanks, tutorial is now live

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?

CrimsonKnight13 said:
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?
Click to expand...
Click to collapse
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

KeiranFTW said:
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
Click to expand...
Click to collapse
Want me to send you the libs and build.prop?
Sent from my R800x using Tapatalk

paxChristos said:
Want me to send you the libs and build.prop?
Sent from my R800x using Tapatalk
Click to expand...
Click to collapse
There was a change in libs too? I thought it was only a build.prop hack?
Can you send me libs? I only have build.prop changes, and have merged them
anyway: https://github.com/keiranFTW/android_device_semc_zeusc <-- tis CDMA zeusc device configuration for CM9
should work

KeiranFTW said:
There was a change in libs too? I thought it was only a build.prop hack?
Can you send me libs? I only have build.prop changes, and have merged them
Click to expand...
Click to collapse
Sent you a pm with the files,
Thanks for the make files (off to sync cm9 )
Sent from my R800x using Tapatalk

Hi keiran,
Have you managed to compile fxp113 for me yet?
Sorry to chase just need to know what I have to work with
Sent from my R800i using XDA

paxChristos said:
Sent you a pm with the files,
Thanks for the make files (off to sync cm9 )
Sent from my R800x using Tapatalk
Click to expand...
Click to collapse
Cheers, will get CM9 zeusc vendor tree set up then too
pricey2009 said:
Hi keiran,
Have you managed to compile fxp113 for me yet?
Sorry to chase just need to know what I have to work with
Sent from my R800i using XDA
Click to expand...
Click to collapse
Forgot about that, will get you a download link tomorrow night if I can?
Newest CM9 ICS change log:
Data works brilliantly, although I never get H, just 3G
New adreno libs are there, faster rendering and all.
Some launcher shizz I didn't read
New CM9 boot animation when I add it into the make files
Reboot option works, unless used by ROM Manager
I think that hw decoder will be fixed soon, because I seen something about it on CM code review, about qualcomm omx which fixes video. Not sure it is working though, but there are tons of devices all with the same problem, it will be fixed
Ty,
Keiran
Sent from my Xperia Play using Tapatalk

KeiranFTW said:
There was a change in libs too? I thought it was only a build.prop hack?
Can you send me libs? I only have build.prop changes, and have merged them
anyway: https://github.com/keiranFTW/android_device_semc_zeusc <-- tis CDMA zeusc device configuration for CM9
should work
Click to expand...
Click to collapse
Once you have the libs merged, I'll start compiling myself

Do you still have artifacts on certain menus and settings? Great tut btw gona update my Ubuntu partion.
sent from my xperia play running cm7

http://pastebin.com/UfSU5Wf6 that is as far as i can get it to go.

chevyowner said:
http://pastebin.com/UfSU5Wf6 that is as far as i can get it to go.
Click to expand...
Click to collapse
Ouch.
Have you tried Googling the error? Do you have the right version of Java set up?
Edit:
Do you have a vendor tree for zeusc? ~/android/ics/vendor/semc/zeusc? If not I can get one setup tonight.
Sent from my Xperia Play using Tapatalk

Hi i have following problem, did every step like in the tutorial but at
PHP:
mkdir -p ~/android/ics/
cd ~/android/ics/
repo init -u git://github.com/CyanogenMod/android.git -b ics
Terminal says: /home/christian/bin/repo: Line 1 : Syntaxerror unexpected word 'newline'
/home/christian/bin/repo: Line 1 : `<!DOCTYPE html>'
can someone help me?
---------- Post added at 09:31 AM ---------- Previous post was at 09:18 AM ----------
ok fixed the problem

Nice one KeiranFTW. Ran into some trouble install the JDK on 11.10. Had to install it from a ppa in the end. Details here.
Currently building. Shall see what happens

Related

[REF]HowTo build CM9 from source

Made the CM wiki a little easier to understand. Most is taken from here:
http://teamhacksung.org/wiki/index.php/CyanogenMod9:GT-I9100:How_to_build
First off you will need Ubuntu 64-bit for this to work (or one of the many ubuntu editions) I recommend the 11.10 version (will work on 10.x also), as it's the newest stable to date. 32-bit won't work. I'm using Xubuntu 64 bit, and it uses the same terminal codes of course.
Install ADB
Install the Android SDK.
NOTE: You do not need to setup the SDK with an ADV etc., just download and install to get the tools (e.g. adb).
Install the Build Packages
Open the terminal in ubuntu and paste the following code snippets:
To add sun-java to repo (works on various ubuntu versions):
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
To get the needed build packages:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04/11.10 64-bit, but should still build without issue. On 11.10 lib32readline5-dev is no longer available, but lib32readline-gplv2-dev is there instead. Just install it with "apt-get install lib32readline-gplv2-dev"
Create the Directories
You will need to set up some directories in your build environment.
To create them paste these in terminal:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following in terminal to download make executable the "repo" binary:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j16
Retrieve the galaxys2 repo
Code:
. build/envsetup.sh
brunch cm_galaxys2-userdebug
Copy proprietary files
NOTE: This only needs to be done the first time you build, but it's recommended to redo it when TeamHacksung makes some changes to these in their nightlies (which may occur quite often as of now)..
You will need to have a galaxys2 with the latest nightly of CM9 installed, and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and ensure that ADB is working properly.
Paste this into terminal:
Code:
cd ~/android/system/device/samsung/galaxys2/
./extract-files.sh
NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.
Get prebuilts
Code:
~/android/system/vendor/cm/get-prebuilts
Building CyanogenMod
First, check for updates in the source:
Paste into terminal:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the galaxys2.
Paste into terminal:
Code:
. build/envsetup.sh && brunch cm_galaxys2-userdebug
--------------------
End of tutorial
--------------------
Nice guide, just installed ubuntu on my VAIO to do this kind of stuff.
Thnx
On to setting stuff up...
You should consider getting the build script (build.sh) from teamhacksung's github (https://github.com/teamhacksung/buildscripts) and placing it in your android/system folder.
It allows you to use commands like ./build.sh [devicename] [kernel] to build the version of CM7 you want and optionally will compile your own kernel (if you also have the c1 and aries kernel source)
Other commands it supports:
./build.sh clean - to clear the output folders for a clean build
./build.sh prepare - to pull the latest version of Rom Manager
When I build for the SGS2 my sequence of events are always:
repo sync -j16
./build.sh clean
then either:
./build.sh galaxys2 kernel
if kernel code has changed, or
./build.sh galaxys2
if kernel code has not changed.
Click to expand...
Click to collapse
And after the mentioned build sequence posted above to finalize everything you run the command "build/envsetup.sh && brunch galaxys2" or is that obsolete now ?
HarryRag said:
And after the mentioned build sequence posted above to finalize everything you run the command "build/envsetup.sh && brunch galaxys2" or is that obsolete now ?
Click to expand...
Click to collapse
run all those in terminal... Remember the .
Sent from my GT-I9100 using XDA Premium App
HarryRag said:
And after the mentioned build sequence posted above to finalize everything you run the command "build/envsetup.sh && brunch galaxys2" or is that obsolete now ?
Click to expand...
Click to collapse
If you use the teamhacksung build.sh script then, yes, it is obsolete.
Novek said:
Remember the .
Click to expand...
Click to collapse
Yes, don't forget the period (.) at the start of the ./build.sh command or it won't run.
I was indeed revering to the build.sh from teamhacksung, thnx.
Got another question, is about: repo sync -j16
What does the -j16 stand for?
I'm aware of the . from ./ , just using linux for the first time to do this kind of stuff, using it a few years now for game/web server and playing some around with it.
Novek said:
First of, this is a re-written guide from the cyanogenmod wiki found here. All credit goes to them!
Click to expand...
Click to collapse
the link you gave is for sgs1.
change it with this: http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II:_Compile_CyanogenMod_(Linux)
HarryRag said:
Got another question, is about: repo sync -j16
What does the -j16 stand for?
Click to expand...
Click to collapse
To be honest, I don't know. I tried searching the man pages etc but could never find the answer. I use it because it is what is listed on the CM wiki. I have also seen people use -j40 or no setting. They all work.
NISIM2337 said:
the link you gave is for sgs1.
change it with this: http://wiki.cyanogenmod.com/wiki/Samsung_Galaxy_S_II:_Compile_CyanogenMod_(Linux)
Click to expand...
Click to collapse
Yes, the SGS2 wiki page was published today. It does not contain the teamhacksung buildscript details though as that is specific to teamhacksung.
Well just made to build my first Kang using ./build.sh galaxys2 kernel
Just for now i'm testing to see what the difference is with the other building options.
For doing the ADB install part i started with a Howtoforge page about setting up android app builds since it has a good and very detailed part on how to exactly do all the adb installing stuff etc. (which would stand for this part of the turorial *Install ADB*), very newby friendly
HarryRag said:
What does the -j16 stand for?
Click to expand...
Click to collapse
I think it's the number of the simultaneous connections that will be opened to the server.
Code:
echo "Example: ./build.sh galaxys2 (prebuilt kernel + android)"
echo "Example: ./build.sh galaxys2 kernel (kernel + android)"
As i understand the following from build.sh good. It means that with just the "./build.sh galaxys2" is for stock CM7 kernel as from the source/github after running the sync.
but is "./build.sh galaxys2 kernel (kernel + android)" then for an custom made kernel with tweaks or is this one just for when there is a (bigger) update for the CM7 kernel?
I think you should realse a rom based on cm.
Sent from my GT-I9100 using Tapatalk
Removed...
DvTonder said:
Yes, the SGS2 wiki page was published today. It does not contain the teamhacksung buildscript details though as that is specific to teamhacksung.
Click to expand...
Click to collapse
ok, sorry.
Don't remove anything, don't except defeat, everyone is equal here!
Sent from my Samsung Galactic iPhone Killing Machine S II
Novek said:
Removed due to public harrasment from the "pros"...
Click to expand...
Click to collapse
Wow, that is unexpected! And unfortunate! I was going to follow your extensive guide this evening, such a shame you took it away. I did not notice any harassment here, but i'm sorry you felt it. Hope maybe you and the "pros" can sort this out, because i think such a topic would be really valuable here!!!
mbroeders said:
Wow, that is unexpected! And unfortunate! I was going to follow your extensive guide this evening, such a shame you took it away. I did not notice any harassment here, but i'm sorry you felt it. Hope maybe you and the "pros" can sort this out, because i think such a topic would be really valuable here!!!
Click to expand...
Click to collapse
Agreed : this has great value
Sent from my GT-I9100 using XDA Premium App
Novek said:
Removed due to public harrasment from the "pros"...
Click to expand...
Click to collapse
Please, give us some names, we will know "pros" who don't like to share with others.
Some advanced devs just want to keep there secrets in order to make believe it's too hard for others ...
They would like us to re-invent everything when it exists already. Thats not my vision of linux freedom ...
Or please say us why they insult you ?
Sent from my GT-I9100 using XDA Premium App

[AS AT 04/08][AOSP/CM7/ICS/CM9][GUIDE]Wanna try compiling for Galaxy Ace?

Hello everyone yet again
Info: This also works for CM7 , just that the Cooper repo is already natively included in the files and folders , so you can skip step 2.5
I'm creating a new thread for all those people who know a little bit of code but don't know what to do to compile for Galaxy Ace (AOSP or CM7).
THANKS TO http://source.android.com and http://wiki.cyanogenmod.com
32-bit computers are not recommended to compile Gingerbread and above versions!
For now, I'll cover AOSP. (I'll show a CM7 guide once I learn how to compile it)
Alright, to compile Gingerbread AOSP you'll need a computer that has:
-At least an Intel Core i3 at 2.4Ghz or a similar AMD processor
-4GB RAM (my RAM speeds are at 1333Mhz). If lesser RAM, then swap is needed (for 2GB RAM use 15GB swap, that what I used before)
-40GB Partition for single compilation or 80GB for multiple versions (NOT including Ubuntu installation)
-Ubuntu 10.04 LTS OR Mac OSX 10.6 (other versions of Ubuntu, including 09.10 or lower or 10.10 or higher, may not work as well as 10.04)(Same thing goes for Snow Leopard, Lion has certain problems)
Here's how to compile for Gingerbread:
Step 1: Setting up the build environment.
Linux:
In general you will need:
-Python 2.4 - 2.7
-JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older.
-Git 1.7 or newer.
To install Sun JDK 6 do the following:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
You will also need to install certain packages:
For 64-bit computers:
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
For 32-bit computers (experimental):
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
(***NOTE: I've gotten errors when trying to apt-get install lib32ncurses5-dev.)
IF you're on Ubuntu 11.10 you might need to do this:
Code:
$ sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
Now for OSX (taken from http://source.android.com):
To build the Android files in a Mac OS environment, you need an Intel/x86 machine running MacOS 10.6 (Snow Leopard).
Android must be built on a case-sensitive file system because the sources contain files that differ only in case. We recommend that you build Android on a partition that has been formatted with the journaled file system HFS+. HFS+ is required to successfully build Mac OS applications such as the Android Emulator for OSX.
If you want to avoid partitioning/formatting your hard drive, you can use a case-sensitive disk image instead. To create the image, launch Disk Utility and select "New Image". A size of 25GB is the minimum to complete the build, larger numbers are more future-proof. Using sp**** images saves space while allowing to grow later as the need arises. Be sure to select "case sensitive, journaled" as the volume format.
You can also create it with this:
Code:
# hdiutil create -type SP**** -fs 'Case-sensitive Journaled HFS+' -size Xg ~/android.dmg
Where "X" is how big your image will be (in GB).
This will create a .dmg (or possibly a .dmg.sp****file) file which, once mounted, acts as a drive with the required formatting for Android development. For a disk image named "android.dmg" stored in your home directory, you can add the following to your ~/.bash_profile to mount the image when you execute "mountAndroid":
Code:
# mount the android file image
function mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }
Once mounted, you'll do all your work in the "android" volume. You can eject it (unmount it) just like you would with an external drive.
Installing required packages:
-Install XCode from the Apple developer site. We recommend version 3.1.4 or newer, i.e. gcc 4.2. Version 4.x could cause difficulties. If you are not already registered as an Apple developer, you will have to create an Apple ID in order to download.
-MacPorts from http://macports.org
Note: Make sure that /opt/local/bin appears in your path BEFORE /usr/bin. If not, add:
Code:
export PATH=/opt/local/bin:$PATH
to your ~/.bash_profile.
-Get make, git, and GPG packages from MacPorts:
Code:
$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg
If you're on MacOS 10.4, install bison too:
Code:
$ POSIXLY_CORRECT=1 sudo port install bison
Bugs and fixes:
-Reverting from gmake3.82:
There is a bug in gmake 3.82 that prevents android from building. You can install version 3.81 using MacPorts by taking the following steps:
-Edit /opt/local/etc/macports/sources.conf and add a line that says:
Code:
file:///Users/Shared/dports
above the rsync line. Then make this directory:
Code:
$ mkdir /Users/Shared/dports
-In the new dports directory, run:
Code:
$ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/
-Create a port index for your new local repository:
Code:
$ portindex /Users/Shared/dports
-Finally, install the old version of gmake with:
Code:
$ sudo port install gmake @3.81
-Setting a file descriptor limit:
On MacOS the default limit on the number of simultaneous file descriptors open is too low and a highly parallel build process may exceed this limit.
To increase the cap, add the following lines to your ~/.bash_profile:
Code:
# set the number of open files to be 1024
ulimit -S -n 1024
Your Linux/MacOS build environment is now complete, moving on to downloading....
Step 2: Downloading the source
You'll need to use repo to download sources from repositories.
Here's how I did it:
-Make a /bin directory in your home directory and it must be in your PATH:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
-Download the Repo script and ensure that it can be executed:
Code:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Now that downloading repo is done and executable, we need to initialise it.
Create an empty directory for where all your Android files will be downloaded, stored and made:
Code:
$ mkdir WORKING_DIRECTORY
$ cd WORKING_DIRECTORY
Where WORKING_DIRECTORY can be any name you want (as long as it has no spaces)
Use repo init to grab the latest branch (or rather, the gingerbread branch)
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-x.x.x_r1
Where "x" can be 2.3, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6 or 2.3.7.
For now use the versions that the Galaxy Ace currently has (2.3.3-2.3.5 and 2.3.7)
Optional step:
When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
Click to expand...
Click to collapse
Once you're done with that, you'll need to download them.
This simple 8-character command is easy to execute but it'll be hard on your internet connection:
Code:
$ repo sync
Ensure that you have at least 5Mbps of internet if you want it completed in a day.
Once you're done syncing, use this code:
Code:
$ gpg --import
To sign what you've downloaded.
Once you entered that, copy and paste this long line of ****:
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
Paste it into your terminal and press Ctrl+D.
You now have a complete local copy of the Android codebase.
Step 2.5: Include the Samsung COOPER source for compilation (AOSP only)
Yes, this has to be done so you can compile for cooper (Samsung Galaxy Ace).
-Navigate the terminal to the ~/WORKING_DIRECTORY/device/samsung folder:
Code:
$ cd ~/WORKING_DIRECTORY/device/samsung
Where WORKING_DIRECTORY = your android folder
-Make use of git to clone a folder from PabloPL's GitHub:
Code:
$ git clone git://github.com/PabloPL/android_device_samsung_cooper
Once it's done, you should see a folder with that name in the root of your working directory. Rename it to "cooper" and cut & paste it to device/samsung.
Download the Android SDK Tools and make sure you set ADB correctly to be in your PATH.
For more info and how-to steps go here: http://www.lineardroid.co.uk/2010/04/how-to-set-up-adb-in-ubuntu/
Once you're done setting up ADB, go to the cooper folder and run extract-files.sh in the terminal.
ADB should pull some files from your device and automatically close the terminal. (You might need to be in CM7 for ADB to successfully pull all libs, I may be wrong though. Someone test it and tell me if it works)
Now we're done for now.
Oh yes, before I forget:
Have a copy of CM7 before you build!
AOSP does not fully support ARMv6 devices and therefore uneeded errors may arise, so the CM7 files can save you.
Step 3: Building Android (most exciting/boring part)
Initialize the environment with the envsetup.sh script.
Code:
$ . build/envsetup.sh
Choose your target to build with lunch.
Code:
$ lunch cooper-eng
(***NOTE: Change full_base.mk in device_cooper.mk to full.mk) (AOSP only)
(***NOTE2: There'll be another error about an unknown architecture: ARMv6-VFP. That's where your CM7 files come in handy.) (AOSP only)
Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.
I usually use this (thanks to cdesai):
Code:
$ make -j8 update-api
$ make -j8 otapackage
OR:
Code:
$ make -j16 update-api
$ make -j16 otapackage
Do have patience because your computer will get inevitably laggy.
Once you're done debugging all errors and stuff you will have a flashable .zip located in WORKING_DIRECTORY/out/target/cooper.
Thanks for reading this whole chunk, though I know it's an XDA App eyesore.
If you do encounter errors feel free to ask here
Alright, now you've built AOSP and CM7 and you love it, what next?
Ice Cream Sandwich *insert holy choir here*
Requirements (they are much more different now):
A computer that's capable of 64-bit
A dual-core processor of a speed of at least 2.2Ghz (Intel Xeon/Core i7 recommended)
Either Ubuntu 10.04 LTS 64-bit (later versions have experimental support) but if you're using a later version that's fine.
Or Mac OSX 10.6
At least 8GB of RAM and 10~GB swap maybe? (Otherwise you could have 4Gb of RAM and ~20GB swap this time)
At least a 70GB partition for Ubuntu (to make sure there is space for compiling + installing required stuff)
Well, here are the steps to build it:
Instructions (Taken from http://source.android.com/source/initializing.html & http://wiki.cyanogenmod.com/wiki/Android_SDK_Emulator:_Compile_CyanogenMod_(Linux)):
---------ONLY FOR UBUNTU 10.10--12.04---------
Chapter 1: Initializing a Build Environment
This section describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine. To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.
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.
Section 1 (Linux/Ubuntu): Setting up a Linux build environment
The Android build is routinely tested in house on recent versions of Ubuntu LTS (10.04), but most distributions should have the required build tools available. Reports of successes or failures on other distributions are welcome.
Note: It is also possible to build Android in a virtual machine. If you are running Linux in a virtual machine, you will need at least 16GB of RAM/swap and 30GB or more of disk space in order to build the Android tree.
In general you will need:
Python 2.5 -- 2.7.
GNU Make 3.81 -- 3.82.
JDK 6 if you wish to build Gingerbread or newer; JDK 5 for Froyo or older.
Git 1.7 or newer.
Detailed instructions for Ubuntu 10.04+ follow.
Step 1: Installing the JDK
The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.
To download Java 6, do this:
Code:
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk
Note: The lunch command in the build step will ensure that the Sun JDK is used instead of any previously installed JDK.
Alternatively you can follow eoghan2t7's instructions:
eoghan2t7 said:
as you may no the Java JDK has been removed from the ubuntu ppa so i have uploaded the jdk deb file for users to use and to skip the sudo apt-get install java_jdk command
link
http://www.mediafire.com/?b57gqo7t46k1ibc
Click to expand...
Click to collapse
Or bs828's instructions:
bs828 said:
I'm currently out will do later
Edit: im on 12.0.4 and this seemed to work http://www.devsniper.com/ubuntu-12-04-install-sun-jdk-6-7/
Click to expand...
Click to collapse
Step 2: Installing required packages (Ubuntu 10.04 -- 11.10)
You will need a 64-bit version of Ubuntu. Ubuntu 10.04 is recommended. Building using a newer version of Ubuntu is currently only experimentally supported and is not guaranteed to work on Git branches other than master (http://github.com/android).
To install the required packages, do this:
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
---------ONLY FOR UBUNTU 10.10--11.10---------
For Ubuntu 10.10 users, do this as well:
Code:
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
Note: This is used to avoid a compile error with libGL later on.
For Ubuntu 11.10 users, do this:
Code:
$ sudo apt-get install libx11-dev:i386
---------END FOR UBUNTU 10.10--11.10---------
----------ONLY FOR UBUNTU 12.04----------
Step 2: Installing required packages (Ubuntu 12.04)
Building on Ubuntu 12.04 is currently only experimentally supported and is not guaranteed to work on branches other than master.
To install the required packages, do this:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 \
g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown \
libxml2-utils xsltproc zlib1g-dev:i386
---------END FOR UBUNTU 10.10--12.04---------
I won't do MacOSX for ICS, mainly because it has a very unstable success chance of compilation.
Your build environment is good to go! Proceed to
Chapter 2: Downloading the Source Tree
Section 1: Repo
Repo is a tool that makes it easier to work with Git in the context of Android.
It is also a tool that allows you to download source files from Android easily.
Step 1: Installing Repo
To install, initialize, and configure Repo, follow these steps:
Make sure you have a bin/ directory in your home directory, and that it is included in your path:
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
Download the Repo script and ensure it is executable:
Code:
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
For version 1.15, the SHA-1 checksum for repo is 8eb56d98b36d615c3efec51868e87bebe757feb1
For version 1.16, the SHA-1 checksum for repo is f3bfa7fd2d0a44aa40579bb0242cc20df37b5e17
Step 2: Initializing a Repo client
After installing Repo, set up your client to access the android source repository:
Create an empty directory to hold your working files. If you're using MacOS, this has to be on a case-sensitive filesystem. Give it any name you like:
Code:
$ mkdir I_HATE_STEVE
$ cd I_HATE_STEVE
Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest, which specifies where the various repositories included in the Android source will be placed within your working directory.
For AOSP:
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r1
or
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r2
or
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.1_r3
or even
Code:
$ repo init -u https://android.googlesource.com/platform/manifest -b ics-plus-aosp
For CM9:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b ics
When prompted, please configure Repo with your real name and email address. To use the Gerrit code-review tool, you will need an email address that is connected with a registered Google account. Make sure this is a live address at which you can receive messages. The name that you provide here will show up in attributions for your code submissions.
A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest will be kept.
Step 3: Getting the files
To pull down files to your working directory from the repositories as specified in the default manifest, run
Code:
$ repo sync
The Android source files will be located in your working directory under their project names. The initial sync operation will take an hour or more to complete, depending on your Internet bandwidth.
Note: If you initialize your repo on your root area for all projects, the time for downloading will decrease
If you haven't set up ccache now, now is a good time to set it up.
Chapter 2.5 (AOSP only): Downloading the various device specific configurations from GitHub
Now that you have a full copy of AOSP, you will realise that inside your working directory/device you will only see only a few device configurations. That's because AOSP only supports those devices and you will need to manually download other devices for use with AOSP.
You can either adapt from MaclawStudios' repo of the Galaxy Gio: https://github.com/MaclawStudios/android_device_samsung_gio
Or make an ICS device config yourself.
Meanwhile PabloPL has made an ICS branch here, but currently nothing is being worked on, as it seems.
Chapter 3: Building the System
The basic sequence of build commands is as follows:
Step 1: Initialize
Initialize the environment with the envsetup.sh script. Note that replacing "source" with a single dot saves a few characters, and the short form is more commonly used in documentation.
Either:
Code:
$ source build/envsetup.sh
or
Code:
$ . build/envsetup.sh
Step 2: Choose a target
Choose which target to build with lunch. The exact configuration can be passed as an argument, e.g.
Code:
$ lunch full-eng
The example above refers to a complete build for the emulator, with all debugging enabled.
If run with no arguments lunch will prompt you to choose a target from the menu.
Step 3: Build the Code
Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j32.
If you are using a dual-core computer do either of these:
Code:
make -j2
or
Code:
make -j4
It is usually recommended that you make the -jN amount twice the number of cores your processor has.
Therefore if you have a quad-core processor do this:
Code:
make -j4
or
Code:
make -j8
There are different ways to run make:
Code:
$ make clean
or
Code:
$ make clobber
Cleans the compile directory and deletes all compiled files.
Code:
$ make update-api
Makes part of the framework, usually used to update the API.
Code:
make otapackage
Makes a flashable .zip file, as otapackage = Over The Air package.
Code:
make (app name, like framework-res)
Makes the specified app and the .apk will be compiled in the output directory.
Once you finish make, you are done! Congratulations!
Chapter 4: Troubleshooting Common Build Errors
Sometimes, things don't go as planned such as unexpected build errors. Here are some solutions to common problems:
Section 1: Wrong Java Version
If you are attempting to build froyo or earlier with Java 1.6, or gingerbread or later with Java 1.5, make will abort with a message such as
Code:
************************************************************
You are attempting to build with the incorrect version
of java.
Your version is: WRONG_VERSION.
The correct version is: RIGHT_VERSION.
Please follow the machine setup instructions at
https://source.android.com/source/download.html
************************************************************
This may be caused by:
failing to install the correct JDK as specified on the Initializing chapter. Building Android requires Sun JDK 5 or 6 depending on which release you are building.
another JDK that you previously installed appearing in your path. You can remove the offending JDK from your path with:
Code:
$ export PATH=${PATH/\/path\/to\/jdk\/dir:/}
Section 2: Python Version 3
Repo is built on particular functionality from Python 2.x and is unfortunately incompatible with Python 3. In order to use repo, please install Python 2.x:
Code:
$ apt-get install python
Optional Step: Setting up ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
Code:
$ export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
Code:
$ export CCACHE_DIR=
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code, if you use CCache.
Code:
$ prebuilt/linux-x86/ccache/ccache -M 50G
Optional Step: Using a separate output directory
By default, the output of each build is stored in the out/ subdirectory of the matching source tree.
On some machines with multiple storage devices, builds are faster when storing the source files and the output on separate volumes. For additional performance, the output can be stored on a filesystem optimized for speed instead of crash robustness, since all files can be re-generated in case of filesystem corruption.
To set this up, export the OUT_DIR_COMMON_BASE variable to point to the location where your output directories will be stored.
Code:
export OUT_DIR_COMMON_BASE=
The output directory for each separate source tree will be named after the directory holding the source tree.
For instance, if you have source trees as /source/master1 and /source/master2 and OUT_DIR_COMMON_BASE is set to /output, the output directories will be /output/master1 and /output/master2.
It's important in that case to not have multiple source trees stored in directories that have the same name, as those would end up sharing an output directory, with unpredictable results.
This is only supported on branches newer than 4.0.x (IceCreamSandwich).
Wow dude. That's all I can say.
Woohoo, read through all that but I wont wanna try, and my comp is a piece of ****
Sent from my Galaxy Ace running J.A.F CM 7.2 Odexed using XDA App
MrChaosDesire said:
Woohoo, read through all that but I wont wanna try, and my comp is a piece of ****
Sent from my Galaxy Ace running J.A.F CM 7.2 Odexed using XDA App
Click to expand...
Click to collapse
Those are the recommended specs , not minimum
Wow nice tutorial Matt.but I can do nothing bcz i don't Know how to do coding lol...........
Sent from my GT-S5830 using xda premium
Lot of things to install, thanks for the tuto!
You never fail to impress buddy
Sent from my HTC Sensation XL with Beats Audio X315e using Tapatalk
traduz said:
Lot of things to install, thanks for the tuto!
Click to expand...
Click to collapse
Any errors occured ? Just post them in the thread .
Any solutions for unsolved errors ? Post them here too . Will update solutions
Sent from my GT-S5830 using XDA App
nice tut's bro..
Well i'm reading this day by day, just w8ing for money for a new computer lol, got one with 1gb only and freezes a lot with it =/
Thanks man, its gonna be my little anti-social project for tomorrow
Sent from my GT-S5830 using xda premium
Nice tut,Matt
thanks....everything clear from your tutorial......
one question : how much downloading will be done for AOSP and CM7 both....if i want to work on gingerbread
rocking.nitesh007 said:
thanks....everything clear from your tutorial......
one question : how much downloading will be done for AOSP and CM7 both....if i want to work on gingerbread
Click to expand...
Click to collapse
I think at least 50GB
thanx ...... will download it ill tke days .....
Sent from my GT-S5830 using XDA App
i have installed ubuntu 11 64bit in vmware .... does it affect when the rom ill be compling.....i use 3.2gb of 4gb ram in my virtual machine
Sent from my GT-S5830 using XDA App
rocking.nitesh007 said:
i have installed ubuntu 11 64bit in vmware .... does it affect when the rom ill be compling.....i use 3.2gb of 4gb ram in my virtual machine
Sent from my GT-S5830 using XDA App
Click to expand...
Click to collapse
If you're compiling gingerbread , there's no problem .
Sent from my GT-S5830 using XDA App
EmoBoiix3 said:
If you're compiling gingerbread , there's no problem .
Sent from my GT-S5830 using XDA App
Click to expand...
Click to collapse
thanks..... waiting for cm7 tut also ..... u guys rock
Sent from my GT-S5830 using XDA App
one more question .... what about 50GB .... i means i have read in different places somebody says its arnd 2GB of source of cm .. if u can specify dat would be great....
Sent from my GT-S5830 using XDA App

[Guide] Quick start compiling guides-cm9-kernels

First of all this is not a hand holding thread. this is only for people serious about compiling. compiling is actually pretty easy, its debugging, adding features, porting, and cleaning up for mass use thats a little more difficult.
pre-setup
get linux, ubuntu is preferred and the most supported. you'll need around 25gb free or more. wubi works but make sure its big enough. The best setup is of course a real linux setup. personally i have a 100gb ext4 partition with ubuntu 11.10 and a second 100gb ext4 partition just for compiling.
im not going into how to get ubuntu running or any of that as you shouldnt try compiling if you are unable to install ubuntu using google. hint dual boot if you want to keep windows.
setup
most of what we will be doing will be done in the terminal. if you dont like the terminal or dont know how to use it. go away, seriously.
you need to find and install
Python 2.5 -- 2.7, which you can download from python.org.
next copy paste this into terminal
Code:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jdk
sudo apt-get install git
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 lib32readline-gplv2-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils xsltproc
sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so
ok now that you have the basics its time to make your life easier.
optional only if you have at least 10+gb free
Code:
Setting up ccache
You can optionally tell the build to use the ccache compilation tool. Ccache acts as a compiler cache that can be used to speed-up rebuilds. This works very well if you do "make clean" often, or if you frequently switch between different build products.
Put the following in your .bashrc or equivalent.
export USE_CCACHE=1
By default the cache will be stored in ~/.ccache. If your home directory is on NFS or some other non-local filesystem, you will want to specify the directory in your .bashrc as well.
export CCACHE_DIR=<path-to-your-cache-directory>
The suggested cache size is 50-100GB. You will need to run the following command once you have downloaded the source code.
prebuilt/linux-x86/ccache/ccache -M 50G
This setting is stored in the CCACHE_DIR and is persistent.
all right your all set up lets get some source
getting source
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
git clone [email protected]hoton-dev-team/sunfire.git -b ics device/moto/sunfire/
git clone [email protected]hoton-dev-team/proprietary_vendor_motorola.git -b ics vendor/moto/sunfire/
./vendor/cm/get-prebuilts
note you may have issues with syncing
alright on to building
building
several ways to build based on what you are doing
preferred is
Code:
. build/envsetup.sh && brunch sunfire
but
Code:
. build/envsetup.sh
breakfast sunfire
mka bacon
works too.
basically run . build/envsetup.sh first
then you pick what to build with lunch,brunch, or breakfast
then you make,mka, or make bacon.
dont forget to make clean or make clobber between builds.
ill edit later on down the road.
Making kernels
pre-setup
Okay first of all you need to complete the above tutorial up to the getting source. so you wont have to do the building portion.
*Can you build kernels without android source, simple answer is yes, complicated answer is no. With the android source installed you have access to the proper tools. While personally i dont compile kernels with the older cross compilers of android, however this can be problematic and can lead to issues compiling. The dhd.ko is a great example. I have rebased hours of work to get dhd.ko to compile. To save everyone else my headache im going to show everyone the official way to compile kernels, not the cutting edge unsupported stuff that i do. *
setup
in terminal
cd "to your cyanogenmod source folder" we will use cyanogenmod for the tutorial
Code:
mkdir kernel
mkdir kernel/tegra
mkdir kernel/tegra-temp
mkdir kernel/compiled
mkdir kernel/compiled/modules
mkdir vendor/authentec
mkdir vendor/authentec/safenet
mkdir vendor/bcm
mkdir vendor/bcm/wlan
mkdir vendor/bcm/wlan/osrc
now hit this website and download
vendor-bcm-wlan-osrc.tgz
vendor-authentec-safenet.tgz
kernel-tegra.tgz
if you notice the file name, that is where it must be extracted.
now that you have the source, lets go on
compile
Code:
export PLATFORM_DIR="path to your cyanogenmod/android source"
export KERNEL_BUILD_OUT=$PLATFORM_DIR/kernel/tegra-temp
export ARCH=arm
export CROSS_COMPILE=$PLATFORM_DIR/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
export KERNEL_SRC=$PLATFORM_DIR/kernel/tegra
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT KBUILD_DEFCONFIG=tegra_sunfire_android_defconfig defconfig modules_prepare
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT DEPMOD=out/host/linux-x86/bin/depmod INSTALL_MOD_PATH=$KERNEL_BUILD_OUT modules
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT DEPMOD=out/host/linux-x86/bin/depmod INSTALL_MOD_PATH=$KERNEL_BUILD_OUT modules_install
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT zImage
make -j1 -C $KERNEL_SRC O=$KERNEL_BUILD_OUT DEPMOD=out/host/linux-x86/bin/depmod INSTALL_MOD_PATH=$KERNEL_BUILD_OUT M=$PLATFORM_DIR/vendor/authentec/safenet/vpndriver modules
export LINUXSRCDIR=$KERNEL_SRC
export LINUXBUILDDIR=$PLATFORM_DIR/kernel/tegra-temp
make -C $PLATFORM_DIR/vendor/bcm/wlan/osrc/open-src/src/dhd/linux
cp kernel/tegra-temp/arch/arm/boot/zImage kernel/compiled
cp vendor/authentec/safenet/vpndriver/vpnclient.ko kernel/compiled/modules
cp vendor/bcm/wlan/osrc/open-src/src/dhd/linux/dhd.ko kernel/compiled/modules
now this will give you your modules and the zimage. to make a boot.img use android-utility to extract an existing boot.img. then replace the zimage and build the boot.img.
third post
Thanks
Thank you joker just what i needed to start and play around and get to learning,testing is all fine but creating is the real key.Thank you very much and all fellow devs for all your time and help means alot to some of us.Have a good weekend!
Thanks joker
Sent from my MB855 using xda premium
thanks... already got a dual boot....just..need..a..bigger..hdd. uggg Thanks again for all you do on here.
second post on how to compile a kernel? ;P
You forgot to add that getting everything right with the vendor and device tree is also one of the hardest parts...
mrinehart93 said:
You forgot to add that getting everything right with the vendor and device tree is also one of the hardest parts...
Click to expand...
Click to collapse
amen to that
Sent from my MB855 using Tapatalk
Will do, eventually
shabbypenguin said:
second post on how to compile a kernel? ;P
Click to expand...
Click to collapse
Sent from my MB855 using XDA App
Thanks. That helps a lot. Was already working on a setup.
Sent from my MB855 using Tapatalk
No the hardest part is when you fix something and it breaks something else, so you fix it, then something unrelated breaks, finally you get it semi fixed and run a make clobber and it fails again. So you have to revert and start over.
mrinehart93 said:
You forgot to add that getting everything right with the vendor and device tree is also one of the hardest parts...
Click to expand...
Click to collapse
Sent from my MB855 using XDA App
jokersax11 said:
No the hardest part is when you fix something and it breaks something else...
Click to expand...
Click to collapse
Haha! Sounds like my truck!
I'm downloading 198-7 kernel now I'll make a guide to building soon.
Sent from my MB855 using XDA App
ok kernel guide in place.
May be an oddball question, maybe not.
I've read the thread, have 100+ TB of hdd space and am d/l-ing what I need to get setup for a dual boot system.
Would I be able to attempt to port features of other kernels into a cm9 or other kernel. (I do have a particular mod in mind is why I ask)
I'm a MoPho-er
possible, depending on the mod, source and your skill.
FernBch said:
May be an oddball question, maybe not.
I've read the thread, have 100+ TB of hdd space and am d/l-ing what I need to get setup for a dual boot system.
Would I be able to attempt to port features of other kernels into a cm9 or other kernel. (I do have a particular mod in mind is why I ask)
I'm a MoPho-er
Click to expand...
Click to collapse
Sent from my MB855 using XDA App
jokersax11 said:
possible, depending on the mod, source and your skill.
Sent from my MB855 using XDA App
Click to expand...
Click to collapse
Mod is slide2wake, looking for source (unless I'm being dense the links I find are not source downloads), and for skills, well lets say, I usually catch on quick and can figure most things out easily. A few years back I dabbled with the command line stuff. It wasn't hard, didn't do too bad, but it's been a while.
Most times I can find the answers to my questions and can figure things out just fine, so I won't post up asking unless I'm totally stumped.
I'm a MoPho-er
i forgot all about that mod... did he ever post source for it?
Some great info I need to look into this more later love messing around with stuff like this
Sent from my MB855 using xda premium

Does anyone have a computer powerful enough to compile 4.2 from source?

I'm working on getting ParanoidAndroid 4.2 working, but it needs some stuff from 4.2 that can only be compiled from source to boot. Does anyone have a PC powerful enough for a community effort for (at least a booting) 4.2 build?
It can be AOSP or CM10.1 (PA sources for 2.99 aren't available yet)
Specs that would be useful:
At least 8Gb of RAM
At least Quad core
Running some sort of Linux build
Later on this year I will probably get a PC powerful enough to build from source, so until then I need some help from other users.
Thanks
My laptop has 8gb ram, quadcore 1.5ghz AMD processor and backbox(based on Ubuntu 11).
Just leave the direction you want me to do.
Edit: I'm downloading cm10.1 source ATM.
Sent from my GT-I9100 using xda app-developers app
Quinny899 said:
I'm working on getting ParanoidAndroid 4.2 working, but it needs some stuff from 4.2 that can only be compiled from source to boot. Does anyone have a PC powerful enough for a community effort for (at least a booting) 4.2 build?
It can be AOSP or CM10.1 (PA sources for 2.99 aren't available yet)
Specs that would be useful:
At least 8Gb of RAM
At least Quad core
Running some sort of Linux build
Later on this year I will probably get a PC powerful enough to build from source, so until then I need some help from other users.
Thanks
Click to expand...
Click to collapse
I have built 4.2 a couple of time using Quallenauge's repo, AOSP and CM10 but couldn't them to boot. At the moment I am building CM 9.1 using JackpotClavin's repo with the 3.0.21 kernel, can try 4.2 again if you have any idea on why it doesn't boot. I have built CM 7.2 numerous times for my rk2818 but the G9 file system is a bit odd.
Have you got CM10 to boot using the repo on its own? It's labelled "does not boot yet", so it might be built differently.
Also, are you using trevd's OMAPZoom one?
Quinny899 said:
Have you got CM10 to boot using the repo on its own? It's labelled "does not boot yet", so it might be built differently.
Also, are you using trevd's OMAPZoom one?
Click to expand...
Click to collapse
Update Some progress to report, CM9 is booting with 3.0.21 kernel using 4.0.26 image. CM must have been updating their server yesterday, never could get 10.1 so switched to CM 10 and building it now.
julle131 said:
My laptop has 8gb ram, quadcore 1.5ghz AMD processor and backbox(based on Ubuntu 11).
Just leave the direction you want me to do.
Edit: I'm downloading cm10.1 source ATM.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Hope you are having better luck than me. So far two system freezes and one reboot while trying to build CM10. AMD A4-3400 2.7 GHz - Memory: 4.0 GB, takes over 3 hours to build CM9.
stevemp said:
Hope you are having better luck than me. So far two system freezes and one reboot while trying to build CM10. AMD A4-3400 2.7 GHz - Memory: 4.0 GB, takes over 3 hours to build CM9.
Click to expand...
Click to collapse
I have problem acquiring the source. 3 times failed downloading the 350/353. I have AMD A8-3500m 1.5Ghz, overlcocked to 1.9Ghz. Memory 8gb, so it will probably take even more for me. It takes almost ~2.5h to compile Boot2Gecko for SGS2.
I have an intel i5 3570K based computer with 16GB of ram. I would be willing to compile it if anyone wants. I am more of a windows person though but I do have Ubuntu 12.10 installed. I would just need some detailed instructions on how to get the source and compile it for the tablet.
I can build that, but in my case the cyanogenmod hangs on boot screen and adb is stopped then :-/
It's not clear for me, how this behavior can be changed with properties. For timing reasons I was not able to try out the hint from trevd, which suggested to add adbd service at the init script.
julle131 said:
I have problem acquiring the source. 3 times failed downloading the 350/353. I have AMD A8-3500m 1.5Ghz, overlcocked to 1.9Ghz. Memory 8gb, so it will probably take even more for me. It takes almost ~2.5h to compile Boot2Gecko for SGS2.
Click to expand...
Click to collapse
Same for me, 10.1 stopped at 350 every time so I switched to Quallenauge's github which is 4.1.2. Took about 20 minutes to download. CM prebuilt is broken there also, term doesn't download. Just remove term from vendor/cm/config/common.mk or set it up your self.
repo init -u git://github.com/Quallenauge/android.git -b jellybean
---------- Post added at 02:46 PM ---------- Previous post was at 02:37 PM ----------
Quallenauge said:
I can build that, but in my case the cyanogenmod hangs on boot screen and adb is stopped then :-/
It's not clear for me, how this behavior can be changed with properties. For timing reasons I was not able to try out the hint from trevd, which suggested to add adbd service at the init script.
Click to expand...
Click to collapse
I use SDE to export data and check CM9 log files that way. I am still trying to build, my computer crashes a lot so hope this time it finishes. I am retired so have lots of free time to spend working on build, thanks for giving me a hobby to keep me busy.
---------- Post added at 03:13 PM ---------- Previous post was at 02:46 PM ----------
Djirin said:
I have an intel i5 3570K based computer with 16GB of ram. I would be willing to compile it if anyone wants. I am more of a windows person though but I do have Ubuntu 12.10 installed. I would just need some detailed instructions on how to get the source and compile it for the tablet.
Click to expand...
Click to collapse
Sure, join the fun. I use Xubuntu 12.10 so my setup should work for you.
Install the packages needed for building.
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 \
g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown \
libxml2-utils xsltproc zlib1g-dev:i386
Download and install Java Linux x64 68.72 MB jdk-6u38-linux-x64.bin --> http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html
Code:
chmod +x jdk-6u34-linux-x64.bin
sudo ./jdk-6u34-linux-x64.bin
sudo mv jdk1.6.0_34 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_34/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_34/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_34/bin/javaws 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
Choose the new version after each command.
Check to make sure it installed --> java –version
Install repo
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Get Quallenauge repo and sync
repo init -u git://github.com/Quallenauge/android.git -b jellybean
repo sync
Setup enviroment and start building.
source build/envsetup.sh
lunch
make
That should get you started, might have missed something though, if you run into errors ask and maybe someone can help.
Got all the packages installed and repo synced. Boy that took a good hour to do.
So what do I need to do to make sure it gets configured to work on the archos tablet? More than happy to use my CPU time to compile whatever is needed
stevemp said:
Same for me, 10.1 stopped at 350 every time so I switched to Quallenauge's github which is 4.1.2. Took about 20 minutes to download. CM prebuilt is broken there also, term doesn't download. Just remove term from vendor/cm/config/common.mk or set it up your self.
repo init -u git://github.com/Quallenauge/android.git -b jellybean
---------- Post added at 02:46 PM ---------- Previous post was at 02:37 PM ----------
I use SDE to export data and check CM9 log files that way. I am still trying to build, my computer crashes a lot so hope this time it finishes. I am retired so have lots of free time to spend working on build, thanks for giving me a hobby to keep me busy.
---------- Post added at 03:13 PM ---------- Previous post was at 02:46 PM ----------
Sure, join the fun. I use Xubuntu 12.10 so my setup should work for you.
Install the packages needed for building.
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 \
g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown \
libxml2-utils xsltproc zlib1g-dev:i386
Download and install Java Linux x64 68.72 MB jdk-6u38-linux-x64.bin --> http://www.oracle.com/technetwork/java/javase/downloads/jdk6u38-downloads-1877406.html
Code:
chmod +x jdk-6u34-linux-x64.bin
sudo ./jdk-6u34-linux-x64.bin
sudo mv jdk1.6.0_34 /usr/lib/jvm/
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_34/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_34/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_34/bin/javaws 1
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
Choose the new version after each command.
Check to make sure it installed --> java –version
Install repo
Code:
mkdir ~/bin
PATH=~/bin:$PATH
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
Get Quallenauge repo and sync
repo init -u git://github.com/Quallenauge/android.git -b jellybean
repo sync
Setup enviroment and start building.
source build/envsetup.sh
lunch
make
That should get you started, might have missed something though, if you run into errors ask and maybe someone can help.
Click to expand...
Click to collapse
OK after all that window of wonderful compiling text flying by.. it took maybe an hour? I didn't pay attention to when I started it. So I ended up with this at the end..
I am a complete newb when it comes to this. I have compiled my own kernel before but that has been years ago and nothing remotely like this!
Code:
Copying: /home/dragon/out/target/product/generic/obj/NOTICE_FILES/src/kernel.txt
build/tools/generate-notice-files.py /home/dragon/out/target/product/generic/obj/NOTICE.txt /home/dragon/out/target/product/generic/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /home/dragon/out/target/product/generic/obj/NOTICE_FILES/src
Combining NOTICE files into HTML
Combining NOTICE files into text
Generated: (/home/dragon/out/target/product/generic/android-info.txt)
Installed file list: /home/dragon/out/target/product/generic/installed-files.txt
Target system fs image: /home/dragon/out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Running: mkyaffs2image -f /home/dragon/out/target/product/generic/system /home/dragon/out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: /home/dragon/out/target/product/generic/system.img
Target ram disk: /home/dragon/out/target/product/generic/ramdisk.img
Target userdata fs image: /home/dragon/out/target/product/generic/userdata.img
Running: mkyaffs2image -f /home/dragon/out/target/product/generic/data /home/dragon/out/target/product/generic/userdata.img
Djirin said:
OK after all that window of wonderful compiling text flying by.. it took maybe an hour? I didn't pay attention to when I started it. So I ended up with this at the end..
I am a complete newb when it comes to this. I have compiled my own kernel before but that has been years ago and nothing remotely like this!
Code:
Copying: /home/dragon/out/target/product/generic/obj/NOTICE_FILES/src/kernel.txt
build/tools/generate-notice-files.py /home/dragon/out/target/product/generic/obj/NOTICE.txt /home/dragon/out/target/product/generic/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" /home/dragon/out/target/product/generic/obj/NOTICE_FILES/src
Combining NOTICE files into HTML
Combining NOTICE files into text
Generated: (/home/dragon/out/target/product/generic/android-info.txt)
Installed file list: /home/dragon/out/target/product/generic/installed-files.txt
Target system fs image: /home/dragon/out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Running: mkyaffs2image -f /home/dragon/out/target/product/generic/system /home/dragon/out/target/product/generic/obj/PACKAGING/systemimage_intermediates/system.img
Install system fs image: /home/dragon/out/target/product/generic/system.img
Target ram disk: /home/dragon/out/target/product/generic/ramdisk.img
Target userdata fs image: /home/dragon/out/target/product/generic/userdata.img
Running: mkyaffs2image -f /home/dragon/out/target/product/generic/data /home/dragon/out/target/product/generic/userdata.img
Click to expand...
Click to collapse
I just started porting CM about a year ago myself, just takes time to learn.
http://wiki.cyanogenmod.org/index.php?title=Main_Page is a good place to start.
What you compiled --> http://forum.xda-developers.com/showpost.php?p=35292640&postcount=124
JackpotClavin ported CM9 (ICS) --> http://forum.xda-developers.com/showthread.php?t=1735281 His github (needs to be updated for JB) --> https://github.com/JackpotClavin
Hashcode has ported CM10, AOKP, and AOSP to the Kindle Fire, similar to G9 --> http://forum.xda-developers.com/showthread.php?t=1591850
As you can see a lot to learn.
Test
Mostly working: video, audio, and wifi. :victory:
Tested Chrome, You Tube HQ, Gmail, Play Store, Play Music, Play Movies. All work ok for me. Camera not working. Needs to be cleaned up and optimized, tired so maybe someone wants to help.
Quadrant score = 2154
AnTuTu Benchmark = 7301
Download link --> https://hotfile.com/dl/188900617/9a6e2c2/cm10-rom.tar.gz.html
updated
Sv: Does anyone have a computer powerful enough to compile 4.2 from source?
Hi.
Do you awesome people still need some computer time ?
I got a desktop with an AMD quad-core 3.4 GHz CPU, 16 GB RAM, and 100 GB (sata 2 ) HDD.
A clean cm 10.1 build for my maguro usually takes about 40 minutes.
I'm gonna install Ubuntu in about 12-14 hours.
Would love to help out. I got a gen10 80 sx on the way.
these typos came from my Galaxy Nexus [I9250]
Reptilez_DK said:
Hi.
Do you awesome people still need some computer time ?
I got a desktop with an AMD quad-core 3.4 GHz CPU, 16 GB RAM, and 100 GB (sata 2 ) HDD.
A clean cm 10.1 build for my maguro usually takes about 40 minutes.
I'm gonna install Ubuntu in about 12-14 hours.
Would love to help out. I got a gen10 80 sx on the way.
these typos came from my Galaxy Nexus [I9250]
Click to expand...
Click to collapse
That would be amazing for someone to make a g10 ROM with. We some 4.2 stuff now, but thanks so much for the offer
Sent from my Galaxy Nexus using Tapatalk HD
Sv: Does anyone have a computer powerful enough to compile 4.2 from source?
Quinny899 said:
That would be amazing for someone to make a g10 ROM with. We some 4.2 stuff now, but thanks so much for the offer
Sent from my Galaxy Nexus using Tapatalk HD
Click to expand...
Click to collapse
I'm not a developer at all, so I just thought I could let you guys remotely do your magic.
Edit: also, I have a pretty decent connection ( 40/40 Mbit ), so I'll be able to sync whatever source.
these typos came from my Galaxy Nexus [I9250]
I'm not a developer and have only just bought a 101xs, ive installed custom roms on my gnote and gtab however. I do have a decent pc if anyone needs me to do anything with it though
Specs are:
And bulldozer 6 core cpu
16gb ram
2tbs storage drive and sata 3 ssd system drive ( win7 but could dual boot if required)
Also have a 120mbps connection
Let me know if I can do anything
Sent from my GT-N7000 using xda premium

[CM] Building for expressltexx (GT-I8730)

There's an easy way to do whatever's discussed below, except for a) getting the SDK, b) syncing the repos, and c) building the ROM; and that way is using this script. But it's still better to do the steps below manually as it gets you acquainted with the terminal - you'll be using it a lot.
Thanks to @klvnhng for the original tutorial for mako
Credits to him.
You will need:
A computer running Ubuntu with at least 2GB memory and around 40-65 GB of free space
If you don't want to install Ubuntu, run it instead in VMWare Player or VirtualBox.
make sure you provide the virtual machine with the amount of recommended disk space or more
give it no less than 3-4GB of RAM
A (preferably fast) internet connection (trust me, you don't want to do this with a 256 or 512 kbps connection)
Familiarity with Android and Linux. Read up at source.android.com.
Setting up the build environment
1. Install JDK
DO NOT USE OPENJDK. Remove it by entering
Code:
sudo apt-get purge openjdk* icedtea* icedtea-6*
Install Oracle Java 6 by typing this into a terminal:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
Android SDK requires the x86 compatibility packages, ia32-libs. Install it by entering this:
Code:
sudo apt-get -y install ia32-libs
As an alternative, you can also do this (thanks to @jjchico):
Code:
sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
2. Android SDK
Download it here.
Extract it to a folder of your choice (in this guide, I will refer to it as ~/android/sdk).
Enter these commands into the terminal:
Code:
cd ~/android/sdk/adt-bundle/sdk/tools
./android sdk
Click Install packages. cd to ~/android/sdk/adt-bundle/sdk/platform-tools and type:
Code:
./adb
./fastboot
If you've done everything correctly, you should get a big block of text for both (which list all of the adb/fastboot commands).
3. Install required packages
Copy and paste this command into the terminal:
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5-dev \
ia32-libs x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 \
lib32z-dev libgl1-mesa-dev g++-multilib mingw32 \
tofrodos python-markdown libxml2-utils xsltproc readline-common \
libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev \
lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 \
libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev \
libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev
4. Install the repo command
Make directories called bin and android in your home folder, respectively.
Code:
mkdir -p ~/bin
mkdir -p ~/android
Download and setup the repo binary:
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Now add it to your path:
Code:
export PATH="$PATH:~/bin"
And make sure it belongs in your path between subsequent reboots:
Code:
echo "export PATH="$PATH:~/android/sdk:~/bin"" >> ~/.bashrc
source ~/.bashrc
5. Configuring USB
You must configure USB to detect your Android device(s) properly.
Do this in a terminal:
Code:
curl https://raw.githubusercontent.com/aureljared/build-env-init/master/51-android.rules > ~/bin/51-android.rules
chmod a+r ~/bin/51-android.rules
sudo cp -vfp ~/bin/51-android.rules /etc/udev/rules.d/51-android.rules
6. Syncing up
The next step is to initialize the repository and download the source code to your computer.
Type the following lines into the terminal:
Code:
mkdir -p ~/android/cm-11.0
cd ~/android/cm-11.0
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
To download all the necessary device-specific files for our device, do this:
Code:
curl https://raw.githubusercontent.com/aureljared/android-manifests/expresslte-cm-11.0/local_manifest.xml >> .repo/local_manifests/local_manifest.xml
Now run
Code:
repo sync
You have now begun downloading all of the CM source code to your build directory. Depending on your internet speed, this can take from a couple of hours to a few days. If the sync interrupts, don't worry. Simply continue the sync (you don't have to restart completely, only the project you were downloading when the interrupt occured, lol) by entering:
Code:
repo sync
Some tips:
You can interrupt the process by pressing Ctrl + C, it will continue where it left off the next time anyway.
Remember, you need to cd into your build directory (~/android/cm-11.0, if you've been following this guide) for the command to work.
If you want only one project to be synced at a time, run repo sync -j1 instead.
This step takes a long time depending on your internet connection speed (FYI you're downloading ~20 GB of code!)
7. Building CM (yay!)
You must download the necessary pre-built apps:
Code:
~/android/cm-11.0/vendor/cm/get-prebuilts
Now let's build! cd to your build directory and run the following commands in the terminal:
Code:
. build/envsetup.sh
brunch expressltexx
Now, just let your computer do the rest. This step is very demanding for your computer, so you better leave it alone while it builds. Usually this takes an hour or more. Go get some sleep or eat something.
Done? If everything went correctly, cd to ~/android/cm-11.0/out/target/product/expresslte and you should see your newly built ROM entitled:
cm-11.0-20xxxxxx-UNOFFICIAL-expressltexx.zip
Congratulations! You've successfully built CM 11.0!
For re-builds (i.e. when the source code has been updated and you would like to make a new nightly), just do this:
Code:
cd ~/android/cm-11.0
make clobber
repo sync
. build/envsetup.sh
brunch expressltexx
Have fun building!​
I suggest you to modify step 5 inserting before repo sync
Code:
mkdir .repo/local_manifests
cd .repo/local_manifests
wget https://raw.github.com/KINGbabasula/android_device_samsung_expresslte/cm-10.2/local_manifest.xml
cd ..
cd ..
This will download the specific necessary repos with repo sync
Then remove this in step 6
Code:
mkdir files
cd files
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
as it isn't needed
And change make clean with make clobber because with clobber it will rebuild faster
EDIT: And before step 6 you need to replace these 2 files with the 2 in the attachment
Code:
system/core/mkbootimg/bootimg.h
system/core/mkbootimg/mkbootimg.c
KINGbabasula said:
I suggest you to modify step 5 inserting before repo sync
Code:
mkdir .repo/local_manifests
cd .repo/local_manifests
wget https://raw.github.com/KINGbabasula/android_device_samsung_expresslte/cm-10.2/local_manifest.xml
cd ..
cd ..
This will download the specific necessary repos with repo sync
Then remove this in step 6
Code:
mkdir files
cd files
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
as it isn't needed
And change make clean with make clobber because with clobber it will rebuild faster
EDIT: And before step 6 you need to replace these 2 files with the 2 in the attachment
Code:
system/core/mkbootimg/bootimg.h
system/core/mkbootimg/mkbootimg.c
Click to expand...
Click to collapse
Original post updated.
Can you help me with ia32-libs?
It says that it's referred to by a handful of other packages but it has no installation candidates or something. The bottom line is that I can't install it.
I'm using 13.10 x64 on an ASUS K43SJ.
- Intel i5-2410M Quadcore (2.3GHz normal, 2.9GHz Turbo Boost)
- 2GB RAM available to Ubuntu VM
Sent from my International Galaxy Express using Tapatalk 4
aureljared said:
Original post updated.
Can you help me with ia32-libs?
It says that it's referred to by a handful of other packages but it has no installation candidates or something. The bottom line is that I can't install it.
I'm using 13.10 x64 on an ASUS K43SJ.
- Intel i5-2410M Quadcore (2.3GHz normal, 2.9GHz Turbo Boost)
- 2GB RAM available to Ubuntu VM
Sent from my International Galaxy Express using Tapatalk 4
Click to expand...
Click to collapse
You have to apt-get install every missing library one by one
Inviato dal mio GT-I9070 utilizzando Tapatalk
aureljared said:
2. Android SDK
Download it here.
Extract it to a folder of your choice (in this guide, I will refer to it as ~/android/sdk).
Enter these commands into the terminal:
Code:
cd ~/android/sdk/adt-bundle/sdk/tools
./android sdk
Click Install packages. cd to ~/android/sdk/adt-bundle/sdk/platform-tools and type:
Code:
adb
fastboot
Click to expand...
Click to collapse
Shouldn't it be
Code:
./adb
./fastboot
Or have you added the sdk to your path?
I guess the compilation process will need the sdk. How does it find the sdk? Do you need to provide the path anywhere?
Thanks for the great tuto.
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
---------- Post added at 12:08 PM ---------- Previous post was at 11:29 AM ----------
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
jjchico said:
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
---------- Post added at 12:08 PM ---------- Previous post was at 11:29 AM ----------
These are the libs that ia32-libs pulls in that are present in Ubuntu 13.10. This should be equivalent to install ia32-libs in Ubuntu 12.04:
$ sudo apt-get install lsb-release lib32gcc1 libc6-i386 lib32z1 lib32stdc++6 lib32bz2-1.0 lib32ncurses5
Click to expand...
Click to collapse
jjchico said:
Shouldn't it be
Code:
./adb
./fastboot
Or have you added the sdk to your path?
I guess the compilation process will need the sdk. How does it find the sdk? Do you need to provide the path anywhere?
Thanks for the great tuto.
Click to expand...
Click to collapse
Updated original post.
Sent from my GT-I8730 using Tapatalk
Thanks. Just note the missing double quotes in the export PATH.
Enviado desde mi GT-I9000 mediante Tapatalk
jjchico said:
Thanks. Just note the missing double quotes in the export PATH.
Enviado desde mi GT-I9000 mediante Tapatalk
Click to expand...
Click to collapse
Haha lol sorry. I was very sleepy when I updated last night.
Updated post.
My repo sync is finished with 65 out of 401 projects. ia32-libs now okay thanks to you @jjchico.
Sent from my GT-I8730 using Tapatalk
I get this
[email protected]:~/android/cm-10.2$ repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
No command 'repo' found, did you mean:
Command 'repro' from package 'repro' (universe)
Command 'repl' from package 'nmh' (universe)
Command 'repl' from package 'mailutils-mh' (universe)
Command 'rep' from package 'rep' (universe)
repo: command not found
[email protected]:~/android/cm-10.2$
Any ideas? All seemed good before that
Bazzan
Check that repo is in the bin folder in your user main folder.
Check that repo is executable
chmod a+x ~/bin/repo
Enviado desde mi GT-I9000 mediante Tapatalk
"6. Building CM (yay!)"
"In order to make a working build, you have to get the proprietary files (mainly device build files and drivers) for the device."
so how do I get the propriety files and where do I put them? ADB from your phone?
After this you direct us to prebuilt apps so it appears there is a step missing unless I am pulling proprietary files down from KINGbabasula's Github
Bazzan
bazzan said:
"6. Building CM (yay!)"
"In order to make a working build, you have to get the proprietary files (mainly device build files and drivers) for the device."
so how do I get the propriety files and where do I put them? ADB from your phone?
After this you direct us to prebuilt apps so it appears there is a step missing unless I am pulling proprietary files down from KINGbabasula's Github
Bazzan
Click to expand...
Click to collapse
Yeah, the files are located somewhere in KINGbabasula's github. If you want to use ADB then refer to the text file located in android_device_samsung_expresslte.
Or if you want to download the files themselves, do this in a terminal:
Code:
mkdir proprietary
cd proprietary
git clone https://github.com/KINGbabasula/proprietary_vendor_samsung.git
The files will be located in proprietary/proprietary_vendor_samsung/expresslte.
Sent from my GT-I8730 using Tapatalk
Finally got build going. Thanks for the tutorial @aureljared. You were not kidding when you said takes a while. Not too sure where to from here. Welcome suggestions if anyone wants me to try anything
Bazzan
URGENT
Before proceeding to build any more ROMs, let me ask some questions.
What toolchain for building the kernel are you using? Toolchains that might work are arm-eabi-4.4.3 upwards or linaro 4.4.3 upwards.
What is your configuration for the kernel? It is written to a file called ".config" insinde the kernel source.
Have you applied any kind of patch to the code before compiling? If so, what?
Click to expand...
Click to collapse
Thank you for your time. Your answers to the above questions will be highly appreciated and will be of utmost importance. There is also a good chance that we might build a proper kernel with your reports!
:good: :victory:
Sent from my GT-I8730 using Tapatalk
aureljared said:
URGENT
Before proceeding to build any more ROMs, let me ask some questions.
What toolchain for building the kernel are you using? Toolchains that might work are arm-eabi-4.4.3 upwards or linaro 4.4.3 upwards.
What is your configuration for the kernel? It is written to a file called ".config" insinde the kernel source.
Have you applied any kind of patch to the code before compiling? If so, what?
Thank you for your time. Your answers to the above questions will be highly appreciated and will be of utmost importance. There is also a good chance that we might build a proper kernel with your reports!
:good: :victory:
Sent from my GT-I8730 using Tapatalk
Click to expand...
Click to collapse
No toolchain experience at all. Just substituted kernels from elsewhere. Maybe if you are leaning toward Linaro, I should find myself a tutorial for arm-eabi-4.4.3 upwards and give that a go. then we can cover more ground.
Bazzan
bazzan said:
No toolchain experience at all. Just substituted kernels from elsewhere. Maybe if you are leaning toward Linaro, I should find myself a tutorial for arm-eabi-4.4.3 upwards and give that a go. then we can cover more ground.
Bazzan
Click to expand...
Click to collapse
Sure.
I'm not saying that I'm relying on Linaro now, it's just that Linaro is a toolchain developed by a consortium of technology companies including Samsung that aims to build Linux kernels that perform extremely well on mobile devices.
CM 10.2 uses Linaro 12.09, I think.
I tried building with Linaro a couple of days ago but make threw me some errors, the most confusing being something like this
Code:
make [cypress_touchkeys.o] *** Error 2
I don't even know what Cypress is.
Sent from my GT-I8730 using Tapatalk
aureljared said:
Sure.
I'm not saying that I'm relying on Linaro now, it's just that Linaro is a toolchain developed by a consortium of technology companies including Samsung that aims to build Linux kernels that perform extremely well on mobile devices.
CM 10.2 uses Linaro 12.09, I think.
I tried building with Linaro a couple of days ago but make threw me some errors, the most confusing being something like this
Code:
make [cypress_touchkeys.o] *** Error 2
I don't even know what Cypress is.
Sent from my GT-I8730 using Tapatalk
Click to expand...
Click to collapse
Cannot help with Cypress. Some time ago I downloaded a file called GT-I8730_JB_Opensource.zip - not sure where I found it.
It appears to be what is says it is. Within it is a text file called README_Kernel.txt
It has the following
################################################################################
1. How to Build
- get Toolchain
From android git server , codesourcery and etc ..
- arm-eabi-4.4.3
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
EX) export CROSS_COMPILE= $(android platform directory you download)/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Ex) export CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
$ export ARCH=arm
$ make msm8930_express_defconfig
$ make
2. Output files
- Kernel : arch/arm/boot/zImage
- module : drivers/*/*.ko
3. How to Clean
$ make clean
################################################################################
Way out of my depth but will try sometime next week to give it a go with arm-eabi-4.4.3. Major interview Monday so nothing before then.
Bazzan
bazzan said:
Cannot help with Cypress. Some time ago I downloaded a file called GT-I8730_JB_Opensource.zip - not sure where I found it.
It appears to be what is says it is. Within it is a text file called README_Kernel.txt
It has the following
################################################################################
1. How to Build
- get Toolchain
From android git server , codesourcery and etc ..
- arm-eabi-4.4.3
- edit Makefile
edit "CROSS_COMPILE" to right toolchain path(You downloaded).
EX) export CROSS_COMPILE= $(android platform directory you download)/android/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
Ex) export CROSS_COMPILE=/usr/local/toolchain/arm-eabi-4.4.3/bin/arm-eabi- // check the location of toolchain
$ export ARCH=arm
$ make msm8930_express_defconfig
$ make
2. Output files
- Kernel : arch/arm/boot/zImage
- module : drivers/*/*.ko
3. How to Clean
$ make clean
################################################################################
Way out of my depth but will try sometime next week to give it a go with arm-eabi-4.4.3. Major interview Monday so nothing before then.
Bazzan
Click to expand...
Click to collapse
That's from Samsung. It contains the kernel source as you already have seen
It's stock 3.4.0 so I don't know if it will work with CM :good:
Sent from my GT-I8730 using Tapatalk
Quote from jt1134:
jt1134 said:
I use the d2 family kernel source.
For stock ROMs and CM10, you can use the source and ramdisk provided by samsung.
For CM10.1 or higher, you'll have to get your hands very dirty. IMO the easiest route would be to port the missing drivers from stock samsung source to the msm8930-common kernel, and modifying it to work with them. This is how I did it for the I437 : http://review.cyanogenmod.org/#/c/47947/ . You may then use the serrano device trees as a template once the kernel is ready.
Click to expand...
Click to collapse
Updated first post with this info.
Sent from my GT-I8730 using Tapatalk

Categories

Resources