Jump to content


Photo

Compiling CM9 (and maybe CM10) for Blade

* * * * * 7 votes

  • Please log in to reply
797 replies to this topic

#41
sej7278

sej7278

    Hardcore

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

sej7278, what better way to compile the kernel in order to make a "patch"?


in theory just follow the steps for compiling the kernel (#8) and that should be it, as tilal is not bothering with kernel modules at the moment (e.g. zram.ko, cifs.ko etc.) then complete the rest of the rom compile steps.

if you want to make a flashable zip then my cm7 instructions should still be valid (do a backup first!)

edit: flashable zip of a kernel i compiled with the bluetooth tethering fixed: download

Edited by sej7278, 12 April 2012 - 04:10 PM.

  • 0

#42
asm19

asm19

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Gender:Male
  • Location:Portugal
  • Devices:ZTE-Blade & Huawei U8800
  • Twitter:@miguel_salmeida
sej7278, did step #8, and has compiled the rom. Now I want to do a patch type your btkernel-signed.zip for this have to do so: blog starting from step 4 to 7, right?

In this step 7, is different for cm9 or not?
Thanks


Edit: Each time we build a rom we have to erase the files in the folder:
~/coldfusionx/cm9/out/target/product/blade ?
Is that for what seemed like if you compile with the old files as he takes these files and does not build new, i am wrong?

Edited by asm19, 12 April 2012 - 10:34 PM.

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

#43
sej7278

sej7278

    Hardcore

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

sej7278, did step #8, and has compiled the rom. Now I want to do a patch type your btkernel-signed.zip for this have to do so: blog starting from step 4 to 7, right?

In this step 7, is different for cm9 or not?
Thanks


Edit: Each time we build a rom we have to erase the files in the folder:
~/coldfusionx/cm9/out/target/product/blade ?
Is that for what seemed like if you compile with the old files as he takes these files and does not build new, i am wrong?


just unzip my patch - extract META-INF, delete the CERT and MANIFEST files, replace my boot.img with your boot.img, then zip them up and sign them:

unzip btkernel-signed.zip
rm META-INF/{CERT*,MANIFEST.MF}
rm boot.img
cp /path/to/your/boot.img .
zip kernel.zip META-INF boot.img 
java -jar signapk.jar testkey.x509.pem testkey.pk8 kernel.zip kernel-signed.zip

the test keys are in ~/coldfusionx/cm9/build/target/product/security/ and signapk.jar will be in ~/coldfusionx/cm9/out/host/linux-x86/framework/ after you've compiled the rom. i usually keep a copy of signapk.jar somewhere so i don't have to recompile a rom just to get it.

the instructions on my blog are for if you're only compiling a kernel and not a whole rom and want to patch that into an old boot.img, its a bit over-the-top for this exercise.

and yes i recommend deleting out/ for every new compile as every time i don't do it, i get problems. you can do a "make installclean" but it doesn't do the job really - for instance it won't replace the kernel file in out/, it won't re-read environment variables etc; it just seems to delete the *.img files.

Edited by sej7278, 12 April 2012 - 11:28 PM.

  • 0

#44
asm19

asm19

    Enthusiast

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

just unzip my patch - extract META-INF, delete the CERT and MANIFEST files, replace my boot.img with your boot.img, then zip them up and sign them:

unzip btkernel-signed.zip
rm META-INF/{CERT*,MANIFEST.MF}
rm boot.img
cp /path/to/your/boot.img .
zip kernel.zip META-INF boot.img 
java -jar signapk.jar testkey.x509.pem testkey.pk8 kernel.zip kernel-signed.zip

the test keys are in ~/coldfusionx/cm9/build/target/product/security/ and signapk.jar will be in ~/coldfusionx/cm9/out/host/linux-x86/framework/ after you've compiled the rom. i usually keep a copy of signapk.jar somewhere so i don't have to recompile a rom just to get it.

the instructions on my blog are for if you're only compiling a kernel and not a whole rom and want to patch that into an old boot.img, its a bit over-the-top for this exercise.

and yes i recommend deleting out/ for every new compile as every time i don't do it, i get problems. you can do a "make installclean" but it doesn't do the job really - for instance it won't replace the kernel file in out/, it won't re-read environment variables etc; it just seems to delete the *.img files.



I compiled the kernel, but I have to get it to compile all the rom? I compiled all the rom but keep with with information tilal in about phone -> kernel version that means I'm not using my kernel, right? I think ill have compiled the kernel, it took little time and so it still appears machine information of the tilal. Compiling again and took much longer. Now he must have been well tested yet.
zImage is not the end or is it my kernel? How can I get the boot.img without compiling the rom? Or even have to compile the rom may have to the whole?


Edit: That is, I compile the kernel but then i add in the compilation of the rom. What doing wrong?

Edited by asm19, 13 April 2012 - 02:19 AM.

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

#45
asm19

asm19

    Enthusiast

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

I compiled the kernel, but I have to get it to compile all the rom? I compiled all the rom but keep with with information tilal in about phone -> kernel version that means I'm not using my kernel, right? I think ill have compiled the kernel, it took little time and so it still appears machine information of the tilal. Compiling again and took much longer. Now he must have been well tested yet.
zImage is not the end or is it my kernel? How can I get the boot.img without compiling the rom? Or even have to compile the rom may have to the whole?

Edit: That is, I compile the kernel but then i add in the compilation of the rom. What doing wrong?


sej7278
this is why your explicaste here:
http://android.modac...ost__p__1933065
ie, updated the directory android_device_zte_common / but now I have to copy the files to cm9/device/zte/common/ ?
I have not copied the files to the directory cm9, I think that's what I'm doing wrong...

Edited by asm19, 13 April 2012 - 10:50 AM.

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

#46
asm19

asm19

    Enthusiast

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

Edited by asm19, 13 April 2012 - 10:50 AM.

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

#47
n3um4

n3um4

    Newbie

  • MoDaCo Silver
  • Pip
  • 6 posts
how much space do you need during the compilation? i have a shared root box and i'd like to avoid resizing the volumes.

thx ;)

  • 0

