Jump to content


Photo

Kernel Experiment - 4.0 updated 2012.05.28


198 replies to this topic

#1
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts
For those who are adventurous and are willing to try new things to improve your phone, I have produced some binary kernels if you don't want to do the compilation yourselves. Please note these are not for beginners and would require some knowledge and skills to properly set it up. More importantly, although unlikely, it may brick your phone and render it completely wasted. It comes with absolutely no guarantee and no warranty whatsoever. I am not responsible for any damages done. For those who is willing to take the risk, proceed below.

Brief changelog
Not all builds contain all features - see build info for details.

4.0: ae49c12

Lack of time for thorough testing - but hope you enjoy this build.

  • AHB166 builds have a higher default cpu scaling min frequency to eliminate screen flicker completely - see special instruction below if you need to lower it.
  • Tuned the default conservative scaling governor so that it will raise and drop frequency much quicker in response to system load changes - a smoother screen refresh is expected but at the expense of more power.
  • Kexec a.k.a. Never See WinMo Again (Almost). See special instruction below for details.
  • Fix camera module unloading crash.
  • Bonus: Not strictly kernel related (though used by Kexec) - a bionic (libc.so) fix that prevents background executed commands from stalling. This fixes apps such as Titanium Backup and AdAway that use su in the background. See special instruction for Kexec.
Download and build info


3.0: a3b8d7f

  • Hold key (a.k.a Lock key) wakeup - end key also works. See sample keymap file in special instructions.
  • 24bpp framebuffer in low CPU frequency (AHB 166MHz version) will no longer flicker.
  • FM radio will not sleep when screen is off.
  • Kill key combo changed to VolDown+Back+Menu (note: WinMo keymapping) to avoid VolDown+Lock that also rebooted previously.
  • Performance will not drop after sleep.
  • 3MB less memory for some builds so that white squares can be eliminated.
  • Wifi should work now.
  • CPUidle driver backported - not sure if it helps to reduce battery consumption.
Download and build info


2.0: 448dfeb

  • Rearranged memory layout giving either 13/16/32MB more free RAM memory at the expense of 3D (if you don't do any 3D app, 32MB is good for you while 13/16MB versions are safe as far as AB is concerned.)
  • Some builds are AHB overclocked from 133Mhz to 166Mhz while CPU underclocked from 800Mhz to 666Mhz - this combination (666/166) gives the best memory bandwidth ~25% more than the default (800/133) combo, with the side benefit of better IO and 2D/3D. Since the max voltage applied is even lower than for the original 800Mhz kernel, the risk should be minimal. Some benchmark figures here.
  • Added Z-RAM - which supersedes compcache/ramzswap, together with Snappy, an extremely fast compression algorithm that gives more RAM by compressing part of the memory and use it as a swap space (~2.6x compression ratio.) I have benchmarked it and it's even faster than swap partition in terms of read/write while still maintaining good interactivity and performance. Benchmark results here - all in MB/s.
  • 24bpp framebuffer (truecolor display) driver - the color gradient banding in the original kernel using 16bpp is very bad - like the dialer grey / blue FB logo page. Using this 24bpp framebuffer will make the display slightly slower but the screen is prettier than ever (even better than WinMo's 16bpp.) See some bad 16bpp sample here.
  • Full kernel preemption enabled for even better responsiveness, and at the same time HZ reduced to 200 in an attempt to save power.
Download and build info


1.0: 5cd78c01 (directly copy from here for the purpose of consolidation)

  • Camera key crash fix when simultaneously pressing camera key with 2 other buttons
  • HZ=500 and voluntary preemption for improved interactivity
  • Widget scrolling speed increase
  • Alternate USB driver that is less prone to connection problems esp during boot up
  • Kexec support to load kernel within userspace and to bypass windows (still needs work)
  • Added ramzswap aka compcache module
  • Ram console to log kernel messages that survive reboots
  • Hardware watchdog to reset in case of kernel crash
  • Key combos to hard reboot (lock + volup + camera) that save the time to pull out battery
  • Turned on some compiler optimization
  • Misc fixes to oops, deadlock, leaks, gpio, ...
  • Bonus1: Fix calling waiting and call conferencing here
  • Bonus2: Fix extremely long Android boot time here
Download


Instructions

These are the brief, general, and grossly simplified steps:
  • Pick your poision - choose a flavor that suit your taste.
  • Backup your original stuff and files that will be replaced in later steps
  • Download and unpack the corresponding zImage to the same directory where you would start haret.exe.
  • Cleanup the existing /modules/ directory in your root filesystem, either by deleting all files inside or by renaming the old name and creating a new one.
  • Download and unpack the corresponding kernel modules (kmod) and unpack the files to the /modules/ directory in your root filesystem.
  • Observe any build specifc info in their respective post.
  • Follow the below special instructions if applicable to your build.
  • Start your OS, and profit.
Special Instructions for Kexec (4.0 or above)
Spoiler


Special Instructions for Lowering Default Minimum Frequency for AHB166 Builds (4.0 or above)
Spoiler


Special Instructions for Hold Key Wakeup (3.0 or above)
Spoiler


Special Instructions for Big Memory (2.0 or above)
Spoiler


Special Instructions for Z-RAM (2.0 or above)
Spoiler

Edited by ipaq3870, 01 June 2012 - 04:50 PM.

  • 5

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#2
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts
Caveats
  • Some have problem getting phone service in its first boot - try 2.0 builds to see if it works. It never occurred to me - so if the new ones still do not work, post a dmesg output. For instructions, follow this. EDIT: no longer happen since 2.0.
  • Boot animation showing white squares - the animated images of the current boot animation set is too big. When freeing the last bit of memory, some 3D memory was sacrificed, and thus the white squares. The workaround is to use a smaller version of boot animation. Some good ones can be found here. Just remember not to download the MDPI version for which the logo would appear smaller in your screen.
  • 3D apps might show white squares or white background depending on which memory versions you are using. Choose a smaller memory version if that's the case.
  • Static sound during music play / screen flickering in low frequency. This is mostly caused by full kernel preemption. Workaround by setting a higher minimum frequency for your frequency scaling governor. For a detailed discussion and howto see this. EDIT: no longer happen since 4.0.
  • It was not too possible to multitask while keeping too many apps residing in memory. With this kernel, you can do serious multitasking. That said, when you have too many apps in memory, it will sometimes trigger Android bugs that cause it to be restarted (not the phone itself). If you find your phone not responding, wait for 1 minute as it is probably reloading itself before pressing the kill key combo or pulling out the battery.
  • Plugging in the USB while booting up may cause the system to hang at the logo splash screen (before the boot animation). I believe I have fixed some USB boot up bugs, but one related to the voltage regulator still evades me.
  • When using a CPU underclocked version, the vibrator is less powerful. EDIT: vibrator hotfix for 4.0 is here.
Development Issues
  • kexec is in the kernel, but it boots only 50% of the times or less, probably only on 800Mhz/133Mhz non-OC'ed kernels. I attach the kexec executable in case someone might want to have a look at it. EDIT: almost 100% working since 4.0.
Tips
Spoiler


Troubleshooting
Spoiler


Source
Spoiler

Attached Files


Edited by ipaq3870, 01 June 2012 - 03:18 PM.

  • 2

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#3
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts
2.0 (superseded)
Kernel modules only - applicable to all zImage
d8a036f-kmod

Attached Files


Edited by ipaq3870, 22 May 2012 - 01:28 AM.

  • 1

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#4
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts
2.0 Vanilla build (no OC) (superseded)
CPU: 800Mhz / AHB: 133Mhz / 144MB free memory / 16bpp display
d8a036f-692-800mhz-133mhz-144mb-16bpp

Attached Files


Edited by ipaq3870, 22 May 2012 - 01:28 AM.

  • 1

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#5
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts
2.0 AHB Overclocked & CPU Underclocked & 24bpp Framebuffer (superseded)

CPU: 667Mhz / AHB: 166Mhz / 144MB free memory / 24bpp display
d8a036f-693-667mhz-166mhz-144mb-24bpp

See vanilla build info for instructions on enabling more free memory, and z-ram.

Attached Files


Edited by ipaq3870, 22 May 2012 - 01:28 AM.

  • 1

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#6
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts
2.0 Even more memory (superseded)

CPU: 667Mhz / AHB: 166Mhz (no OC) / 160MB free memory / 24bpp display
d8a036f-694-667mhz-166mhz-160mb-24bpp

See vanilla build info for instructions on enabling more free memory, and z-ram.

Attached Files


Edited by ipaq3870, 22 May 2012 - 01:28 AM.

  • 1

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#7
ErcanPolat

ErcanPolat

    Newbie

  • Members
  • Pip
  • 28 posts
  • Gender:Male
  • Devices:Samsung Omnia II GT-I8000
Hi ipaq. No service and wifi issue are fixed ?

  • 0

#8
ErcanPolat

ErcanPolat

    Newbie

  • Members
  • Pip
  • 28 posts
  • Gender:Male
  • Devices:Samsung Omnia II GT-I8000
I installed 800 Mhz 16bpp. Gsm is OK. But while activating wifi shows "Error".

  • 0

#9
louis xv

louis xv

    Newbie

  • Members
  • Pip
  • 16 posts
should we comment /insmod dpram.ko/ in init.rc in order to boot successfully?

  • 0

#10
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts

Hi ipaq. No service and wifi issue are fixed ?


I reverted back to the original wifi driver with a very slight change - so I believe it should perform as good as the original one. For no phone service, it never really occurred to me - so it's really difficult for me to debug it without anyone sending a dmesg output. Anyway, I did made some timing changes in the new build, so it is a good idea for you to test if it works for you.

I installed 800 Mhz 16bpp. Gsm is OK. But while activating wifi shows "Error".


Have you updated the kernel modules as well? The zImage and the modules go in pair - you need to use the new modules with the new kernel.

should we comment /insmod dpram.ko/ in init.rc in order to boot successfully?


Ahhh... no. What you should comment out is param.ko, NOT dpram.ko. dpram is the onedram driver for your OS to communicate with the phone modem via IPC. Commenting the wrong one will give you no phone service.

  • 1

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#11
shoarmabakpao

shoarmabakpao

    Diehard

  • Members
  • PipPipPipPip
  • 395 posts
  • Gender:Male
  • Devices:Samsung Omnia II, Galaxy Nexus
Ahh bummer! Right when the development started getting track, my phone is dead :(

ipaq, you are doing a great job! If my phone was working, I would test them all out ^_^

  • 0

#12
synescu

synescu

    Regular

  • Members
  • PipPip
  • 112 posts
  • Gender:Male
  • Devices:Moto G XT1032
what part of phone you use in modules? as far as I remember constantly happens to the phone to lose signal when using the WM phone part

  • 0

#13
jingang

jingang

    Enthusiast

  • Members
  • PipPipPip
  • 163 posts
which shouid download?why are there so many downloads link?which one is?

  • 0

#14
nikkotsoi

nikkotsoi

    Enthusiast

  • Members
  • PipPipPip
  • 279 posts
i got signal
but my wifi is still error!!

  • 0

#15
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts

I installed 800 Mhz 16bpp. Gsm is OK. But while activating wifi shows "Error".

i got signal
but my wifi is still error!!


Hmmm... Can you try the attached zImage together with kmod? It's a vanilla version with commit 7a226a0890f1ff7f15626ab1e6a70dcde940830b reverted (I think I have missed this one in the release.)

Attached Files


  • 0

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#16
ipaq3870

ipaq3870

    Regular

  • Members
  • PipPip
  • 92 posts

Ahh bummer! Right when the development started getting track, my phone is dead :(


Wish you luck trying to resurrect it!

what part of phone you use in modules? as far as I remember constantly happens to the phone to lose signal when using the WM phone part


I guess you are talking about the modem firmware part. To avoid confusion, I just post my exact /loadmod file for you to see if there's anything different than yours.

#!/bin/bash
rm hotplug.txt
if [ -f /storage/cm_o2_update.tar.gz ];
then
# tar xzvf /storage/cm_o2_update.tar.gz
 cat /storage/cm_o2_update.tar.gz | tar xzvf -
 rm /storage/cm_o2_update.tar.gz
fi
if [ -f /storage/cm_o2_update.sh ];
then
 chmod +x /storage/cm_o2_update.sh
 /storage/cm_o2_update.sh > /storage/cm_o2_update.txt
 rm /storage/cm_o2_update.sh
fi
ln -s /dev/bma150 /dev/kr3dm
/efs/load_ime.sh
insmod /modules/dpram.ko
insmod /modules/multipdp.ko
insmod /modules/s3c_camera.ko
insmod /modules/Si4709_driver.ko
chmod +rw /dev/*
ln -s /sd/Phone_I6500UZCJD1.bin /dev/bml9
#ln -s /sd/Phone_I8000XXJJ1.bin /dev/bml9

efsd &
start akmd2
swapon -a

#mount My Storage
fat32ms=`parted /dev/block/mmcblk1 print|grep fat32|awk '{print $1}'`
mount -t vfat /dev/block/mmcblk1p$fat32ms /storage
exit
<<< the rest snipped >>

which shouid download?why are there so many downloads link?which one is?


You need to download 2 files from the first post (containing 4 links in the 2.0 section). The first one you'll need is the kernel modules, the second is the kernel zImage for which you have a choice from the remaining 3 links. Click each of the links in the first post to see what kernel configuration you want, and download only one of them.

  • 0

ipaq3870@madaco ~~~ Kernel Experiment for Omnia II ~~~ Offline until July


#17
louis xv

louis xv

    Newbie

  • Members
  • Pip
  • 16 posts

Ahhh... no. What you should comment out is param.ko, NOT dpram.ko. dpram is the onedram driver for your OS to communicate with the phone modem via IPC. Commenting the wrong one will give you no phone service.

oh it's my mistake, i wrote it as i remembered, thank you

  • 0

#18
louis xv

louis xv

    Newbie

  • Members
  • Pip
  • 16 posts

which shouid download?why are there so many downloads link?which one is?

you should download modules:
d8a036f-kmod.zip
and any kernel (zImage) you choose.

  • 0

#19
louis xv

louis xv

    Newbie

  • Members
  • Pip
  • 16 posts
hey ipaq, about the (zram) script, can i put it in (sh file) and put it an (system/etc/init.d) folder???

  • 0

#20
synescu

synescu

    Regular

  • Members
  • PipPip
  • 112 posts
  • Gender:Male
  • Devices:Moto G XT1032

Hmmm... Can you try the attached zImage together with kmod? It's a vanilla version with commit 7a226a0890f1ff7f15626ab1e6a70dcde940830b reverted (I think I have missed this one in the release.)

with "dirty pack" got signal and no
wifii error!!

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users