[KERNEL][ALPHA] kernel 3.0.8 ODM/NVRM tegra forward porting

Search This thread

wkpark

Senior Member
Jan 2, 2012
255
1,357
Seoul
Since I had no permission to post a new thread, so Ive just posted a reply at the following link
from http://forum.xda-developers.com/showpost.php?p=23783120&postcount=1338

wkpark said:
This is forward ported tegra kernel 3.0.8 based on the Nvidia's ODM/NVRM tegra kernel 2.6.32.9

http://github.com/wkpark/tegra-linux-3.0.y

about ~700 commits are cherry-picked from the tegra kernel 2.6.32
almost all commits/commit logs are preserved. some commits are not needed anymore and some commits hard to merge.
anyway this is the result of my effort.

0. prepare android-common repo. it contain's minimal changes for android. the latest mach-tegra tree is removed.
1. about 4~6 hours needed to cherry-pick quick and dirty manually. I can figure out where are the hard parts.
2. fix to make it compile
* add slab.h / remove smp_lock.h / fix .unlocked_ioctl / fix DECLARE_MUTEX etc.
3. apply SU660 patch sets. fix for kernel 3.0.x
4. first try to boot => fail~ :>
5. figure out where are the trouble making points
* timer / irq / gpio / platsmp codes are changed in the kernel 3.0 => dig the log and fix it up
6. at last I can make boot su660 up! (about ~15 days needed to fix to boot up. total 300~400 times retry to boot)

----
the uploaded git repo is rebased interactively (remove some useless history, merge some hunks etc)
and I separate it into three branches
1. tegra-orig-3.0.8 = original android-common + tegra 2.6.32 patch series
- can be used the base of all other nvrm/odm based tegra kernel.
2. su660-lg-usb = tegra-orig-3.0.8 + su660 patches + lg-usb for official firmwares
3. su660-ics = tegra-orig-3.0.8 + su660 patch + ICS touchscreen patch, camera patch by rmcc

currently it works nicely with the SU660

and I've made a forward ported P990/P999 kernel based on the lge-kernel-star managed by arcee
(Please see http://forum.xda-developers.com/showpost.php?p=23831782&postcount=1351)

and finally
this is a bootable image for P990(under testing) and P999(not tested at all)
(See also http://forum.xda-developers.com/showpost.php?p=23834645&postcount=1353)

(all for CM9/ICS)
http://code.google.com/p/openstar2x/downloads


this is just first step toward the kernel 3.0

happy hacking~!

P.S.1: I also have forward ported working (but less stable) kernel 2.6.35 (about ~7 days needed to boot up)
this encourage me to forward port kernel 3.0. and this is the result :)

P.S.2: I'm not related to Nvidia nor LG :)

ChangeLog
03/20
1. fixed haptic feedback
03/22
1. fixed three annoying kernel WARNING/BUG messages
- irq wakeup warning with gpio-keys
- revert recent cpufreq_stat commit (already reverted in the lge-kernel-star)
- simplified platsmp.c (some parts of platsmp.c already included into the core code)
2. revert some part to original ramdisk.
- emmc/sdcard swap fix (for testing purpose)
- USB vendor ID fix included (for USB tethering)
3. included YAFFS (by vadonka with minor fix)
03/25
1. various minor bugs are fixed by pastime1971 (thanks~)

03/26
1. cleanup reboot/ram_console codes
03/27 (http://forum.xda-developers.com/showpost.php?p=24097273&postcount=243)
1. p99x: fix oops while shutdown (http://forum.xda-developers.com/showpost.php?p=24102050&postcount=249)
2. cleanup cnt32_to_63_clear()
3. [HACK] copy the warmboot information to the original reserved_buffer
area before shutdown.

03/28
1. star: fixup some minor bugs (various compiler warnings are fixed)
03/29 (http://forum.xda-developers.com/showpost.php?p=24181934&postcount=258)
1. star: add CONFIG_STAR_BATTERY_UNIT_UV to support voltage unit in uV
2. su660: adjust star_capacity_from_voltage_via_calculate()
- i think it is not su660 specifc. so Ive just applied it onto the P99x
- use star_capacity_from_voltage_via_calculate() to adjust battery capacity after singular 3G/BB/rild behavior to fix "999%" battery bug.
(there are so many posts exist on this issue e.g. http://forum.xda-developers.com/show...&postcount=211)

Source Code
https://github.com/wkpark/tegra-linux-3.0.y/tree/p99x-ics

Known Issues
* frequently boot fails with the external SD card.
- workaround : remove your external SD card.

Download
for SelfKANG3(by arcee) or it's variants. Owain's CM9 KANG custom rom.

P990
http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p990-3.0.8-vib-120320.zip for P990
http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p990-3.0.8-120322.zip for P990

P999
http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p999-3.0.8-120321.zip for P999 (not tested at all)
http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p999-3.0.8-120322.zip for P999 (not tested at all. feel free to feedback)

introduced to the G2X forum by missaellpzchvz - http://forum.xda-developers.com/showpost.php?p=23904261&postcount=1

SU660
http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-su660-3.0.8-vib-120320.zip for SU660
http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-su660-3.0.8-120322.zip for SU660


FAQ


Q: Does this mean we will have hardware acceleration anytime soon with ICS? (by der.einstein)
A: No. this is a ODM/NVRM based tegra kernel. all the handicap are same as the kernel 2.6.32
 
Last edited:

der.einstein

Senior Member
Apr 20, 2011
125
24
This sounds great!
Does this mean we will have hardware acceleration anytime soon with ICS?

Sent from my Optimus 2X using XDA
 
  • Like
Reactions: piiiters

crazy_dj

Senior Member
May 1, 2009
183
29
nice , i'll be trying this one out at friday oder saturday , I need the phone to be ready for day to day usage during the week :D
 
  • Like
Reactions: piiiters

wapz

Senior Member
Jan 20, 2008
1,089
170
works well for a first test, just had one total lockup so far, but who knows if it was even related to the kernel.

i do notice that switching between tasks seems a bit less responsive, even though 2d performance indeed seems a bit smoother.

very good for a first release! hope other devs will join in here soon :)

Sent from my LG-P990 using XDA
 
  • Like
Reactions: piiiters

Robse86

Senior Member
Jun 15, 2010
106
8
Thanks a lot for this kernel! The phone feels a lot snapier! My Wifi is working without problems but I have one question, is it possible to somehow mount the SD card as the main storage? So basicly like the standard CM Mount.

thx
 
  • Like
Reactions: piiiters

Pascalone19

Senior Member
Mar 12, 2012
56
11
www.tecnoyouth.it
Since I had no permission to post a new thread, so Ive just posted a reply at the following link
from http://forum.xda-developers.com/showpost.php?p=23783120&postcount=1338



and I've made a forward ported P990/P999 based on the lge-kernel-star managed by arcee
(Please see http://forum.xda-developers.com/showpost.php?p=23831782&postcount=1351)

and finally
this is a bootable image for P990(under testing) and P999(not tested at all)
(See also http://forum.xda-developers.com/showpost.php?p=23834645&postcount=1353)

(all for CM9/ICS)
http://code.google.com/p/openstar2x/downloads


this is just first step toward the kernel 3.0

happy hacking~!

P.S.: I also have forward ported working (but less stable) kernel 2.6.35 (about ~7 days needed to boot up)
this encourage me to forward port kernel 3.0. and this is the result :)

FAQ

Q: Does this mean we will have hardware acceleration anytime soon with ICS?
A: No. this is a ODM/NVRM based tegra kernel. all the handicap are same as the kernel 2.6.32

I commend the excellent work and thank you so much for this new kernel, but I would love to know why choose a 3.0.x kernel with respect to a kernel 2.xx, I can understand a bit 'but I want better security :)
 
Last edited by a moderator:
  • Like
Reactions: ClausG76

lipisak

Senior Member
Dec 2, 2011
331
312
I don't know exactly where, but there is a guide how to modify fstab to swap mounting ;) just search:)

Odesláno z mého LG-P990 pomocí Tapatalk
 

Dekudan

Senior Member
Nov 28, 2007
174
66
My untrained eye makes me think this thing doesn't touch your vold.fstab.

If that wasn't your question and you actually want to change it, the file is located in \system\etc\vold.fstab and you can edit it with a text editor. Just swap the two lines around. (Aka, point at different targets. Any sensible person could work it out :) )

Edit: Also, should mention I'm flabbergasted this exists. Excellent work Mr. OP
 

slebit

Senior Member
Dec 3, 2010
2,551
1,568
When i flash this kernel my phone do not recognize my baseband and the battery is showing 999%. What am i doing wrong?
 

Robse86

Senior Member
Jun 15, 2010
106
8
My untrained eye makes me think this thing doesn't touch your vold.fstab.

If that wasn't your question and you actually want to change it, the file is located in \system\etc\vold.fstab and you can edit it with a text editor. Just swap the two lines around. (Aka, point at different targets. Any sensible person could work it out :) )

Edit: Also, should mention I'm flabbergasted this exists. Excellent work Mr. OP

I checked this already, nothing changed there! Must be sth. else. Damned I want to use this kernel but all my stuff is on the externel SD card ;)
 

Striatum_bdr

Senior Member
May 29, 2011
4,650
2,176
Marseille
Yes! Very good job indeed!

Very fluid, no wireless problem here, sdcard mounted as usual, I will keep it for a while..

Many thanks! Impressive job.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 72
    Since I had no permission to post a new thread, so Ive just posted a reply at the following link
    from http://forum.xda-developers.com/showpost.php?p=23783120&postcount=1338

    wkpark said:
    This is forward ported tegra kernel 3.0.8 based on the Nvidia's ODM/NVRM tegra kernel 2.6.32.9

    http://github.com/wkpark/tegra-linux-3.0.y

    about ~700 commits are cherry-picked from the tegra kernel 2.6.32
    almost all commits/commit logs are preserved. some commits are not needed anymore and some commits hard to merge.
    anyway this is the result of my effort.

    0. prepare android-common repo. it contain's minimal changes for android. the latest mach-tegra tree is removed.
    1. about 4~6 hours needed to cherry-pick quick and dirty manually. I can figure out where are the hard parts.
    2. fix to make it compile
    * add slab.h / remove smp_lock.h / fix .unlocked_ioctl / fix DECLARE_MUTEX etc.
    3. apply SU660 patch sets. fix for kernel 3.0.x
    4. first try to boot => fail~ :>
    5. figure out where are the trouble making points
    * timer / irq / gpio / platsmp codes are changed in the kernel 3.0 => dig the log and fix it up
    6. at last I can make boot su660 up! (about ~15 days needed to fix to boot up. total 300~400 times retry to boot)

    ----
    the uploaded git repo is rebased interactively (remove some useless history, merge some hunks etc)
    and I separate it into three branches
    1. tegra-orig-3.0.8 = original android-common + tegra 2.6.32 patch series
    - can be used the base of all other nvrm/odm based tegra kernel.
    2. su660-lg-usb = tegra-orig-3.0.8 + su660 patches + lg-usb for official firmwares
    3. su660-ics = tegra-orig-3.0.8 + su660 patch + ICS touchscreen patch, camera patch by rmcc

    currently it works nicely with the SU660

    and I've made a forward ported P990/P999 kernel based on the lge-kernel-star managed by arcee
    (Please see http://forum.xda-developers.com/showpost.php?p=23831782&postcount=1351)

    and finally
    this is a bootable image for P990(under testing) and P999(not tested at all)
    (See also http://forum.xda-developers.com/showpost.php?p=23834645&postcount=1353)

    (all for CM9/ICS)
    http://code.google.com/p/openstar2x/downloads


    this is just first step toward the kernel 3.0

    happy hacking~!

    P.S.1: I also have forward ported working (but less stable) kernel 2.6.35 (about ~7 days needed to boot up)
    this encourage me to forward port kernel 3.0. and this is the result :)

    P.S.2: I'm not related to Nvidia nor LG :)

    ChangeLog
    03/20
    1. fixed haptic feedback
    03/22
    1. fixed three annoying kernel WARNING/BUG messages
    - irq wakeup warning with gpio-keys
    - revert recent cpufreq_stat commit (already reverted in the lge-kernel-star)
    - simplified platsmp.c (some parts of platsmp.c already included into the core code)
    2. revert some part to original ramdisk.
    - emmc/sdcard swap fix (for testing purpose)
    - USB vendor ID fix included (for USB tethering)
    3. included YAFFS (by vadonka with minor fix)
    03/25
    1. various minor bugs are fixed by pastime1971 (thanks~)

    03/26
    1. cleanup reboot/ram_console codes
    03/27 (http://forum.xda-developers.com/showpost.php?p=24097273&postcount=243)
    1. p99x: fix oops while shutdown (http://forum.xda-developers.com/showpost.php?p=24102050&postcount=249)
    2. cleanup cnt32_to_63_clear()
    3. [HACK] copy the warmboot information to the original reserved_buffer
    area before shutdown.

    03/28
    1. star: fixup some minor bugs (various compiler warnings are fixed)
    03/29 (http://forum.xda-developers.com/showpost.php?p=24181934&postcount=258)
    1. star: add CONFIG_STAR_BATTERY_UNIT_UV to support voltage unit in uV
    2. su660: adjust star_capacity_from_voltage_via_calculate()
    - i think it is not su660 specifc. so Ive just applied it onto the P99x
    - use star_capacity_from_voltage_via_calculate() to adjust battery capacity after singular 3G/BB/rild behavior to fix "999%" battery bug.
    (there are so many posts exist on this issue e.g. http://forum.xda-developers.com/show...&postcount=211)

    Source Code
    https://github.com/wkpark/tegra-linux-3.0.y/tree/p99x-ics

    Known Issues
    * frequently boot fails with the external SD card.
    - workaround : remove your external SD card.

    Download
    for SelfKANG3(by arcee) or it's variants. Owain's CM9 KANG custom rom.

    P990
    http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p990-3.0.8-vib-120320.zip for P990
    http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p990-3.0.8-120322.zip for P990

    P999
    http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p999-3.0.8-120321.zip for P999 (not tested at all)
    http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-p999-3.0.8-120322.zip for P999 (not tested at all. feel free to feedback)

    introduced to the G2X forum by missaellpzchvz - http://forum.xda-developers.com/showpost.php?p=23904261&postcount=1

    SU660
    http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-su660-3.0.8-vib-120320.zip for SU660
    http://code.google.com/p/openstar2x/downloads/detail?name=boot-cm9-for-su660-3.0.8-120322.zip for SU660


    FAQ


    Q: Does this mean we will have hardware acceleration anytime soon with ICS? (by der.einstein)
    A: No. this is a ODM/NVRM based tegra kernel. all the handicap are same as the kernel 2.6.32
    15
    i already forked this kernel github repo :)

    so i start to involve this project :D
    13
    I did run same tests, getting 18 MB/s with stock kernel, and only 6 MB/s with 3.0.y. Same results with AnTuTu and SD Tools

    I do not know why, or maybe its just my faulty phone.

    I've found some problem.

    I guess the speed of external SD card is not correctly detected.

    Code:
    ... (this is 2G SD card (unknown class, unknown manufacture)
    ... ( ~5MB/s read on kernel 3.0 / ~9MB/s read on kernel 2.6.32)
    <6>[  237.056470] mmc1: new [b]SD card[/b] at address 1234
    <6>[  237.063200] mmcblk1: mmc1:1234 SA02G 1.83 GiB
    <6>[  237.072284]  mmcblk1: p1
    ...

    but kernel 2.6.32 detect it as "high speed SD card"

    Code:
    ...
    <6>[    2.674126] mmc1: [b]new high speed SD card[/b] at address 1234
    ...

    and finally Ive found the following commit.

    http://git.kernel.org/?p=linux/kern...ff;h=f2815f68dabbb373fd1c9f0fd4a609d486697c2b

    and it fix this SD detection bug.
    Code:
    ....
    <6>[    2.674126] mmc1: new high speed SD card at address 1234
    ...
    
    
    # echo 3 > /proc/sys/vm/drop_caches
    # busybox dd if=/dev/block/mmcblk1p1 of=/dev/null bs=1024 count=10240
    10240+0 records in
    10240+0 records out
    10485760 bytes (10.0MB) copied, 1.096210 seconds, [b]9.1MB/s[/b]
    13
    yes you re right, i know that just i dont want to bother the graph :) thx for the correction

    anyway, integrating the overclock is hard, i still try it, but phone cant boot. too much different between the 2.3.32 and the 3.0 cpufreq driver :mad:
    the other part is ok

    this is a OC patch based on the famous "FakeShmoo"

    Originally made by Cpasjuste (OC/UV) + ratanakvlun(cpufreq) + kiljacken(setcpu support))
    GPU/RAM/VDE Overclock by morfic.
    Improved by Benee @ https://github.com/VorkTeam/vorkKernel-LGP990
    Cleaned up and re-organized by Faux123 @ https://github.com/faux123
    and cleaned up by me :)

    it works nicely with my SU660 + SelfKANG3
    12
    Recent changes are pushed

    * various minor bugs are fixed by pastime1971 (thanks~)
    * star: add CONFIG_STAR_BATTERY_UNIT_UV to support voltage unit in uV
    * su660: adjust star_capacity_from_voltage_via_calculate()
    - i think it is not su660 specifc. so Ive just applied it onto the P99x
    use star_capacity_from_voltage_via_calculate() to adjust battery capacity after singular 3G/BB/rild behavior to fix "999%" battery bug.
    (See also http://forum.xda-developers.com/showpost.php?p=23106363&postcount=211)
    * p99x: fix oops while shutdown
    * star: fixup some minor bugs (various compiler warnings are fixed)

    Code:
    [FONT="Courier New"]commit 31575cf15ca7b39116ddd8cd025ac3b609571bdd
    Author: Sang Tae Park <[email protected]>
    Date:   Sun Mar 25 14:06:24 2012 -0700
    
        star: fixed various minor bugs
    
         - fix a missing return value in NvOdmServicesPmuGetHookValue
         - fix a wrong argument type for NvOdmPmuReadRtc
         - fix headset schedule work
         - fix error checking
         - fix sscanf in bd_address_store
    
    commit 0eb14da311d9376af9e646e028913825c5428cba
    Author: Won-Kyu Park <[email protected]>
    Date:   Thu Mar 29 18:39:28 2012 +0900
    
        star: add CONFIG_STAR_BATTERY_UNIT_UV to support voltage unit in uV
    
        CM7/CM9 based custom rom use voltage unit in uV
        add CONFIG_STAR_BATTERY_UNIT_UV option to support it
    
        Conflicts:
    
            drivers/star/Kconfig
            drivers/star/star_battery_charger.c
    
    commit 3d648ded0451c9b18b510198471e479c4012de1c
    Author: Won-Kyu Park <wk[email protected]>
    Date:   Thu Mar 29 06:35:01 2012 +0900
    
        su660: adjust star_capacity_from_voltage_via_calculate()
    
        star_capacity_from_voltage_via_calculate() seems not good enough
        especially for AcLineStatus == ON.
        try to adjust voltage-capacity curve, cleanup and make it more readable
    
        Conflicts:
    
            drivers/star/star_battery_charger.c
    
    commit 206ea2d0f0e6a548eed55f1a5df7535fc236b16d
    Author: Won-Kyu Park <[email protected]>
    Date:   Wed Mar 28 20:33:55 2012 +0900
    
        star: use star_capacity_from_voltage_via_calculate() in case of BatteryGauge_on == FALSE
    
         - add POWER_SUPPLY_PROP_VOLTAGE_{MIN,MAX}
         - show battery icon correctly in case of BatteryGauge_on == FALSE
    
    
    commit 5c1198c3e454b4e9ae2b5fe8852d7b3eaa3dd03b
    Author: Won-Kyu Park <[email protected]>
    Date:   Tue Mar 27 23:11:13 2012 +0900
    
        p99x: fix oops while shutdown
    
        partially update tegra_battery_shutdown() from V20H to fix this issue.
    
        ...
        [  868.588607] tegra_battery_shutdown
        [  868.597091] Restarting system.
        [  868.604015] star_emergency_restart : sys reset : timeout = 20 sec
        [  868.617694] tegra_machine_restart
        [  868.624627] Unable to handle kernel paging request at virtual address da98d008
        [  868.638506] pgd = d8994000
        [  868.645447] [da98d008] *pgd=1982c811, *pte=00000000, *ppte=00000000
        [  868.659262] Internal error: Oops: 7 [#1] PREEMPT SMP
        [  868.666130] Modules linked in:
        [  868.673060] CPU: 1    Not tainted  (3.0.8-dev+ #2)
        [  868.686605] PC is at NvOdmGpioGetState+0x28/0x48
        [  868.693504] LR is at [b]star_read_charger_state_gpio[/b]+0x38/0xb0
        [  868.706939] pc : [<c008b930>]    lr : [<c03e9350>]    psr: a0000113
        [  868.706944] sp : d89edb88  ip : d89edba8  fp : d89edba4
        [  868.727449] r10: 00000001  r9 : 00000000  r8 : c07c3980
        [  868.734303] r7 : d920f25c  r6 : c074e080  r5 : d89edbcf  r4 : d89edba8
        [  868.748080] r3 : 00000001  r2 : d89edba8  r1 : 80000092  r0 : da98d004
        [  868.761700] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM Segment user
        [  868.775425] Control: 10c53c7d  Table: 1899404a  DAC: 00000015
        ...
    
    commit 25d4d1f9ca956c3d38d00c6bb569419ba5c9bcb9
    Author: Won-Kyu Park <[email protected]>
    Date:   Wed Mar 28 03:25:43 2012 +0900
    
        star: fixup some minor bugs
    
         - fixed *_show(), *_store()
         - gyro_accel: remove unused variables
         - fixed "function declaration isn't a prototype" warnings
         - move pg_readl/pg_writel declaration[/FONT]