FORUMS
Remove All Ads from XDA

Guide on how I build my own CM10 test builts

1,362 posts
Thanks Meter: 484
 
By hnl_dk, Senior Member on 31st July 2012, 08:23 PM
Post Reply Email Thread
This is a follow up on my "old" "Guide on how I build my own CM9 test builts" thread.

Guide how I build CM10 for my Mango.

For the first time you try to build CM10.
Create ~/bin and download repo to that directory. Afterwards set executable bit to make it possible to ”execute”.
Code:
mkdir -p ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo 
chmod a+x ~/bin/repo
Now reboot the computer.

Create ~/android/system and initialize the repository.
Code:
mkdir -p ~/android/system
cd ~/android/system/ 
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
Unpack the attached local_manifest.xml.bz2 and place local_manifest.xml into ~/android/system/.repo

Synchronise towards the current git repositories.
Code:
repo sync
Setup the environmental settings and initialize the Mango build.
Code:
. build/envsetup.sh
breakfast mango
Initialize the Mango build.
Code:
cd ~/android/system/device/semc/mango/
./setup-makefiles.sh
Download the prebuilts
Code:
~/android/system/vendor/cm/get-prebuilts
Check for new changes
Code:
cd ~/android/system/ 
repo sync
Setup the environment again and build the ROM (takes long time)
Code:
. build/envsetup.sh
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-10-DATE-UNOFFICIAL-mango.zip

The next times you try to build it, you only need to do the following.
Delete build.prop, if not will build.prop not get generated.
Code:
rm -f ~/android/system/out/target/product/mango/system/build.prop
Syncronise the git repositories.
Code:
cd ~/android/system/
repo sync
Setup the environmental settings.
Code:
. build/envsetup.sh
Configure/build.
Code:
brunch mango
You will now find the build here (change DATE into the date).
~/android/system/out/target/product/mango/cm-10-DATE-UNOFFICIAL-mango.zip

EDIT (August 14. 2012): If the boot.img is not booting, is it most likely due to the bootloader bug.
To make it "work", do the following (replace mango with your own device)
Code:
cd out/target/product/mango/
rm -f ./boot.img ./combinedroot.cpio ./combinedroot.fs ./ramdisk.img
cp ./root/logo.rle ./root/waste_of_space1
cp ./root/logo.rle ./root/waste_of_space2
cp ./combinedroot/logo.rle ./combinedroot/waste_of_space1
cp ./combinedroot/logo.rle ./combinedroot/waste_of_space2
cd ../../../..
brunch mango
Attached Files
File Type: bz2 local_manifest.xml.bz2 - [Click for QR Code] (324 Bytes, 423 views)
The Following 30 Users Say Thank You to hnl_dk For This Useful Post: [ View ] Gift hnl_dk Ad-Free
 
 
2nd August 2012, 07:47 AM |#2  
Member
Thanks Meter: 18
 
More
just a technical: is it really necessary to reboot the computer after downloading the repo binary? and if so, why is that??
2nd August 2012, 08:06 AM |#3  
hnl_dk's Avatar
OP Senior Member
Thanks Meter: 484
 
Donate to Me
More
Quote:
Originally Posted by bokrug

just a technical: is it really necessary to reboot the computer after downloading the repo binary? and if so, why is that??

It is only necessary on some Linux distributions, where you will not be able to execute anything from that directory, before a reboot. You can try to see if you can do it without. If it is working, do you not need it.
2nd August 2012, 10:15 AM |#4  
pikpok's Avatar
Senior Member
Flag Zamosc
Thanks Meter: 229
 
Donate to Me
More
Quote:
Originally Posted by hnl_dk

It is only necessary on some Linux distributions, where you will not be able to execute anything from that directory, before a reboot. You can try to see if you can do it without. If it is working, do you not need it.

There's no really need to reboot - edit .bashrc in your home directory and add
Code:
export PATH=~/bin/:$PATH
Save, then run:
Code:
source ~/.bashrc
It have to work on all distros :P
2nd August 2012, 10:18 AM |#5  
hnl_dk's Avatar
OP Senior Member
Thanks Meter: 484
 
