Jump to content

Compiling CM9 (and maybe CM10) for Blade


Guest sej7278

Recommended Posts

Guest sej7278

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
Link to comment
Share on other sites

Guest KonstaT

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 ..[/code] Should be:
[code]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.

Link to comment
Share on other sites

Guest sej7278

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
Link to comment
Share on other sites

Guest targetbsp

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.

Link to comment
Share on other sites

Guest sej7278

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?

Link to comment
Share on other sites

Guest sej7278

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.

Link to comment
Share on other sites

Guest sej7278

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.

Link to comment
Share on other sites

Guest asm19

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.

Link to comment
Share on other sites

Guest sm4tik

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.

Link to comment
Share on other sites

Guest sm4tik

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.

Link to comment
Share on other sites

Guest 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*

Link to comment
Share on other sites

Guest sm4tik

@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?

Link to comment
Share on other sites

Guest 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)

Link to comment
Share on other sites

Guest asm19

in step 10: cd ~ /coldfusionx/cm9/vendor/cm /

. /get-prebuilts

I do not have this directory sad.gif 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?

Link to comment
Share on other sites

Guest t0mm13b

in step 10: cd ~ /coldfusionx/cm9/vendor/cm /

. /get-prebuilts

I do not have this directory sad.gif 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

Link to comment
Share on other sites

Guest sej7278

in step 10: cd ~ /coldfusionx/cm9/vendor/cm /

. /get-prebuilts

I do not have this directory sad.gif 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
Link to comment
Share on other sites

Guest t0mm13b

You didn't get the reply in CM7 thread?

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

@sm4tik:

As a fyi - I have posted the resolved issue to the broken gcc toolchain with 4.7, The post is found here on archlinux forum. Have successfully reverted back to the last good known version and all compiles well :)

Link to comment
Share on other sites

Guest sej7278

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.
no its just the hdpi in the build i did yesterday. i just flashed my build (took 54mins to compile) and noticed a couple of odd things: first off setting debug.sf.nobootanimation=1 in device/zte/blade/cm.mk doesn't work i still get the bootanimation (it doesn't echo 1 > /data/property/persist.sys.nobootanimation) i'm not sure if its related to that, but my boot animation is now shrunk to about half its size. oh and you're better off loading oi file manager from market as if you use the zip it seems to be uninstalled when you reflash. also noticed that changing ro.modversion in vendor/cm/config/common.mk doesn't change the filename of the resulting zip (update-cm-9.0.0-RC0-blade-UNOFFICIAL-signed.zip) or the info shown in settings->about phone->cyanogenmod version, it does seem to change the string that rommanager reports though. i guess now they're using ro.cm.version ?
 PRODUCT_PROPERTY_OVERRIDES += \

   ro.cm.version=$(CM_VERSION) \

-  ro.modversion=$(CM_VERSION)

+  ro.modversion=$(CM_VERSION)-sej$(shell date +%Y%m%d)

post-839039-0-19964100-1334148465_thumb.

Edited by sej7278
Link to comment
Share on other sites

Guest sm4tik

no its just the hdpi in the build i did yesterday.

Ok, thanks. That should be enough to fit 160MB with mini-gapps withouth having to delete anything, am I right?

Link to comment
Share on other sites

Guest asm19

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?

Hi sej7278,

I was now seeing the directories and I think that your directory is wrong, I have the file in envsetup.sh /coldfusionx/vendor/cm/ not in /coldfusionx/cm9/vendor/cm

I'm just doing a backup and see if I compile compiles without problems.

Edited by asm19
Link to comment
Share on other sites

Guest sej7278

Hi sej7278,

I was now seeing the directories and I think that your directory is wrong, I have the file in envsetup.sh /coldfusionx/vendor/cm/ not in /coldfusionx/cm9/vendor/cm

I'm just doing a backup and see if I compile compiles without problems.

the cm9 subdirectory is where the cm9 sourcecode should be checked out into.

the coldfusionx directory above that is where tilal's githubs go.

you then merge them using the rsync commands.

looks like you've got the githubs and cm9 in the same directory, but even then build.sh shouldn't be in vendor/cm/ it should be in build/

you should have:

post-839039-0-24749100-1334168289_thumb.

Edited by sej7278
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.