Jump to content

How to run CM7 on a Gen2 phone


Guest kallt_kaffe

Recommended Posts

Guest kallt_kaffe

In order to run CM7 on a Gen2 phone the kernel and the RIL libs needs replacing.

The attached (clockwork installable) file will convert an existing CM7 install to make it work on Gen2 phones.

This is what it does:

  • Replaces /system/lib/libcm.so with Gen2 version
  • Replaces /system/lib/libril-qc-1.so with Gen2 version
  • Removes /system/app/RomManager.apk (precaution as we do NOT want to install Gen1 Clockwork on Gen2 phones)
  • Dumps & unpacks existing boot.img and replaces kernel (but keeps original ramdisk) and reflashes it. (Koush wrote the script, I just modified it slightly to fit this purpose)


    Do keep in mind that this is NOT the original CM7 kernel so do not bugreport stuff that may be kernel related to the CM7 project

Edited by kallt_kaffe
Link to comment
Share on other sites

Guest whatcolour

brilliant!!!! was just about to pm you regarding such a kernel :-)

the previously one didn't have wake-lock placed on the proximity sensor, which brought back the "blank screen problem" during phone calls

Link to comment
Share on other sites

Guest goatee

KK, you're a star! I've got a GEN1, but I've been reluctant to recommend the OSF to people because of the lack of choice of ROMs. Having the option of CM7 is awesome. I'm on RC4, and have found it a fast, stable day-to-day ROM.

Link to comment
Share on other sites

Guest kallt_kaffe
brilliant!!!! was just about to pm you regarding such a kernel :-)

the previously one didn't have wake-lock placed on the proximity sensor, which brought back the "blank screen problem" during phone calls

Hmm... I don't think this one is any different. I should propably pull Tom's kernel and modify it for Gen2 instead and make a new update later, but this one will have to do for now.

Link to comment
Share on other sites

Guest whatcolour
Hmm... I don't think this one is any different. I should propably pull Tom's kernel and modify it for Gen2 instead and make a new update later, but this one will have to do for now.

thanks anyway :-)

I have used your previous kernel on RC4 since it was released and found no major problems at all in comparison with the CM7 kernel, apart from the proximity issue. To fix proximity, I think the following are all you need:

https://github.com/TomGiordano/kernel_zte_b...3fa8920fe5ea410

https://github.com/TomGiordano/kernel_zte_b...5ee5d22e4ea6fdd

Link to comment
Share on other sites

Guest unrandomsam
Hmm... I don't think this one is any different. I should propably pull Tom's kernel and modify it for Gen2 instead and make a new update later, but this one will have to do for now.

Good idea

I started having a look at this yesterday.

diff --git a/arch/arm/mach-msm/board-zte-blade.c b/arch/arm/mach-msm/board-zte-b

index 184280b..40b952e 100755

--- a/arch/arm/mach-msm/board-zte-blade.c

+++ b/arch/arm/mach-msm/board-zte-blade.c

@@ -106,7 +106,7 @@

 #endif


 #ifdef CONFIG_ANDROID_RAM_CONSOLE

-#define MSM_RAM_CONSOLE_PHYS  (PHYS_OFFSET - 0x100000)

+#define MSM_RAM_CONSOLE_PHYS  0x02500000

 #define MSM_RAM_CONSOLE_SIZE  SZ_1M

 #endif


[samw@box] (~/kernel_zte_blade)%

[samw@box] (~/kernel_zte_blade)% git diff

diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig

index 1cedb49..2b89532 100755

--- a/arch/arm/mach-msm/Kconfig

+++ b/arch/arm/mach-msm/Kconfig

@@ -357,7 +357,7 @@ config MSM_STACKED_MEMORY

 #ZTE_BOOT_HUANGYANJUN_20100903_01 0x2A00000 ->0x02600000

 config PHYS_OFFSET

		hex

-	   default "0x02A00000" if !MSM_STACKED_MEMORY

+	   default "0x02600000" if !MSM_STACKED_MEMORY

		default "0x00000000" if ARCH_QSD8X50 && MSM_SOC_REV_A

		default "0x20000000" if ARCH_QSD8X50

		default "0x40200000" if ARCH_MSM8X60

diff --git a/arch/arm/mach-msm/Makefile.boot b/arch/arm/mach-msm/Makefile.boot

index 54af432..eccd6c0 100644

--- a/arch/arm/mach-msm/Makefile.boot

+++ b/arch/arm/mach-msm/Makefile.boot

@@ -9,8 +9,8 @@ params_phys-$(CONFIG_ARCH_MSM7X25)	  := 0x00200100

 initrd_phys-$(CONFIG_ARCH_MSM7X25)	 := 0x0A000000


 # MSM7x27

-   zreladdr-$(CONFIG_ARCH_MSM7X27)	 := 0x02A08000

-params_phys-$(CONFIG_ARCH_MSM7X27)	 := 0x02A00100

+   zreladdr-$(CONFIG_ARCH_MSM7X27)	 := 0x02608000

+params_phys-$(CONFIG_ARCH_MSM7X27)	 := 0x02600100

 initrd_phys-$(CONFIG_ARCH_MSM7X27)	 := 0x0A000000


 # MSM7x30

diff --git a/arch/arm/mach-msm/board-zte-blade.c b/arch/arm/mach-msm/board-zte-b

index 184280b..40b952e 100755

--- a/arch/arm/mach-msm/board-zte-blade.c

+++ b/arch/arm/mach-msm/board-zte-blade.c

@@ -106,7 +106,7 @@

 #endif


 #ifdef CONFIG_ANDROID_RAM_CONSOLE

-#define MSM_RAM_CONSOLE_PHYS  (PHYS_OFFSET - 0x100000)

+#define MSM_RAM_CONSOLE_PHYS  0x02500000

 #define MSM_RAM_CONSOLE_SIZE  SZ_1M

 #endif

Thats all I changed from

https://github.com/TomGiordano/kernel_zte_blade

using the default config

I could do with a working toolchain (Using the latest sourcery lite arm toolchain)

(I would just build cyanogenmod fully from scratch but I don't have enough free space on my VPS unfortunately (but there I have much more cpu than at home so the builds are fast).

The best thing about this kernel so far (I am using the ahb overclock one)

is afaict

THE GPS SHUTDOWN BUG IS FIXED !!!!

(Worth losing 91Mhz for this)

Link to comment
Share on other sites

Guest whatcolour

I'm sure KK will release a version with the proximity sensor fixed in due time.

For now, I've compiled a variant of KK's kernel with the wake-lock on proximity sensor in place. Tested over a few short and long calls and the screen wakes up every time!

Please find the updated zip attached.

cm7_gen2_converter_ahb_wakelock.zip

Link to comment
Share on other sites

Guest css771

Could I know what I need to change to build a gen2 compatible kernel?

Edit: nvm. Figured it out with some help. And hcdrjacob says that official gen2 cm7 is coming soon.

Edited by css771
Link to comment
Share on other sites

Guest kallt_kaffe
I'm sure KK will release a version with the proximity sensor fixed in due time.

For now, I've compiled a variant of KK's kernel with the wake-lock on proximity sensor in place. Tested over a few short and long calls and the screen wakes up every time!

Please find the updated zip attached.

Did you just add the wakelock or did you also disable CONFIG_SERIAL_CORE?

I wonder if both is really needed?

Link to comment
Share on other sites

Guest whatcolour
Did you just add the wakelock or did you also disable CONFIG_SERIAL_CORE?

I wonder if both is really needed?

just the wakelock commit. regarding the gps shutdown issue, I personally have never experienced such but it has been a 'hottish' topic in the CM7 nightly thread -- the current CM7 kernel makes the phone shutting down unwillingly after a period of gps use (a test kernel made by TomG with hardcoded battery temperature reading provisionally claims to have fixed the problem)

Link to comment
Share on other sites

Guest crblues

First of all, KK: YOU ARE MY HERO! :D B) ;) :D :D

Next, just to clarify, let me see if I understood correctly... First I install cm7 and then BEFORE I reboot I run this script? Is this correct?

Thanks in advance

Link to comment
Share on other sites

Guest kallt_kaffe
Next, just to clarify, let me see if I understood correctly... First I install cm7 and then BEFORE I reboot I run this script? Is this correct?

Correct.

I'd recommend this order:

- Install CM7

- Install the Gen2 converter

- Install Google apps

You propably can install Google apps before the converter but if you are running on a 128Mb system partition we are low on space so it's better do run the convert first as it deletes RomManager.apk so in a low space scenario the chance of success is better. However with the current size of CM7 I do not think it is an issue.

Edited by kallt_kaffe
Link to comment
Share on other sites

Guest kallt_kaffe

Updated version in first post. Added suggested proximity fixes and fix to make CPU-overclocking play nice with the built in overclocking in CM7.

Link to comment
Share on other sites

Guest whatcolour
Updated version in first post. Added suggested proximity fixes and fix to make CPU-overclocking play nice with the built in overclocking in CM7.

FAB!!

Link to comment
Share on other sites

Guest CaptainSpectacular

Hi, thanks for all your work kallt_kaffe.

Can I flash this one and safely restore my SS RLS4b if I have any troubles ?

Thanks.

Link to comment
Share on other sites

Guest kallt_kaffe
Hi, thanks for all your work kallt_kaffe.

Can I flash this one and safely restore my SS RLS4b if I have any troubles ?

Thanks.

Yes

Link to comment
Share on other sites

Guest solidchips

Thanks KK, works for me. installed CM7 N36 then cm7_gen2_converter_ver2.

Using it for more than an hour, quick and smooth.

Edited by solidchips
Link to comment
Share on other sites

Guest Superfuzz

Uhm, why not include this fix in official cyanogen? I mean the rom isn't stable yet so they could add it, this would help a lot of people obviously.

Edited by Superfuzz
Link to comment
Share on other sites

Guest Frankish
Uhm, why not include this fix in official cyanogen? I mean the rom isn't stable yet so they could add it, this would help a lot of people obviously.

Jacob is already planning to afaik.

Link to comment
Share on other sites

Guest solidchips

I was on SS RLS3, everthing was fine. I installed CM7-N36 on GEN2 blade and windows 7 now unable to recognize my blade.

Tried updating the drivers several times but in vain.

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.