Donate to Me
More
Quote:
Originally Posted by pikpok

There's no really need to reboot - edit .bashrc in your home directory and add

Code:
export PATH=~/bin/:$PATH
Save, then run:
Code:
source ~/.bashrc
It have to work on all distros :P

I just want to show the "universal" way.
Not everyone is using bash
2nd August 2012, 10:57 AM |#6  
pikpok's Avatar
Senior Member
Flag Zamosc
Thanks Meter: 229
 
Donate to Me
More
Quote:
Originally Posted by hnl_dk

I just want to show the "universal" way.
Not everyone is using bash

If someone use another shell, e.g. zsh, then he'll know what files he have to edit IMO rebooting is wasting time.
2nd August 2012, 11:04 AM |#7  
hnl_dk's Avatar
OP Senior Member
Thanks Meter: 484
 
Donate to Me
More
Quote:
Originally Posted by pikpok

If someone use another shell, e.g. zsh, then he'll know what files he have to edit IMO rebooting is wasting time.

no it is not, as you do not need to edit any files. It will work automatically.
It is as much a waste of time to edit the resource-definition scripts.
2nd August 2012, 11:11 AM |#8  
pikpok's Avatar
Senior Member
Flag Zamosc
Thanks Meter: 229
 
Donate to Me
More
Quote:
Originally Posted by hnl_dk

no it is not, as you do not need to edit any files. It will work automatically.
It is as much a waste of time to edit the resource-definition scripts.

Reboot - about 1 min
Edit one file and paste single command in terminal - for me it's 10secs
But it comes to offtop discussion, so it would be better to end it now

@edit - now when I think about it... bin in home folder won't be added to PATH automatically, at least in Arch Linux. Maybe Ubuntu is more "intelligent"
2nd August 2012, 11:23 AM |#9  
hnl_dk's Avatar
OP Senior Member
Thanks Meter: 484
 
Donate to Me
More
Quote:
Originally Posted by pikpok

Reboot - about 1 min
Edit one file and paste single command in terminal - for me it's 10secs
But it comes to offtop discussion, so it would be better to end it now

@edit - now when I think about it... bin in home folder won't be added to PATH automatically, at least in Arch Linux. Maybe Ubuntu is more "intelligent"

It does not take that long for me to make a reboot
No matter what, is it always good to have more methods to make something work.
It did the last time I tried Arch Linux... and no I am not using Ubuntu (too flashy for me )
2nd August 2012, 01:38 PM |#10  
DeVelox's Avatar
Junior Member
Thanks Meter: 14
 
More
Assuming that there is an entry in your ~/.profile that adds ~/bin to PATH, a reboot won't do anything that logout/login wouldn't. Furthermore, logout/login (in this case) won't do anything that sourcing ~/.profile wouldn't. So, simply issuing "source ~/.profile" is sufficient on most distributions. If you are using a distribution or a shell that doesn't do this by default, then you probably already know what you need to do.

I do, however, commend hnl_dk's efforts to make things simpler for newcomers to Android and Linux, even if it's not the the "fastest" or the "best" way. Whenever you start getting into one of those "what if?" arguments, things tend to spiral out of control. Sometimes it's better to just make a few assumptions and go with what is most likely to work.

A reboot might be a bit of an overkill, though.
The Following User Says Thank You to DeVelox For This Useful Post: [ View ] Gift DeVelox Ad-Free
8th August 2012, 01:20 PM |#11  
Junior Member
Flag Nairn, Highlands
Thanks Meter: 0
 
Donate to Me
More
Unhappy Can't run 64-bit prebuilts on my 32-bit Linux
I have a 32-bit Linux box so get the errors:

/bin/bash: prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/arm-linux-androideabi-gcc: cannot execute binary file

Had a quick look around, but are there gcc etc. prebuilts for 32-bit Linux boxes?

TIA,
AK-A
Post Reply Subscribe to Thread

Tags
build, cm10, guide, semc, xperia

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes