Jump to content


Photo

Compiling CM9 (and maybe CM10) for Blade

* * * * * 7 votes

  • Please log in to reply
797 replies to this topic

#1
sej7278

sej7278

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,647 posts
  • Gender:Male
  • Devices:ZTE Blade
Source download comes to about 5.4Gb (6.2Gb for CM10). Compilation takes 55mins on my 12Gb 3.2GHz Core i5 with SSD and 75mins (80mins for CM10) including kernel on my 8Gb 2.4GHz Core2Quad with SSD.

1. Download "repo" and make it executable, this is Google's git wrapper script:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

2. Download CM9 source (use "repo sync" to update, use "-b jellybean" for CM10):
mkdir -p ~/cm9/vendor/zte/blade
cd ~/cm9
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j8

3. Download ZTE proprietary libs (use "git pull" to update) and copy into place. you'll probably only have to do this once as they don't get updated often, you could use your file manager/cp instead of rsync:
cd
git clone git://github.com/sej7278/proprietary_vendor_zte.git -b ics
rsync -av --delete ~/proprietary_vendor_zte/blade/ ~/cm9/vendor/zte/blade/ --exclude='.git*'

4. Update the prebuilt apps Terminal and ROMManager (not updated often):
cd ~/cm9/vendor/cm/
./get-prebuilts

5. Compile the ROM - the first time you do this it will download the kernel source and the ZTE device tree, so you won't be able to patch anything in device/zte/blade or kernel/zte/zte-kernel-msm7x27 until the next time:
cd ~/cm9/
export USE_CCACHE=1
. build/envsetup.sh
lunch cm_blade-userdebug
make bacon -j8

Edited by sej7278, 17 July 2012 - 11:16 PM.

  • 8

#2
KonstaT

KonstaT

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 2,653 posts
  • Gender:Male
  • Location:Finland
  • Devices:Moto G, ZTE Open C
  • Twitter:@konstatuomio

2. Download CM9:

cd ~/coldfusionx/cm9/
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u https://android.googlesource.com/platform/manifest
repo sync
cd ..

Should be:
cd ~/coldfusionx/cm9/
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
cd ..

Downloading the kernel source (and compiling it) is also unnecessary.

  • 0

#3
asm19

asm19

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Gender:Male
  • Location:Portugal
  • Devices:ZTE-Blade & Huawei U8800
  • Twitter:@miguel_salmeida
Nice job sej7278!

  • 0
Phone: ZTE - Blade (TPT v10 stock)
ROM: Self compiled CyanogenMod 9 (UNOFFICIAL 20120627)

#4
sej7278

sej7278

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,647 posts
  • Gender:Male
  • Devices:ZTE Blade

Should be:

cd ~/coldfusionx/cm9/
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
cd ..

Downloading the kernel source (and compiling it) is also unnecessary.


ok i updated it, leftover from my aosp instructions i guess.not sure it makes much (any?) difference though.

Edited by sej7278, 10 April 2012 - 02:15 PM.

  • 0

#5
targetbsp

targetbsp

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 3,999 posts
  • Gender:Male
  • Devices:Blade V, I9000, Blade
Nice one! I can't really spare the drive space without getting rid of my CM7 environment but it's nice to know there is a guide when I get around to leaving CM7 behind.

  • 0
My Blade site - includes vanilla KANGS's of CM7. Also available: modified GB Gapps with various market versions, mini ICS Gapps for 160mb system partitions and Flash for ARMv6
CM7 Blade changelog

#6
tilal6991

tilal6991

    Hardcore

  • Developer Team
  • PipPipPipPipPipPip
  • 3,781 posts
  • Gender:Male
  • Devices:ZTE Skate, Huawei U8150
Don't need libstagefright. And currently I'm not including any kernel modules beause of instability.

  • 0
If you like my work or if I helped, click the Plus button.

#7
sej7278

sej7278

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,647 posts
  • Gender:Male
  • Devices:ZTE Blade

Don't need libstagefright. And currently I'm not including any kernel modules beause of instability.


ah right. i noticed that the libstagefright from the patch was different to your rom which was different to my build.

what are you doing about kernel modules then - no cifs etc; or are you compiling them in as monolithic?

  • 0

#8
secretsev3n

secretsev3n

    Newbie

  • Members
  • Pip
  • 7 posts
Sej, out of interest, what are your system specifications and how long did it take to compile? :)

  • 0

#9
sej7278

sej7278

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,647 posts
  • Gender:Male
  • Devices:ZTE Blade

Sej, out of interest, what are your system specifications and how long did it take to compile? :)


lol i knew someone was going to ask that, but i didn't time it. it took a good while longer than cm7, when i timed aosp is was 45mins as apposed to 30mins for cm7.

that's on a 12gb ram 3.2ghz core-i5 with an ssd.

  • 0

#10
asm19

asm19

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Gender:Male
  • Location:Portugal
  • Devices:ZTE-Blade & Huawei U8800
  • Twitter:@miguel_salmeida
Sej7278, which OS do you use? centos, ubuntu?

  • 0
Phone: ZTE - Blade (TPT v10 stock)
ROM: Self compiled CyanogenMod 9 (UNOFFICIAL 20120627)

#11
sej7278

sej7278

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,647 posts
  • Gender:Male
  • Devices:ZTE Blade

Sej7278, which OS do you use? centos, ubuntu?


debian wheezy and fedora 14, never had much luck with ubuntu although its google's recommended platform.

  • 0

#12
asm19

asm19

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Gender:Male
  • Location:Portugal
  • Devices:ZTE-Blade & Huawei U8800
  • Twitter:@miguel_salmeida

debian wheezy and fedora 14, never had much luck with ubuntu although its google's recommended platform.





lol :D
I'm more accustomed to ubuntu and centos, use more for machines and services running. I'll test it on ubuntu.

  • 0
Phone: ZTE - Blade (TPT v10 stock)
ROM: Self compiled CyanogenMod 9 (UNOFFICIAL 20120627)

#13
sm4tik

sm4tik

    Addict

  • Members
  • PipPipPipPipPip
  • 508 posts
  • Gender:Male
  • Location:Jyväskylä
  • Devices:Blade
sej, can you check if the apk's still have all the unnecessary mdpi/xhdpi/etc.. stuff in them. I see those in 04/07 CFX, so I guess device_blade.mk has been updated after that build to include
+PRODUCT_AAPT_PREF_CONFIG := hdpi
+PRODUCT_AAPT_CONFIG := normal hdpi
Just curious because this has been something bugging me since the first AOSP build.
Thanks.

  • 0

#14
sm4tik

sm4tik

    Addict

  • Members
  • PipPipPipPipPip
  • 508 posts
  • Gender:Male
  • Location:Jyväskylä
  • Devices:Blade

9. Apply gerrit/github patches (hopefully the first 2 will get merged so won't be needed soon):
apply mini-phone patch from gerrit to ~/coldfusionx/cm9/vendor/cm/
apply audio patch from gerrit to ~/coldfusionx/cm9/frameworks/base/

Merged.

  • 0

#15
t0mm13b

t0mm13b

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,784 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@t0mm13b

Merged.

@sm4tik:

Re: GCC 4.7 -

Did you downgrade your gcc toolchain - the compile works under gcc 4.6.3 which was the last version before the upgrade to 4.7 which breaks the compile (still google-fu'ing to how to switch off C++ 0x11 stuff) From what I can recall, it was an experimental toolchain 4.7 apparently... *shrugs*

  • 0
try{ not_laugh; }catch{ FAIL; }finally{ laugh; }

#16
sm4tik

sm4tik

    Addict

  • Members
  • PipPipPipPipPip
  • 508 posts
  • Gender:Male
  • Location:Jyväskylä
  • Devices:Blade

@sm4tik:

Re: GCC 4.7 -

Did you downgrade your gcc toolchain - the compile works under gcc 4.6.3 which was the last version before the upgrade to 4.7 which breaks the compile (still google-fu'ing to how to switch off C++ 0x11 stuff) From what I can recall, it was an experimental toolchain 4.7 apparently... *shrugs*

You didn't get the reply in CM7 thread?

I found patches for webkit, srec and framework from bashlnx's github. Webkit's patch is in "patch-1" branch, others are in gingerbread. Been building with those and have had no issues, though for an untrained eye like mine, the webkit patch will break building on gcc < 4.6.

Haven't checked whether there are patches for ics also?

  • 0

#17
t0mm13b

t0mm13b

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,784 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@t0mm13b

You didn't get the reply in CM7 thread?


Yes I did - btw - cheers for the reply... :)

Haven't checked whether there are patches for ics also?


Ho okie... no worries... its just I don't want to break the arch's multilib/lib32 dependencies by doing a disastrous downgrade! :D :lol:

(BTW those patches you linked to, are mostly to get the C++ compiler to shut up complaining - really... :rolleyes: as for the webkit - that's a perl script which seems to complain about the old Switch.pm module... so not sure if ICS can compile cleanly with gcc 4.7... had to use my old 32bit machine to compile AOSP 2.3.7 which took ages.... :rolleyes: Only if I can get this gcc 4.7 working that is on my lappy... le sigh)

  • 0
try{ not_laugh; }catch{ FAIL; }finally{ laugh; }

#18
asm19

asm19

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Gender:Male
  • Location:Portugal
  • Devices:ZTE-Blade & Huawei U8800
  • Twitter:@miguel_salmeida
in step 10: cd ~ /coldfusionx/cm9/vendor/cm /
. /get-prebuilts

I do not have this directory Posted Image I've done repo sync again but still without it, this step is correct, or did something bad back?Within /coldfusionx/cm9/vendor only have the folder: zte
does anyone know the solution?

  • 0
Phone: ZTE - Blade (TPT v10 stock)
ROM: Self compiled CyanogenMod 9 (UNOFFICIAL 20120627)

#19
t0mm13b

t0mm13b

    Hardcore

  • MoDaCo Silver
  • PipPipPipPipPipPip
  • 1,784 posts
  • Gender:Male
  • Location:Ireland
  • Devices:GT-S8500,Zte Blade,SE ST15i
  • Twitter:@t0mm13b

in step 10: cd ~ /coldfusionx/cm9/vendor/cm /
. /get-prebuilts

I do not have this directory Posted Image I've done repo sync again but still without it, this step is correct, or did something bad back?Within /coldfusionx/cm9/vendor only have the folder: zte
does anyone know the solution?


Not extract-files.sh by any chance, when you go into the device/zte/blade (presumably?) and run that shell script to pull in the proprietary libs etc, it will populate the vendor sub-directory for the appropriate device?

Just thinkin' aloud here :P

  • 0
try{ not_laugh; }catch{ FAIL; }finally{ laugh; }

#20
sej7278

sej7278

    Hardcore

  • Members
  • PipPipPipPipPipPip
  • 1,647 posts
  • Gender:Male
  • Devices:ZTE Blade

in step 10: cd ~ /coldfusionx/cm9/vendor/cm /
. /get-prebuilts

I do not have this directory Posted Image I've done repo sync again but still without it, this step is correct, or did something bad back?Within /coldfusionx/cm9/vendor only have the folder: zte
does anyone know the solution?


bit odd that, its nothing to do with extract-files.sh, are you sure you're using a cyanogenmod repo and not pure google or something - although i repo init'ed using aosp and i have that directory. should be about 14 gigs in total.

it definitely should be there: https://github.com/C...droid_vendor_cm

github has been up and down a bit tonight, maybe you didn't fetch it?

Edited by sej7278, 10 April 2012 - 10:28 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users