#48
sej7278

sej7278

    Hardcore

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

how much space do you need during the compilation? i have a shared root box and i'd like to avoid resizing the volumes.


not sure about temp space (e.g. ~/.ccache) or the out/ directory as i've not got a build going right now. but the cm9 and coldfusionx source comes to 15gb.

  • 0

#49
viluDense

viluDense

    Newbie

  • Members
  • Pip
  • 30 posts
  • Devices:ZTE Skate
Hi, I'm doing that for zte SKATE what i need to change?

  • 0

#50
asm19

asm19

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Gender:Male
  • Location:Portugal
  • Devices:ZTE-Blade & Huawei U8800
  • Twitter:@miguel_salmeida
sej7278, I have a doubt. I compiled the kernel, which is named zImage. I copied to cp ~ /coldfusionx/cm9/device/zte/blade/kernel. When compiling the rom he should not have come out with the kernel I compiled? It appears to me that continues to the kernel compile tilal...

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

#51
пенис

пенис

    Regular

  • Members
  • PipPip
  • 70 posts
Hope Sej can get full fart with ICS. Posted Image

Edited by пенис, 13 April 2012 - 05:21 PM.

  • 0
Dedicated to be a Blade user :)
Running on CM10.1

#52
sej7278

sej7278

    Hardcore

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

sej7278, I have a doubt. I compiled the kernel, which is named zImage. I copied to cp ~ /coldfusionx/cm9/device/zte/blade/kernel. When compiling the rom he should not have come out with the kernel I compiled? It appears to me that continues to the kernel compile tilal...


i had that when i didn't delete my old out/ directory. try deleting out/, copy zImage to kernel and rebuild the rom.

  • 0

#53
asm19

asm19

    Enthusiast

  • Members
  • PipPipPip
  • 213 posts
  • Gender:Male
  • Location:Portugal
  • Devices:ZTE-Blade & Huawei U8800
  • Twitter:@miguel_salmeida
I formatted the pc and now I'm doing the repo sync Cyanogen, but since yesterday I can not. It gives me this error:

... A new repo command ( 1.15) is available.
... You should upgrade soon:

    cp /home/asm/coldfusionx/cm9/.repo/repo/repo /home/asm/bin/repo

fatal: Not a git repository: '/home/asm/coldfusionx/cm9/.repo/projects/abi/cpp.git'
Fetching projects:  98% (245/250)  fatal: Not a git repository: '/home/asm/coldfusionx/cm9/.repo/projects/abi/cpp.git'
error: Cannot fetch platform/abi/cpp


I've tried repo sync -f but still does not give anyone know an alternative?

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

#54
shmizan

shmizan

    Addict

  • Members
  • PipPipPipPipPip
  • 574 posts
  • Devices:ZTE Blade
you should probably wait for some more intelligent response but here goes:
try https instead of git before the repo sync (some days ago I had to do this since git stopped working for me after a few syncs)
repo init -u https://github.com/CyanogenMod/android.git -b ics
 

Edited by shmizan, 15 April 2012 - 12:55 PM.

  • 0

Orange San Francisco, Upgraded to Gen 2 with TPT Helper (custom partition layout: 150-sys, 302-data, 4-cache)
CyanogenMod 10


#55
asm19

asm19

    Enthusiast

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

you should probably wait for some more intelligent response but here goes:
try https instead of git before the repo sync (some days ago I had to do this since git stopped working for me after a few syncs)

repo init -u https://github.com/CyanogenMod/android.git -b ics


It did not work, remains the same. Posted Image

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

#56
sej7278

sej7278

    Hardcore

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

It did not work, remains the same. Posted Image


did you do as the message said and upgrade your copy of repo?

cp /home/asm/coldfusionx/cm9/.repo/repo/repo /home/asm/bin/repo

  • 0

#57
asm19

asm19

    Enthusiast

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

did you do as the message said and upgrade your copy of repo?

cp /home/asm/coldfusionx/cm9/.repo/repo/repo /home/asm/bin/repo


It seems to me that copy no problems, does not report any messages.

Edit: Still the same error:

fatal: Not a git repository: '/home/asm/coldfusionx/cm9/.repo/projects/abi/cpp.git'

Done. Problem solved

Edited by asm19, 15 April 2012 - 05:17 PM.

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

#58
sej7278

sej7278

    Hardcore

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

It seems to me that copy no problems, does not report any messages.

Edit: Still the same error:

fatal: Not a git repository: '/home/asm/coldfusionx/cm9/.repo/projects/abi/cpp.git'

Done. Problem solved


how did you fix it - delete and resync or was it just a case of downloading the new repo script?

  • 0

#59
asm19

asm19

    Enthusiast

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

how did you fix it - delete and resync or was it just a case of downloading the new repo script?

Yes:

Delected
~/bin and ~/coldfusionx

Create again:

mkdir -p ~/coldfusionx/cm9/device/zte/{blade,common}
mkdir -p ~/coldfusionx/cm9/vendor/zte/blade
mkdir ~/bin

Create again:

cd ~/coldfusionx/cm9/
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

REBOOT

Download CM9:

repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
cd ..

Now I have a problem compiling:

make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/blade/system/app/RomManager.apk'.  Stop.
make: *** Waiting for unfinished jobs....

I am back to do ./get-prebuilts compiling to see if the error is resolved, if not what do you advise?

Edited by asm19, 15 April 2012 - 08:07 PM.

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

#60
shmizan

shmizan

    Addict

  • Members
  • PipPipPipPipPip
  • 574 posts
  • Devices:ZTE Blade
I had that too just a few hours ago. when doing the prebuilds command, it creates the proprietary folder inside
~/coldfusionx/cm9
INSTEAD of inside
~/coldfusionx/cm9/vendor/cm
copy it across and.. well I hope it manages because honestly I'm still compiling for a few hours now!

Edited by shmizan, 15 April 2012 - 08:26 PM.

  • 1

Orange San Francisco, Upgraded to Gen 2 with TPT Helper (custom partition layout: 150-sys, 302-data, 4-cache)
CyanogenMod 10





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users