[24 SEP 2012][DEV] HWA Kernel For HD2

Search This thread

marc1706

Retired Recognized Developer
Dec 25, 2009
435
2,346
Clausthal-Zellerfeld / Munich
Sure, I'll see what I can do. It looks like they are using some code that has been introduced in 2.6.39 so maybe we'll need to port that.

BTW, do you maybe have an idea why I get "[DISP]mdp_ppp: src img of zero size!" on jellybean with my kernel? The display is obviously not properly working because of that. Did you have to change anything in order to have a working display on jellybean? I had something similar while using old gingerbread mdp & kgsl code on ICS but I'm unsure to what is causing this right now. I already tried using your kgsl code but that didn't change anything. :(
I didn't pay much attention to kernel development in the last 2 months or so since I've been a little bit busy.

edit: Scratch that, I had to update include/linux/msm_mdp.h ...
 
Last edited:

securecrt

Senior Member
Aug 4, 2010
763
2,762
Shanghai
Sure, I'll see what I can do. It looks like they are using some code that has been introduced in 2.6.39 so maybe we'll need to port that.

BTW, do you maybe have an idea why I get "[DISP]mdp_ppp: src img of zero size!" on jellybean with my kernel? The display is obviously not properly working because of that. Did you have to change anything in order to have a working display on jellybean? I had something similar while using old gingerbread mdp & kgsl code on ICS but I'm unsure to what is causing this right now. I already tried using your kgsl code but that didn't change anything. :(
I didn't pay much attention to kernel development in the last 2 months or so since I've been a little bit busy.

edit: Scratch that, I had to update include/linux/msm_mdp.h ...

the JB kernel using different msm_mdp.h the mdp driver are still using the same code in ics kernel.


Sent from my NexusHD2 using xda premium
 

marc1706

Retired Recognized Developer
Dec 25, 2009
435
2,346
Clausthal-Zellerfeld / Munich
the 2.6.32 kernel baseline is too old it seems that we can't use it :crying:

@marc1706 can you take a look at it? the source code can be find here

Code:
fs/f2fs/dir.c: In function 'find_in_block':
fs/f2fs/dir.c:98: error: implicit declaration of function 'find_next_bit_le'
fs/f2fs/dir.c: In function 'room_for_filename':
fs/f2fs/dir.c:336: error: implicit declaration of function 'find_next_zero_bit_le'
fs/f2fs/dir.c: In function 'f2fs_add_link':
fs/f2fs/dir.c:430: error: implicit declaration of function 'test_and_set_bit_le'
fs/f2fs/dir.c: In function 'f2fs_delete_entry':
fs/f2fs/dir.c:465: error: implicit declaration of function 'test_and_clear_bit_le'
fs/f2fs/dir.c: In function 'f2fs_make_empty':
fs/f2fs/dir.c:521: error: too few arguments to function 'kmap_atomic'
fs/f2fs/dir.c:540: error: too few arguments to function 'kunmap_atomic'
fs/f2fs/dir.c: In function 'f2fs_empty_dir':
fs/f2fs/dir.c:565: error: too few arguments to function 'kmap_atomic'
fs/f2fs/dir.c:574: error: too few arguments to function 'kunmap_atomic'
  CC      fs/f2fs/inode.o
fs/f2fs/dir.c: At top level:
fs/f2fs/dir.c:655: warning: initialization from incompatible pointer type
make[2]: *** [fs/f2fs/dir.o] 错误 1
make[2]: *** 正在等待未完成的任务....
fs/f2fs/file.c: In function 'need_to_sync_dir':
fs/f2fs/file.c:108: error: implicit declaration of function 'd_find_any_alias'
fs/f2fs/file.c:108: warning: assignment makes pointer from integer without a cast
fs/f2fs/file.c: In function 'do_attr_copy':
fs/f2fs/file.c:336: error: implicit declaration of function 'setattr_copy'
fs/f2fs/file.c: At top level:
fs/f2fs/file.c:379: error: unknown field 'get_acl' specified in initializer
fs/f2fs/file.c:379: warning: initialization from incompatible pointer type
fs/f2fs/file.c: In function 'f2fs_fallocate':
fs/f2fs/file.c:545: error: 'FALLOC_FL_PUNCH_HOLE' undeclared (first use in this function)
fs/f2fs/file.c:545: error: (Each undeclared identifier is reported only once
fs/f2fs/file.c:545: error: for each function it appears in.)
fs/f2fs/file.c: In function 'f2fs_ioctl':
fs/f2fs/file.c:589: error: implicit declaration of function 'inode_owner_or_capable'
fs/f2fs/file.c: At top level:
fs/f2fs/file.c:638: warning: initialization from incompatible pointer type
fs/f2fs/file.c:639: error: unknown field 'fallocate' specified in initializer
fs/f2fs/file.c:639: warning: initialization from incompatible pointer type
make[2]: *** [fs/f2fs/file.o] 错误 1
  CC      fs/eventfd.o
  CC      fs/aio.o
fs/f2fs/inode.c: In function 'do_read_inode':
fs/f2fs/inode.c:92: error: implicit declaration of function 'set_nlink'

I was able to fix the first few compile errors with these commits:
https://github.com/marc1706/desire_kernel_35/compare/d7be0dd9d9...addc4b93b2

edit: The "d_find_any_alias" will be harder to fix:
https://github.com/marc1706/desire_kernel_35/issues/6

edit2: I was also able to solve the kmap_atomic warnings:
https://github.com/marc1706/desire_kernel_35/commit/8392cda72af8ece5e621e74d2a8c18d9525b5ed9

edit3: I got as far as this:
Code:
fs/f2fs/namei.c:508: warning: initialization from incompatible pointer type
fs/f2fs/namei.c:509: warning: initialization from incompatible pointer type
fs/f2fs/namei.c:513: warning: initialization from incompatible pointer type
fs/f2fs/namei.c:515: warning: initialization from incompatible pointer type
  CC      fs/f2fs/hash.o
  CC      fs/f2fs/super.o
fs/f2fs/super.c: In function 'f2fs_i_callback':
fs/f2fs/super.c:83: error: 'struct inode' has no member named 'i_rcu'
fs/f2fs/super.c:83: warning: type defaults to 'int' in declaration of '__mptr'
fs/f2fs/super.c:83: warning: initialization from incompatible pointer type
fs/f2fs/super.c:83: error: 'struct inode' has no member named 'i_rcu'
fs/f2fs/super.c: In function 'f2fs_destroy_inode':
fs/f2fs/super.c:89: error: 'struct inode' has no member named 'i_rcu'
fs/f2fs/super.c: At top level:
fs/f2fs/super.c:194: warning: initialization from incompatible pointer type
fs/f2fs/super.c:195: error: unknown field 'evict_inode' specified in initializer
fs/f2fs/super.c:195: warning: initialization from incompatible pointer type
fs/f2fs/super.c: In function 'f2fs_fill_super':
fs/f2fs/super.c:442: error: implicit declaration of function 'd_make_root'
fs/f2fs/super.c:442: warning: assignment makes pointer from integer without a cast
fs/f2fs/super.c: In function 'f2fs_mount':
fs/f2fs/super.c:491: error: implicit declaration of function 'mount_bdev'
fs/f2fs/super.c:491: warning: return makes pointer from integer without a cast
fs/f2fs/super.c: At top level:
fs/f2fs/super.c:497: error: unknown field 'mount' specified in initializer
fs/f2fs/super.c:497: warning: initialization makes integer from pointer without a cast

edit4: Changes so far for f2fs:
https://github.com/marc1706/desire_kernel_35/compare/89d051154f...23752a08f2
 
Last edited:

securecrt

Senior Member
Aug 4, 2010
763
2,762
Shanghai

marc1706

Retired Recognized Developer
Dec 25, 2009
435
2,346
Clausthal-Zellerfeld / Munich
The small changes to f2fs itself where based on the ext4 driver and are changes due to the older kernel base. Let's just hope that f2fs still wants to work. :D

Fun fact: We would have had to apply similar changes in a 3.0 kernel. :eek:
 
  • Like
Reactions: Robbie P

Xylograph

Senior Member
Sep 2, 2009
1,825
7,708
The small changes to f2fs itself where based on the ext4 driver and are changes due to the older kernel base. Let's just hope that f2fs still wants to work. :D

Fun fact: We would have had to apply similar changes in a 3.0 kernel. :eek:

Any chance you could compile the kernel with f2fs support for us to 'test' ?
Another question, since this is so new there is no recovery yet to format to this specific fs..

How can we make such an f2fs partition on our sd card ?
 
  • Like
Reactions: Magic2010

Robbie P

Senior Member
Feb 8, 2011
5,116
4,017
London
Has anyone got this to format an sd card yet?
I have ubuntu12.04LTS, installed autoconf and used it on configure.ac. I get an error message m4_pattern_allow. I have mkfs.f2fs.8 in man folder and f2fs_format.c and f2fs_format.h in mkfs folder, and am unsure how to proceed (do not want to format "windows c:" drive:eek:) Tried sh mkfs.f2fs.8 and ./configure and mkfs.f2fs -l f2fs /dev/sdb1 and mkfs.f2fs.8 -l f2fs /dev/sdb1.
I am a linux noob, you may have noticed;)
 

HypoTurtle

Senior Member
May 5, 2011
1,970
1,257
Has anyone got this to format an sd card yet?
I have ubuntu12.04LTS, installed autoconf and used it on configure.ac. I get an error message m4_pattern_allow. I have mkfs.f2fs.8 in man folder and f2fs_format.c and f2fs_format.h in mkfs folder, and am unsure how to proceed (do not want to format "windows c:" drive:eek:) Tried sh mkfs.f2fs.8 and ./configure and mkfs.f2fs -l f2fs /dev/sdb1 and mkfs.f2fs.8 -l f2fs /dev/sdb1.
I am a linux noob, you may have noticed;)

Yes, I cd'ed into the folder and ran:

Code:
autoreconf --install
sudo chmod +x configure
sudo ./configure
sudo make
sudo make install
Then its just: 
[CODE]sudo umount /dev/sdd1
sudo mkfs.f2fs /dev/sdd1

I could use a cross compiled arm version (I tried and failed), any one have a link to the cross compiler they use? then it could be made the same way as nilfs2 can (on device via terminal).

While I'm here would the mounting for the f2fs partition be the same as for ext4? (and is the cleaner / garbage collector included in the kernel?) Just looking into trying to make the NativeSD installer both usable with all other OSes and all partition types, we already have code floating about that should make this easy to implement (just need to adapt it and draw it together).
 
Last edited:

Robbie P

Senior Member
Feb 8, 2011
5,116
4,017
London
I seem to have formatted it successfully, but it still shows as FAT32 in gparted.
Had to sudo make, sudo su before cp line and unmount sdb1 before it would format.
Thanks HypoTurtle:)
 
  • Like
Reactions: Szczepanik

HypoTurtle

Senior Member
May 5, 2011
1,970
1,257
I seem to have formatted it successfully, but it still shows as FAT32 in gparted.
Had to sudo make, sudo su before cp line and unmount sdb1 before it would format.
Thanks HypoTurtle:)

