[Kernel] TRIM: Fast and Stable CyanogenMod 11 on the Galaxy S2 AT&T i777

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
i heard an i9100 rom can be used on these devices if you overwrite it's kernel with an i777 kernel.

is it true? i can spew out a current i777 kernel, anybody wants to try?
 
  • Like
Reactions: dashrendar

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
i heard an i9100 rom can be used on these devices if you overwrite it's kernel with an i777 kernel.

is it true? i can spew out a current i777 kernel, anybody wants to try?
I'm interested as I'm planning on porting a i9100 CM11 M12 build to I777, using one of the guides here. I was planning on using a kernel from a previous unofficial CM11 ROM for i777. The issue is these don't have the TRIM and/or FPBug fixes. If you spew something out, I would be more than willing to try it. However, I cannot guarantee that I would do it immediately (i have a 3-year-old and a 3-month old and their life schedules are unpredictable). I was hoping this holiday weekend.
 
  • Like
Reactions: Lanchon

cyril279

Senior Member
Jun 3, 2013
987
2,077
0
i heard an i9100 rom can be used on these devices if you overwrite it's kernel with an i777 kernel.

is it true? i can spew out a current i777 kernel, anybody wants to try?
Yes, it's true. As a result, many i777 users don't bother with ports, they simply shop in the i9100 forum, and keep an appropriate kernel on the SD card.

-Cyril
 
  • Like
Reactions: david72262

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
I'm interested as I'm planning on porting a i9100 CM11 M12 build to I777, using one of the guides here. I was planning on using a kernel from a previous unofficial CM11 ROM for i777. The issue is these don't have the TRIM and/or FPBug fixes. If you spew something out, I would be more than willing to try it. However, I cannot guarantee that I would do it immediately (i have a 3-year-old and a 3-month old and their life schedules are unpredictable). I was hoping this holiday weekend.
please try this kernel:
http://forum.xda-developers.com/showpost.php?p=57680909&postcount=6
if it works, i'll output a trim kernel.

Yes, it's true. As a result, many i777 users don't bother with ports, they simply shop in the i9100 forum, and keep an appropriate kernel on the SD card.

-Cyril
thank you!
so the kernels/recoveries are modded to accept flashing of the i9100 zips? usually i9100 zips will not flash in i777 (assertion failure, from assert coded in the zip), but the i777 recovery could be hacked to make it work.
 

cyril279

Senior Member
Jun 3, 2013
987
2,077
0
I usually simply remove the assert lines from the updater script, if the installation fails because of device type.

I was under the impression that once the i9100 firmware (+i777 kernel) was installed, the resulting build.prop would allow subsequent i9100 installations without issue.
^^ I'm not 100% sure about that one, I don't run i9100 firmware often.

... thank you!
so the kernels/recoveries are modded to accept flashing of the i9100 zips? usually i9100 zips will not flash in i777 (assertion failure, from assert coded in the zip), but the i777 recovery could be hacked to make it work.
 
  • Like
Reactions: david72262

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
I usually simply remove the assert lines from the updater script, if the installation fails because of device type.

I was under the impression that once the i9100 firmware (+i777 kernel) was installed, the resulting build.prop would allow subsequent i9100 installations without issue.
^^ I'm not 100% sure about that one, I don't run i9100 firmware often.
i suppose not. the recovery and kernel come together and dont read build.prop at all. that info must be replicated somewhere in the ramdrive with the recovery. so once you boot the recovery you get the i777 props.

anyway, i can fix that. the important thing is whether this kernel works or not.
thanks!
 
  • Like
Reactions: david72262

rogersb11

Senior Member
Nov 18, 2013
3,345
6,888
0
Indianapolis
i suppose not. the recovery and kernel come together and dont read build.prop at all. that info must be replicated somewhere in the ramdrive with the recovery. so once you boot the recovery you get the i777 props.

anyway, i can fix that. the important thing is whether this kernel works or not.
thanks!
Pulls device model from the recovery default.prop
 

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
I usually simply remove the assert lines from the updater script, if the installation fails because of device type.

I was under the impression that once the i9100 firmware (+i777 kernel) was installed, the resulting build.prop would allow subsequent i9100 installations without issue.
^^ I'm not 100% sure about that one, I don't run i9100 firmware often.
Is porting as simple as that? There are a couple of guides here that indicate the need to copy/update things like:
sec_touchkey.kl
modules
boot.img/zImage (I think this one is a given)

If I flash an I777 kernel (or replace the boot.img in the I9100 zip), I was under the impression that I need to do the other two things. Is this not true? Do you confirm that just flashing an I777 satisfies the port?
 

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron

Attachments

  • Like
Reactions: cyril279

cyril279

Senior Member
Jun 3, 2013
987
2,077
0
Is porting as simple as that? There are a couple of guides here that indicate the need to copy/update things like:
sec_touchkey.kl
modules
boot.img/zImage (I think this one is a given)

If I flash an I777 kernel (or replace the boot.img in the I9100 zip), I was under the impression that I need to do the other two things. Is this not true? Do you confirm that just flashing an I777 satisfies the port?
Flashing an i777kernel.zip does all of that (check the updater.script).

The typical i777kernel.zip installation procedure extracts a few files to /system, (which includes the touchkey file), then flashes a zimage to the kernel/recovery partition.

The steps of the guides are correct, if you want to provide a firmware.zip for OTHERS to simply flash-and-go.

-Cyril
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Hi Lanchon,

I just flashed a ported I9100 CM11 M12 ROM with your test FPBug kernel embedded into the ZIP. Flashed OK and booted OK.

I attached a shot of the About Phone screen showing the Kernel version.
ok thats good, thanks.