But does it also have a warning label in gparted, and won't mount? I always use gparted to unmount (as i know I'm also formatting the right partition), so missed that step.


Formatted mine to ext4 first, maybe that makes a difference? Maybe not, it may have just broken the ext4??
 
Last edited:

Robbie P

Senior Member
Feb 8, 2011
5,116
4,017
London
But does it also have a warning label in gparted, and won't mount? I always use gparted to unmount (as i know I'm also formatting the right partition), so missed that step.

No warning label and it mounts:(. I had my 2Gb card partitioned previously 1GB FAT32 sdb2 first partition and 1Gb FAT32 sdb1 second partition. Will try to format whole sd from unformatted.
Edit; did that
Code:
rob@ubuntu:~$ sudo umount /dev/sdb1
[sudo] password for rob: 
umount: /dev/sdb1: not mounted
rob@ubuntu:~$ sudo mkfs.f2fs /dev/sdb1
Info: sector size = 512
Info: total sectors = 3840000 (in 512bytes)
Info: zone aligned segment0 blkaddr: 256
Info: This device doesn't support TRIM
Info: format successful
rob@ubuntu:~$
Have warning sign and doesn't mount (but had the sign before format anyway).
If it doesn't mount, can't see how to use it.:confused:
Edit2; Scratch that, it can be accessed via pc
Edit3; But magldr does not seem to recognise sdcard (with old sd cm10 build on it), cant get ad sd dir screen to appear. I hope all this is helping and not too OT.
 
Last edited:

melando

Senior Member
Aug 27, 2010
1,309
215
London
Google Pixel 6
There is also a definition in the powerprofile inside the framework-res.apk, but I don't know how much influence this has if this is 'hard-set' in the kernel..

You could try to decompile it and change it into 2400 and see if android picks up that value..
Do you mean <item name="battery.capacity">1390</item>?
In which case the phone seems to be set to 1230 despite the figure of 1390 (or am I missing something)?
 

denseye

Senior Member
Feb 22, 2009
144
40
No. That's why I added that driver a while back to my jb branch.



That's the hard part. Your Leicke battery probably fits the same characteristics as the stock battery. The kernel will always think it's the Samsung battery so you'd have to hack into that file for your specific battery, which would also mean your stock battery won't work anymore.

hello marc

my leicke extendend battery is well recognized as 2300.

but the problem is temp report that is at -20 when charging
so that "overheat" is flagged, and I can't charge it

how could I solve that ?

Code:
<6>[    2.145416] HTC Battery Probe
<6>[    2.145446] batt: init over voltage interrupt detection. at 1299605755 (1970-01-01 00:00:01.299575238 UTC)
<6>[    2.145538] htc_battery_core_probe
<6>[    3.128570] [ds2746_batt]ds2746_battery_init
<6>[    3.128723] [ds2746_batt] ds2746_battery_prob
<4>[    3.129058] [D:BATT]Use 600 Kohm thermal resistance
<4>[    3.144042] [D:BATT] V=3635(5d2) I=-367(fffffc60) C=1007.0/2300(ee3) id=5(8a) T=10(40) KADC=754
<4>[    3.144104] [D:BATT] start predict discharge...
<4>[    3.144134] [D:BATT] state change(0->1), full count=0, over load count=0 [2298]
<4>[    3.144165] [D:BATT]fake percentage (754) during prediction.
<6>[    3.144195] batt: ds2784_notify: 1 76 at 2298385067 (1970-01-01 00:00:02.298354549 UTC)
<6>[    3.144256] batt: batt:power_supply_changed: battery at 2298446102 (1970-01-01 00:00:02.298415584 UTC)
<4>[   13.148010] [D:BATT] V=3642(5d5) I=-322(fffffcd0) C=1006.0/2300(ee1) id=5(8b) T=10(40) KADC=700
<4>[   13.148040] [D:BATT]predict done [2298->1414949556]
<4>[   13.149841] [D:BATT] V=3642(5d5) I=-322(fffffcd0) C=1006.0/2300(ee1) id=5(8b) T=10(40) KADC=700
<4>[   13.149902] [D:BATT] acr update: P=700, C=5334.
<4>[   13.150390] [D:BATT]new RARC=700 C=1610mAh adc=5334.
<4>[   13.150451] [D:BATT] state change(1->0), full count=0, over load count=0 [1414949558]
<4>[   13.150482] [D:BATT] state change(0->2), full count=0, over load count=0 [1414949558]
<6>[   13.150512] batt: ds2784_notify: 1 70 at 12304702221 (2012-10-12 09:38:00.502868667 UTC)
<6>[   13.150604] batt: batt:power_supply_changed: battery at 12304763256 (2012-10-12 09:38:00.502929703 UTC)
<4>[   63.153411] [D:BATT] V=3650(5d8) I=-306(fffffcf9) C=1605.0/2300(14ca) id=5(8a) T=10(40) KADC=687
<4>[  113.158203] [D:BATT] V=3586(5be) I=-587(fffffa34) C=1600.0/2300(14bf) id=5(87) T=30(3e) KADC=813
<4>[  113.158264] [D:BATT] voltage stable
<6>[  113.158294] batt: ds2784_notify: 1 70 at 112312453685 (2012-10-12 09:39:40.510620131 UTC)
<6>[  113.158325] batt: batt:power_supply_changed: battery at 112312514720 (2012-10-12 09:39:40.510681166 UTC)
<4>[  163.165496] [D:BATT] V=3669(5e0) I=-113(fffffee2) C=1596.0/2300(14b5) id=5(8c) T=-10(42) KADC=368
<6>[  163.165679] batt: ds2784_notify: 1 69 at 162319869451 (2012-10-12 09:40:30.518005380 UTC)
<6>[  163.165832] batt: batt:power_supply_changed: battery at 162323195867 (2012-10-12 09:40:30.518188485 UTC)
<6>[  167.257232] ds2746_batt:ds2746_suspend
<6>[  167.300292] ds2746_batt:ds2746_resume
<6>[  167.918731] ds2746_batt:ds2746_suspend
<6>[  167.960235] ds2746_batt:ds2746_resume
<6>[  169.766876] ds2746_batt:ds2746_suspend
<6>[  169.810211] ds2746_batt:ds2746_resume
<6>[  171.843872] ds2746_batt:ds2746_suspend
<6>[  171.890533] ds2746_batt:ds2746_resume
<4>[  171.900085] [D:BATT] V=3689(5e8) I=-4(fffffff4) C=1596.0/2300(14b4) id=5(8e) T=-20(43) KADC=118
<6>[  171.900146] batt: ds2784_notify: 1 68 at 171054458138 (2012-10-12 09:41:22.510101319 UTC)
<6>[  171.900207] batt: batt:power_supply_changed: battery at 171054519173 (2012-10-12 09:41:22.510131836 UTC)
<6>[  172.262878] ds2746_batt:ds2746_suspend
<6>[  172.310272] ds2746_batt:ds2746_resume
<6>[  173.463226] ds2746_batt:ds2746_suspend
<6>[  173.510009] ds2746_batt:ds2746_resume
<4>[  173.525299] [D:BATT] V=3689(5e8) I=-3(fffffff8) C=1596.0/2300(14b4) id=5(8e) T=-20(43) KADC=116
<6>[  173.525360] batt: ds2784_notify: 1 67 at 172679763345 (2012-10-12 09:42:15.515869141 UTC)
<6>[  173.525421] batt: batt:power_supply_changed: battery at 172679824380 (2012-10-12 09:42:15.515930176 UTC)
<6>[  173.756530] ds2746_batt:ds2746_suspend
<6>[  173.800109] ds2746_batt:ds2746_resume
<6>[  174.952026] ds2746_batt:ds2746_suspend
<6>[  174.999938] ds2746_batt:ds2746_resume
<6>[  175.566314] ds2746_batt:ds2746_suspend
<6>[  175.610290] ds2746_batt:ds2746_resume
<6>[  176.934967] ds2746_batt:ds2746_suspend
<6>[  176.980163] ds2746_batt:ds2746_resume
<4>[  176.999298] [D:BATT] V=3686(5e7) I=-9(ffffffe9) C=1596.0/2300(14b3) id=5(8e) T=-20(43) KADC=121
<6>[  176.999359] batt: ds2784_notify: 1 66 at 176153884516 (2012-10-12 09:43:08.519714355 UTC)
<6>[  176.999420] batt: batt:power_supply_changed: battery at 176153945552 (2012-10-12 09:43:08.519775391 UTC)
<6>[  177.156005] ds2746_batt:ds2746_suspend
<6>[  177.199920] ds2746_batt:ds2746_resume
<6>[  177.805328] ds2746_batt:ds2746_suspend
<6>[  177.849884] ds2746_batt:ds2746_resume
<6>[  178.997650] ds2746_batt:ds2746_suspend
<6>[  179.039703] ds2746_batt:ds2746_resume
<6>[  179.975830] ds2746_batt:ds2746_suspend
<6>[  180.019989] ds2746_batt:ds2746_resume
<6>[  191.254028] ds2746_batt:ds2746_suspend
<6>[  191.299896] ds2746_batt:ds2746_resume
<4>[  191.316040] [D:BATT] V=3689(5e8) I=-4(fffffff4) C=1595.0/2300(14b1) id=5(8e) T=-20(43) KADC=118
<6>[  191.316101] batt: ds2784_notify: 1 65 at 190470809660 (2012-10-12 09:44:01.516693115 UTC)
<6>[  191.316162] batt: batt:power_supply_changed: battery at 190470870696 (2012-10-12 09:44:01.516754151 UTC)
<6>[  191.469055] ds2746_batt:ds2746_suspend
<6>[  191.509704] ds2746_batt:ds2746_resume
<6>[  193.290802] ds2746_batt:ds2746_suspend
<6>[  193.339599] ds2746_batt:ds2746_resume
<4>[  193.348358] [D:BATT] V=3689(5e8) I=-2(fffffff9) C=1594.0/2300(14b0) id=5(8e) T=-20(43) KADC=115
<6>[  193.348419] batt: ds2784_notify: 1 64 at 192503219370 (2012-10-12 09:44:54.509307861 UTC)
<6>[  193.348480] batt: batt:power_supply_changed: battery at 192503280405 (2012-10-12 09:44:54.509368897 UTC)
<6>[  193.544830] ds2746_batt:ds2746_suspend
<6>[  193.589630] ds2746_batt:ds2746_resume
<6>[  194.740631] ds2746_batt:ds2746_suspend
<6>[  194.789886] ds2746_batt:ds2746_resume
<4>[  223.807952] [D:BATT] V=3652(5d9) I=-168(fffffe57) C=1592.0/2300(14ab) id=5(8c) T=-10(42) KADC=490
<6>[  223.808074] batt: ds2784_notify: 1 63 at 222962997257 (2012-10-12 09:45:44.518676787 UTC)
<6>[  223.808197] batt: batt:power_supply_changed: battery at 222963119327 (2012-10-12 09:45:44.518798858 UTC)
<4>[  274.275573] [D:BATT] V=3664(5de) I=-168(fffffe56) C=1590.0/2300(14a5) id=5(8b) T=-10(42) KADC=511
<6>[  274.275756] batt: ds2784_notify: 1 62 at 273430679144 (2012-10-12 09:46:34.986328157 UTC)
<6>[  274.275909] batt: batt:power_supply_changed: battery at 273430862249 (2012-10-12 09:46:34.986511262 UTC)
<4>[  324.290557] [D:BATT] V=3650(5d8) I=-246(fffffd92) C=1588.0/2300(149f) id=5(8b) T=0(41) KADC=603
<6>[  324.290740] batt: ds2784_notify: 1 62 at 323445693791 (2012-10-12 09:47:25.001312287 UTC)
<6>[  324.290924] batt: batt:power_supply_changed: battery at 323445876897 (2012-10-12 09:47:25.001495392 UTC)
<4>[  374.905792] [D:BATT] V=3660(5dc) I=-137(fffffea4) C=1585.0/2300(1498) id=5(8c) T=-10(42) KADC=429
<6>[  374.905975] batt: ds2784_notify: 1 61 at 374060897648 (2012-10-12 09:48:15.616546661 UTC)
<6>[  374.906158] batt: batt:power_supply_changed: battery at 374061111271 (2012-10-12 09:48:15.616729766 UTC)
<4>[  424.917449] [D:BATT] V=3660(5dc) I=-155(fffffe78) C=1583.0/2300(1492) id=5(8b) T=-10(42) KADC=481
<6>[  424.917633] batt: ds2784_notify: 1 60 at 424072585882 (2012-10-12 09:49:05.628234895 UTC)
<6>[  424.917816] batt: batt:power_supply_changed: battery at 424072768987 (2012-10-12 09:49:05.628418000 UTC)
<4>[  474.921752] [D:BATT] V=3657(5db) I=-162(fffffe64) C=1580.0/2300(148b) id=5(8b) T=-10(42) KADC=488
<6>[  474.921936] batt: ds2784_notify: 1 59 at 474076858343 (2012-10-12 09:49:55.632507355 UTC)
<6>[  474.922088] batt: batt:power_supply_changed: battery at 474077041448 (2012-10-12 09:49:55.632690461 UTC)
<4>[  524.926971] [D:BATT] V=3628(5cf) I=-342(fffffc9d) C=1576.0/2300(1481) id=5(89) T=10(40) KADC=707
<6>[  524.927062] batt: ds2784_notify: 1 59 at 524081954782 (2012-10-12 09:50:45.637634313 UTC)
<6>[  524.927093] batt: batt:power_supply_changed: battery at 524082015817 (2012-10-12 09:50:45.637695348 UTC)
<4>[  574.938110] [D:BATT] V=3655(5da) I=-165(fffffe5d) C=1572.0/2300(1477) id=5(8b) T=-10(42) KADC=490
<6>[  574.938293] batt: ds2784_notify: 1 58 at 574093246283 (2012-10-12 09:51:35.648864778 UTC)
<6>[  574.938476] batt: batt:power_supply_changed: battery at 574093429388 (2012-10-12 09:51:35.649047884 UTC)
 
Last edited:
  • Like
Reactions: Takeoo111111

Top Liked Posts

  • There are no posts matching your filters.
  • 404
    HWA Kernel for HD2

    My kernel is based on Tytyung's r2.5 base
    and mix the KGSL driver from Code Aurora

    This is a DEV thread. the latest code may cause some problems.


    HTC HD2 is still the KING!!!!


    Notes:
    1. this kernel can't be used in CM7 ROM
    2. the current(before 27 Apr 2012) existing android4.0 ROMs can not directly use this kernel, becasue they are not using the correct libs to match the latest KGSL driver.

    Update: 4 MAY 2012
    Rick_1995 back port all the KGSL , MDP from 2.6.38 to tytung's 2.6.32 and the latest build can be found here: link
    Update: 13 MAY 2012
    Rick_1995 and tytung made some more progress : link

    Update: 19 JUN 2012
    Memory tweaks : link
    msm: kgsl: Add support for the preamble context flag link

    Update: 21 JUN 2012
    backport the following items from the latest KGSL driver: link
    msm: kgsl: let postmortem dump find context switch IBs
    msm: kgsl: fix size checking in adreno_find_region
    msm: kgsl: Set default value of wait_timeout in the adreno_dev struct
    msm: kgsl: Make sure WPTR reg is updated properly
    msm: kgsl: fix error handling in adreno_waittimestamp()
    msm: kgsl: let postmortem dump find context switch IBs

    22 JUN 2012 update link
    msm: kgsl: remove readl/writel use for dma memory
    msm: kgsl: convert sg allocation to vmalloc
    msm: kgsl: Allocate physical pages instead of using vmalloc
    msm: kgsl: make cffdump work with the MMU enabled
    msm: kgsl: Add ION as an external memory source
    msm: kgsl: Fixup per-process memory statistics
    msm: kgsl: Make sure kmemleak tool does not report incorrect mem leak.
    msm: kgsl: Add a new property to IOCTL_KGSL_DEVICE_GETPROPERTY
    msm: kgsl: Poke regularly in adreno_idle
    msm: kgsl: increase valid timestamp range
    msm: kgsl: flush outer cache for alloc_page() pages
    msm: kgsl: Add a constant for adreno_ringbuffer_issuecmds flags

    Important Tips : don't turn on the Settings->Developer options-> Force GPU rendering
    Turn on this option will cause problem.

    23 JUN 2012 update link
    change back the pmem size to 32MB adsp_pmem to 41MB this is the default configuration, It seems resolved the crash problem with DesireC GPU libs.

    In this version I have already include the DesireC gpu libs in the zip file.
    With the new GPU libs the Chrome Browser is very smooth, the hardware H.264 decoder is working.

    25 JUN 2012 update
    need more people to do the new GPU libs test link

    25 JULY 2012 update link
    1. ignore the version check in Qdsp6 Vdec which can prevent some crash when the vdec being used.
    2. msm: kgsl: Write the retired timestamp on resume
    3. msm: kgsl: handle larger instruction store for adreno225
    4. msm: kgsl: Add support for the A3XX family of GPUs
    5. reduced the PMEM_ADSP size as the HW decoder still can't work on HD2 (now we have 420MB memory for userspace)
    6. msm: kgsl: Update the GMEM and istore size for A320
    7. msm: kgsl: return correct error code for unknown ioctls
    8. msm: kgsl: handle all indirect buffer types in postmortem
    9. msm: kgsl: Detach memory objects from a process ahead of destroy time
    10. msm: kgsl: Find a mem_entry by way of a GPU address and a pagetable base
    11. msm: kgsl: Cleanup header file macros
    12. msm: kgsl: Add GMEM size configuration in gpu list
    13. msm: kgsl: don't clear gpuaddr when unmapping global mappings
    14. msm: kgsl: Do not dereference pointer before checking against NULL
    add new GPU libs

    31 JULY 2012 link
    ics & jellybean HWA kernel updates
    1. msm: kgsl: Change name of vmalloc allocator
    2. msm: kgsl: Map a guard page on the back of GPU MMU regions
    3. msm: kgsl: Optimize page_alloc allocations
    4.msm: kgsl: Add markers to identify IB sequence start and end
    5.msm: kgsl: rework ib checking
    jellybean
    1. include: checkout msm_mdp from ics_chocolate

    6 AUG 2012 link
    JellyBean Kernel
    1. msm: kgsl: Add per context timestamp
    2. net: netfilter: enable bandwidth control (data limit)
    3. update base to tytung r3.3

    7 AUG 2012 link
    Jellybean Kernel
    1.base: genlock: Remove genlock_release_lock and associated ioctl
    2.base: genlock: allow synchronization with a single gralloc handle
    3.base: genlock: remove BIT macro usage

    7 AUG 2012 link
    Jellybean Kernel
    1. Fixed data limit

    15 AUG 2012 link
    ics
    1. base: genlock: Remove genlock_release_lock and associated ioctl
    2. base: genlock: allow synchronization with a single gralloc handle
    3. base: genlock: remove BIT macro usage
    ics & jellybean
    1. Staging: android: binder: Don't call dump_stack in binder_vma_open
    2. Staging: android: binder: Fix crashes when sharing a binder file between processes
    3. drivers:staging:android Typos: fix some comments that have typos in them.
    4. fs: Remove missed ->fds_bits from cessation use of fd_set structs internally
    5. Staging:android: Change type for binder_debug_no_lock switch to bool
    6. Staging: android: binder: Fix use-after-free bug
    7. staging: android: lowmemorykiller: sysfs node and notifications
    8. android, lowmemorykiller: remove task handoff notifier
    9. staging: android: lowmemorykiller: Fix task_struct leak
    10. staging: android/lowmemorykiller: Don't unregister notifier from atomic context
    11. staging: android, lowmemorykiller: convert to use oom_score_adj
    12. staging: android/lowmemorykiller: Do not kill kernel threads
    13. staging: android/lowmemorykiller: No need for task->signal check
    14. staging: android/lowmemorykiller: Better mm handling
    15. staging: android/lowmemorykiller: Don't grab tasklist_lock
    16. staging: android: lowmemorykiller: Don't wait more than one second for a process to die
    17. Staging: android: fixed 80 characters warnings in lowmemorykiller.c
    18. staging: android: lowmemorykiller: Ignore shmem pages in page-cache
    19. staging: android: lowmemorykiller: Remove bitrotted codepath
    20. staging: android: lowmemkiller: Substantially reduce overhead during reclaim
    21. staging: android: lowmemorykiller: Don't try to kill the same pid over and over
    22. android: logger: Allow a UID to read it's own log entries
    23. staging: logger: hold mutex while removing reader
    24. staging: android: logger: clarify non-update of w_off in do_write_log_from_user
    25. staging: android: logger: clarify code in clock_interval
    26. staging: android: logger: reorder prepare_to_wait and mutex_lock
    27. staging: android: logger: simplify and optimize get_entry_len
    28. staging: android: logger: Change logger_offset() from macro to function
    29. Staging: android: fixed white spaces coding style issue in logger.c
    30. android: logger: bump up the logger buffer sizes
    31. pmem: Check for valid virtual address while flushing
    32. pmem: Correctly account for aligned blocks
    33. pmem_adsp (user-space) as non-cached
    34. pmem_venc (user-space) as non-cached
    35. change MSM_NAND_DMA_BUFFER_SIZE to SZ_1M

    23 AUG 2012 link
    ics & jellybean
    1. ksm: remove unswappable max_kernel_pages …
    2. ksm: fix bad user data when swapping
    3. thp: ksm: free swap when swapcache page is replaced
    4. staging: zram: fix zram locking
    5. Staging: zram: Replace mutex lock by a R/W semaphore
    6. Staging: zram: Add a missing GFP_KERNEL specifier in zram_init_device()
    7. mm/ksm.c is doing an unneeded _notify in write_protect_page.
    8. ksm: check for ERR_PTR from follow_page()
    9. vmalloc(): adjust gfp mask passed on nested vmalloc() invocation
    10. staging:lowmemkiller add Fudgeswap
    11. drivers/mmc/host/msm-sdcc: remove dead config options
    12. mmc: msm_sdcc: Fix possible circular locking dependency warning
    13. mmc: msm_sdcc: Add prog done interrupt support
    14. mmc: msm_sdcc: Fix bug in PIO mode when data size is not word aligned
    15. mmc: msm: fix dma usage not to use internal APIs
    16. mmc: change clock from 50Mhz to 64Mhz PCLK
    17. mmc: change NR_SG from 32 to 128 for better performance
    18. staging: Add Snappy compression support to zram
    19. disable KSM for unstable reason while zram is enabled.

    24 SEP 2012 link
    ICS & JB

    1. ashmem: Implement read(2) in ashmem driver
    2. ashmem: Fix ASHMEM_SET_PROT_MASK.
    3. ashmem: Support lseek(2) in ashmem driver
    4. ashmem: Fix the build failure when OUTER_CACHE is enabled
    5. ashmem: Fix ashmem vm range comparison to stop roll-over
    6. Disabling Gentle Fair Sleepers improve UI responsiveness.
    7. base: genlock: handle error while creating lock/handle inode
    8. base: genlock: add magic to protect attach from non-genlock file
    9. base: genlock: protect kref counting with spinlock
    10. Staging: android: binder: Add some missing binder_stat_br calls
    11. tweak iosched for better android performance
    JB
    1. video: msm: add mdp version to id string,and put a bogus panel id



    Great thanks to Xylograph , dorimanx , Rick_1995, tytung and all of the guys who is reading this thread.

    If you like my work please don't hesitate to press the Thanks button. :)
    57
    15 AUG 2012
    ics
    1. base: genlock: Remove genlock_release_lock and associated ioctl
    2. base: genlock: allow synchronization with a single gralloc handle
    3. base: genlock: remove BIT macro usage
    ics & jellybean
    1. Staging: android: binder: Don't call dump_stack in binder_vma_open
    2. Staging: android: binder: Fix crashes when sharing a binder file between processes
    3. drivers:staging:android Typos: fix some comments that have typos in them.
    4. fs: Remove missed ->fds_bits from cessation use of fd_set structs internally
    5. Staging:android: Change type for binder_debug_no_lock switch to bool
    6. Staging: android: binder: Fix use-after-free bug
    7. staging: android: lowmemorykiller: sysfs node and notifications
    8. android, lowmemorykiller: remove task handoff notifier
    9. staging: android: lowmemorykiller: Fix task_struct leak
    10. staging: android/lowmemorykiller: Don't unregister notifier from atomic context
    11. staging: android, lowmemorykiller: convert to use oom_score_adj
    12. staging: android/lowmemorykiller: Do not kill kernel threads
    13. staging: android/lowmemorykiller: No need for task->signal check
    14. staging: android/lowmemorykiller: Better mm handling
    15. staging: android/lowmemorykiller: Don't grab tasklist_lock
    16. staging: android: lowmemorykiller: Don't wait more than one second for a process to die
    17. Staging: android: fixed 80 characters warnings in lowmemorykiller.c
    18. staging: android: lowmemorykiller: Ignore shmem pages in page-cache
    19. staging: android: lowmemorykiller: Remove bitrotted codepath
    20. staging: android: lowmemkiller: Substantially reduce overhead during reclaim
    21. staging: android: lowmemorykiller: Don't try to kill the same pid over and over
    22. android: logger: Allow a UID to read it's own log entries
    23. staging: logger: hold mutex while removing reader
    24. staging: android: logger: clarify non-update of w_off in do_write_log_from_user
    25. staging: android: logger: clarify code in clock_interval
    26. staging: android: logger: reorder prepare_to_wait and mutex_lock
    27. staging: android: logger: simplify and optimize get_entry_len
    28. staging: android: logger: Change logger_offset() from macro to function
    29. Staging: android: fixed white spaces coding style issue in logger.c
    30. android: logger: bump up the logger buffer sizes
    31. pmem: Check for valid virtual address while flushing
    32. pmem: Correctly account for aligned blocks
    33. pmem_adsp (user-space) as non-cached
    34. pmem_venc (user-space) as non-cached
    35. change MSM_NAND_DMA_BUFFER_SIZE to SZ_1M

    I feel the whole system(NexusHD2 v2.6) become more smooth after this update. Pls test and report. :D
    View attachment tytung_HWA_kernel.20120815_22_55_ics_no_initrd.zip
    View attachment tytung_HWA_kernel.20120815_22_46_jb_no_initrd.zip
    54
    23 AUG 2012
    ics & jellybean
    1. ksm: remove unswappable max_kernel_pages …
    2. ksm: fix bad user data when swapping
    3. thp: ksm: free swap when swapcache page is replaced
    4. staging: zram: fix zram locking
    5. Staging: zram: Replace mutex lock by a R/W semaphore
    6. Staging: zram: Add a missing GFP_KERNEL specifier in zram_init_device()
    7. mm/ksm.c is doing an unneeded _notify in write_protect_page.
    8. ksm: check for ERR_PTR from follow_page()
    9. vmalloc(): adjust gfp mask passed on nested vmalloc() invocation
    10. staging:lowmemkiller add Fudgeswap
    11. drivers/mmc/host/msm-sdcc: remove dead config options
    12. mmc: msm_sdcc: Fix possible circular locking dependency warning
    13. mmc: msm_sdcc: Add prog done interrupt support
    14. mmc: msm_sdcc: Fix bug in PIO mode when data size is not word aligned
    15. mmc: msm: fix dma usage not to use internal APIs
    16. mmc: change clock from 50Mhz to 64Mhz PCLK
    17. mmc: change NR_SG from 32 to 128 for better performance
    18. staging: Add Snappy compression support to zram
    19. disable KSM for unstable reason while zram is enabled.


    View attachment tytung_HWA_kernel.20120823_21_42_ics_no_initrd_zram_en.zip
    View attachment tytung_HWA_kernel.20120823_22_09_jb_no_initrd_zram_en.zip
    Please download the new file, as the previous verison didn't turn on the zram by default.

    I have included the zram(160MB swap disk) enable script in both of the zip, so just flash it and enjoy!
    48
    24 SEP 2012
    ICS & JB

    1. ashmem: Implement read(2) in ashmem driver
    2. ashmem: Fix ASHMEM_SET_PROT_MASK.
    3. ashmem: Support lseek(2) in ashmem driver
    4. ashmem: Fix the build failure when OUTER_CACHE is enabled
    5. ashmem: Fix ashmem vm range comparison to stop roll-over
    6. Disabling Gentle Fair Sleepers improve UI responsiveness.
    7. base: genlock: handle error while creating lock/handle inode
    8. base: genlock: add magic to protect attach from non-genlock file
    9. base: genlock: protect kref counting with spinlock
    10. Staging: android: binder: Add some missing binder_stat_br calls
    11. tweak iosched for better android performance
    JB
    1. video: msm: add mdp version to id string,and put a bogus panel id

    The Nand Version
    View attachment tytung_HWA_kernel.20120924_22_34_ics_no_initrd.zip
    View attachment tytung_HWA_kernel.20120924_22_41_jb_no_initrd.zip

    The NativeSD version
    View attachment tytung_HWA_kernel.20120924_22_34_NativeSD_ics.zip you should change the ROM_NAME in install.sh to your ROM NAME I use CM9ight in this file
    View attachment tytung_HWA_kernel.20120924_22_41_NativeSD_jb.zip you should change to the ROM_NAME in install.sh to your ROM NAME I use PA in this file
    45
    31 JULY 2012
    ics & jellybean HWA kernel updates
    1. msm: kgsl: Change name of vmalloc allocator
    2. msm: kgsl: Map a guard page on the back of GPU MMU regions
    3. msm: kgsl: Optimize page_alloc allocations
    4.msm: kgsl: Add markers to identify IB sequence start and end
    5.msm: kgsl: rework ib checking
    jellybean
    1. include: checkout msm_mdp from ics_chocolate

    NOTES:
    1. the latest jellybean kernel can't work with Z880E GPU libs, I suggest to use DesireC GPU libs in jellybean ROMs
    2. the jellybean kernel can't work in ICS ROMs
    3. before flash the zip please replace the initrd.gz if you are not using NexusHD2 V2.5 ROM.
    4. the ICS kernel kgsl driver has been updated to very new version, even though the version number is still 3.8 but I have backport all the useful updates from 3.9 3.10 3.11, the further updates seems only works on jellybean.

    View attachment tytung_HWA_kernel.20120731_23_08_ics.zip
    View attachment tytung_HWA_kernel.20120731_22_49_jb.zip