what exactly do you mean by "ported"? please dont leave out anything!
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
Flashing an i777kernel.zip does all of that (check the updater.script).

The typical i777kernel.zip installation procedure extracts a few files to /system, (which includes the touchkey file), then flashes a zimage to the kernel/recovery partition.

The steps of the guides are correct, if you want to provide a firmware.zip for OTHERS to simply flash-and-go.

-Cyril
if i were to publish a kernel i need to do that too. please point me to one or two examples of flashable kernels you trust so i can look at their scripts. thank you!
 

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
ok thats good, thanks.

what exactly do you mean by "ported"? please dont leave out anything!
I mean I grabbed a i9100 CM11 M12 ROM and modified the ROM's zip to include the boot.img from your kernel ZIP. I also did other modifications to the system to make it I777-compatible.

Is this OK or does invalidate your kernel or its fix? Please let me know if I need to do something else to have better confidence in the installation. For example, would you like me to simply install your kernel's ZIP at the end of all this just to be sure?
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
I mean I grabbed a i9100 CM11 M12 ROM and modified the ROM's zip to include the boot.img from your kernel ZIP. I also did other modifications to the system to make it I777-compatible.

Is this OK or does invalidate your kernel or its fix? Please let me know if I need to do something else to have better confidence in the installation. For example, would you like me to simply install your kernel's ZIP at the end of all this just to be sure?
lol ok, i wanted you to point me to those mods :) the installation is fine. but fyi this kernel has fpbug fix but NO trim.
 
  • Like
Reactions: kdtoan123

dashrendar

Senior Member
Jun 20, 2012
184
47
0
Akron
lol ok, i wanted you to point me to those mods :) the installation is fine. but fyi this kernel has fpbug fix but NO trim.
I9100 CM11 M12 ROM

CM11-I777-SNAPSHOT-M10 ROM from which I grabbed files like the sec_touchkey.kl and modules.

Regarding a kernel ZIP, I don't usually flash that separately since it's already part of the CM11 ROM (I just use the default CM). The only kernel I flashed in the past is @rogersb11's SHIFT kernel v5.0 but it was unstable for me (occasional audio crackling when listening to music) so I reverted to CM11's.

Hope this helps!

PS: I am yearning for the TRIM version of this kernel because I am curious the difference, and also still squeezing every ounce of stability and performance out of this phone before I switch to something else. :D
 
Last edited:
  • Like
Reactions: Lanchon

cyril279

Senior Member
Jun 3, 2013
987
2,077
0
For example:
AJK 4.9 :: https://goo.im/devs/ajnewkirk/AJK/v4.9/AJK_v4.9_AOSP.zip/
RenderBroken :: https://www.mediafire.com/folder/7wdbsj21sn5ws//Kernels#7xmtu8ecd86m1
Shift Eternal :: https://www.androidfilehost.com/?fid=95784891001605000

The updater-scripts of the two latter kernels are both derived from the AJK kernel updater-script.

-Cyril

if i were to publish a kernel i need to do that too. please point me to one or two examples of flashable kernels you trust so i can look at their scripts. thank you!
 

Lanchon

Senior Member
Jun 19, 2011
2,703
4,455
0
I9100 CM11 M12 ROM

CM11-I777-SNAPSHOT-M10 ROM from which I grabbed files like the sec_touchkey.kl and modules.

Regarding a kernel ZIP, I don't usually flash that separately since it's already part of the CM11 ROM (I just use the default CM). The only kernel I flashed in the past is @rogersb11's SHIFT kernel v5.0 but it was unstable for me (occasional audio crackling when listening to music) so I reverted to CM11's.

Hope this helps!

PS: I am yearning for the TRIM version of this kernel because I am curious the difference, and also still squeezing every ounce of stability and performance out of this phone before I switch to something else. :D
so you are saying that you use the i9100 kernel on the i777? this can't work! take a look:

config SND_SOC_MC1N2_MIC_ADC_SWAP
bool "MC-1N2 Swap microphone ADCs"
depends on TARGET_LOCALE_NAATT_TEMP
default n
help
SGH-I777 microphone configuration is swapped compared to GT-I9100.
When using I9100 libaudio, this causes the microphones to not
work properly in calls. This allows proper microphone operation
when SGH-I777 is used with GT-I9100 libaudio.​

~/android/system/kernel/samsung/smdk4412 $ diff arch/arm/configs/cyanogenmod_i9100_defconfig arch/arm/configs/cyanogenmod_i777_defconfig
432c432
< # CONFIG_TARGET_LOCALE_NAATT_TEMP is not set
---
> CONFIG_TARGET_LOCALE_NAATT_TEMP=y
436c436
< CONFIG_TARGET_LOCALE_EUR=y
---
> # CONFIG_TARGET_LOCALE_EUR is not set
2266a2267
> CONFIG_SND_SOC_MC1N2_MIC_ADC_SWAP=y

Code:
#ifdef CONFIG_SND_SOC_MC1N2_MIC_ADC_SWAP
void swap_mic_adc_paths(MCDRV_PATH_INFO* psPathInfo)
{
    UINT8 temp_state;

    temp_state = psPathInfo->asAdc0[0].abSrcOnOff[0];
    psPathInfo->asAdc0[0].abSrcOnOff[0] = psPathInfo->asAdc0[1].abSrcOnOff[0];
    psPathInfo->asAdc0[1].abSrcOnOff[0] = temp_state;
}
#endif
it seems the analog paths to ADCs 0 & 1 must be swapped for the i777. if you dont do this, the wrong analog input (mic?) will be used under some circumstances. i'm sure you can google this for details (i havent).

i'll make a trim kernel when i know how.
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone