[DEV][WIP] CM9/Ice Cream Sandwich

Search This thread

aichrist

Member
Sep 28, 2011
29
49
I have been working on porting CM9 to the VS910. So far I have gotten it to boot to the lock screen.

What Works
  • Boot animation
  • Lock screen
  • SurfaceFlinger
  • logcat/adb shell
  • 3d accel is half working. I have gotten SurfaceFlinger to load up and interface the proprietary drivers (from GB) correctly, but HardwareRenderer (java framework) fails because the drivers don't give up a valid config.

What Doesn't Work
  • Touch screen
  • HardwareRenderer (fails because HardwareRenderer.chooseEglConfig() returns null value)
  • Everything else

Currently this ROM is totally unusuable for anything except for development. At this point, I do believe it is possible to get CM9 running, but it will take a good bit of developer effort. It would be helpful for any other developers around here to give some insight on the errors that come up in the adb logs.

How To Build
  1. Follow Google's instructions for setting up a Linux system or VM for Android AOSP building
  2. Follow CM9 build instructions up to brunch command
  3. git clone git://github.com/andyichr/makerom.git to a location, such as ~/android/makerom
  4. Overlay the files in ~/android/makerom/cm9-system/overlay onto the cm9/system directory (this adds vs910 brunch)
  5. Adjust values in makerom.sh to match your own paths (MAKE SURE TO POINT IT AT A VALID KERNEL --I didn't include instructions for building a kernel)
  6. Adjust values in makecm9.sh to match your own paths
  7. Run ~/android/makerom/makecm9.sh to build cm9 (this takes a long time, depending on your system)
  8. If build is successful, run ~/makerom/makerom.sh which will output a ROM which may be flashed to the device for testing

This is very rough work, but it proves that the basic parts of CM9/ICS do function on the Revolution. The cyanogenmod developers have already added some patches to the android source which allow ICS to run using video drivers from Gingerbread. This means it should be possible to get things working.

The current major problem with this ROM is that the HardwareRenderer does not initialize. Immediately after this, the main trebuchet process is killed and the system reboots itself after a while.

I will be happy to do what I can to support the process of porting CM9 to our phones. I read that a couple of other devs may be looking into porting CM7, but I think focusing on 9 might be more worth the effort, since we already have Gingerbread.

I have also attached a logcat to this post which should give developers some idea about what exactly is broken, which will lead to the first steps of debugging and porting.

Any interested developers should fork my repo on github (git://github.com/andyichr/makerom.git) which has the build scripts and patches.

That's about it for now. I very well may have left out some steps along the way. If you try to follow this process and it doesn't work out, let me know and I'll help you out.

ROM Download (very broken --only use for testing and development)

http://www.multiupload.com/GI0MLQYTE0 - Flash this if you want to see ICS boot to the lock screen or help test/debug. It's not useful for much else at this point.

We're getting there! I've already patched the android egl framework code slightly and built a kernel. CM team already patched frameworks/base for 2.3 video drivers. We'll patch what we have to to get this thing running! I am pretty busy but I will follow this thread and I hope for this to be a collaborative, transparent porting process! Good luck!
 

Attachments

  • logcat.67117434.7z
    1.4 KB · Views: 534
Last edited:

aichrist

Member
Sep 28, 2011
29
49
Great! I saw in the CM7 thread that thecubed put up a git repo. I'm not sure exactly what his development plan is, but I'd be happy to fork his repo and trade patches, logs, etc. The more devs we have on this, the better... it's not a trivial task and I'm sure my wife hates me by now for spending so many hrs on it so far.
 

elreydotcom

Senior Member
Aug 14, 2011
354
76
If I read correctly, thecubed just got a master repository set up for the revolution, so maybe the files that are needed could be lurking in there? I'll see if I can find the link and post it here.

Here's the link: https://github.com/thecubed

BLITZ ledded adshot nitro supercharged Gingerlution
 
Last edited:

indyred99

Senior Member
Sep 19, 2011
584
76
Chicopee
I know in irc tonight cubed was talking about it. Guess they have to work on a few things but it's coming along. Wish I knew more so I could help out in this to. Guess I could be the Guinea pig.

Sent from my VS910 4G using Tapatalk
 

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
Great! I saw in the CM7 thread that thecubed put up a git repo. I'm not sure exactly what his development plan is, but I'd be happy to fork his repo and trade patches, logs, etc. The more devs we have on this, the better... it's not a trivial task and I'm sure my wife hates me by now for spending so many hrs on it so far.

Awesome job so far! For a lot of things to work correctly, it's my understanding that you'll need a new kernel. For at least the touchscreen issues, you need the "idc" file in the "/system/usr/idc" directory (not sure if you have that or not, I didn't get a chance to check yet)

Either way, if you'd like to get in contact with me, hop on IRC and I'd be happy to answer any questions you may have.

Excellent work!
 

aichrist

Member
Sep 28, 2011
29
49
I know in irc tonight cubed was talking about it. Guess they have to work on a few things but it's coming along. Wish I knew more so I could help out in this to. Guess I could be the Guinea pig.

Sent from my VS910 4G using Tapatalk

Yeah I see thecube's repo at https://github.com/thecubed/android_device_lge_revolution. His CM files are a lot cleaner than mine... I just copied the crespo config and haven't had time to clean it up yet. I'll do some diffs of his vs mine and see about getting things merged. My github repo has some additional files so what I could do is replace my vs910 device folder with a fork of thecube's repo.

I'm not sure whether his files are for CM7 or CM9 (or if it doesn't matter). I'm new to CM porting, but I'm not new to linux or android app development.
 

aichrist

Member
Sep 28, 2011
29
49
Awesome job so far! For a lot of things to work correctly, it's my understanding that you'll need a new kernel. For at least the touchscreen issues, you need the "idc" file in the "/system/usr/idc" directory (not sure if you have that or not, I didn't get a chance to check yet)

Either way, if you'd like to get in contact with me, hop on IRC and I'd be happy to answer any questions you may have.

Excellent work!

Thanks for the tip. I'll check that out. So far I've mainly been banging my head on getting the adreno205 drivers working, but it sure would be nice to have touch working. That'd be the next priority.

I'm tempted to switch of 3d acceleration but I am focusing on one thing at a time.

I'll hop on IRC. Which channel are you on specifically?
 

elreydotcom

Senior Member
Aug 14, 2011
354
76
As always guys, I'm happy to assist in testing. Nor very knowledgeable on coding or porting, but I can definitely put my phone at risk :)

BLITZ ledded adshot nitro supercharged Gingerlution
 
  • Like
Reactions: aichrist

KaneOfMars

Senior Member
Jul 26, 2011
587
101
Charleston, SC
wish I knew more about this stuff so I could help

keep up the great work! :D

crossing fingers, hoping I'll get the chance to start making themes for CM9!
 

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
Thanks for the tip. I'll check that out. So far I've mainly been banging my head on getting the adreno205 drivers working, but it sure would be nice to have touch working. That'd be the next priority.

I'm tempted to switch of 3d acceleration but I am focusing on one thing at a time.

I'll hop on IRC. Which channel are you on specifically?

Head over to #lgrevolution and I'll be there as IOMonster.

Yep, for ICS we need a lot of work in the KGSL department in kernel for getting proper Adreno support working... Tiamat is working on adding the new KGSL/USB/Genlock support to his MSM7X30 repo here ( http://git.tiamat-dev.com/7x30/htc-kernel-msm7x30/ ) and after that we need to merge our kernel sources with his (boardfiles, includes, configs, etc)

Booting to lockscreen is great, but there's a LOT of work to be done before we can have a "working" ICS by any stretch of the imagination... ICS is a whole new beast, unfortunately...
 
  • Like
Reactions: aichrist

aichrist

Member
Sep 28, 2011
29
49
Head over to #lgrevolution and I'll be there as IOMonster.

Yep, for ICS we need a lot of work in the KGSL department in kernel for getting proper Adreno support working... Tiamat is working on adding the new KGSL/USB/Genlock support to his MSM7X30 repo here ( http://git.tiamat-dev.com/7x30/htc-kernel-msm7x30/ ) and after that we need to merge our kernel sources with his (boardfiles, includes, configs, etc)

Booting to lockscreen is great, but there's a LOT of work to be done before we can have a "working" ICS by any stretch of the imagination... ICS is a whole new beast, unfortunately...

Great --I'll be on the channel as achristianson or achristi.

Thanks so much for all that info.

I'm sure it is a long road to a fully working ICS. I see it as a challenge and will just keep fixing the next broken thing...
 
Last edited:

Grizzy3

Senior Member
Jan 7, 2012
187
27
It's really awesome to see everyone working on this. I really wish I knew more about this stuff to be able to help. All this is really making me wanna read up on this stuff and learn how to do some of it. Until that happens, I'll be more than happy to help out with any testing or in any other way within my capabilities. I got a Revo just sitting there deactived waiting for that ICS goodness.

Thanks a lot for everyone working on this. Those of us that aren't as gifted really aprreciate the work you guys are putting in.
 

Cybie257

Senior Member
Aug 17, 2011
182
63
Salem, OR
It's really awesome to see everyone working on this. I really wish I knew more about this stuff to be able to help. All this is really making me wanna read up on this stuff and learn how to do some of it. Until that happens, I'll be more than happy to help out with any testing or in any other way within my capabilities. I got a Revo just sitting there deactived waiting for that ICS goodness.

Thanks a lot for everyone working on this. Those of us that aren't as gifted really aprreciate the work you guys are putting in.

If you've noticed my post in the CM7 Thread, which somehow 'feels' like it's sparked something off here (maybe just timing, lol), I am beginning to work on this stuff.

Anyone can do it, but the problem is motivation and the willingness to learn something new. You will never learn this stuff unless you're willing to fail and fail again. You learn by mistakes and mistakes sometimes turn into innovation for new things and ideas. :)

There is a lot of Dev's all of a sudden and I do agree, it's great to see. I was almost about to start looking at the Nexus. When I realized I would lose out on the $130 of extra accessories for my Revo (Car Dock, home dock, extra battery, car charge, etc.), And the fact the the Nexus had no External SD Card, I was like... Nah.. Time to step up and see what I can do to make the Revo a well-supported, up to date, kick-ass device. If LG and Verizon wanna sit on their asses, let'em. We make the phone better anyhow, right? MT, Cubed, and anyone else who has already contributed so much, has made this phone 10X's what it ever was out of the box. And, unlike LG and Verizon, Dev's like MT (and others) don't give us the run around on the next release, but a timeline. :D

-Cybie
 

Grizzy3

Senior Member
Jan 7, 2012
187
27
If you've noticed my post in the CM7 Thread, which somehow 'feels' like it's sparked something off here (maybe just timing, lol), I am beginning to work on this stuff.

Anyone can do it, but the problem is motivation and the willingness to learn something new. You will never learn this stuff unless you're willing to fail and fail again. You learn by mistakes and mistakes sometimes turn into innovation for new things and ideas. :)

There is a lot of Dev's all of a sudden and I do agree, it's great to see. I was almost about to start looking at the Nexus. When I realized I would lose out on the $130 of extra accessories for my Revo (Car Dock, home dock, extra battery, car charge, etc.), And the fact the the Nexus had no External SD Card, I was like... Nah.. Time to step up and see what I can do to make the Revo a well-supported, up to date, kick-ass device. If LG and Verizon wanna sit on their asses, let'em. We make the phone better anyhow, right? MT, Cubed, and anyone else who has already contributed so much, has made this phone 10X's what it ever was out of the box. And, unlike LG and Verizon, Dev's like MT (and others) don't give us the run around on the next release, but a timeline. :D

-Cybie


Exactly how i feel. Forget LG and Verizon. You guys are the ones taking these average phones into something great. I definitely gave up on getting any real support from either of them.

I really want to start getting into this. I have a little bit of time on my hands and will definitely be reading up on all this. I think you sparked something with your post lol. I know other people like MT and theCubed were already working on some things but I think you definitely added a little spark lol. Very happy to see other people jumping on board to help out. Hopefully I can too
 

aichrist

Member
Sep 28, 2011
29
49
Exactly how i feel. Forget LG and Verizon. You guys are the ones taking these average phones into something great. I definitely gave up on getting any real support from either of them.

I really want to start getting into this. I have a little bit of time on my hands and will definitely be reading up on all this. I think you sparked something with your post lol. I know other people like MT and theCubed were already working on some things but I think you definitely added a little spark lol. Very happy to see other people jumping on board to help out. Hopefully I can too

Yup! The motivation for me has been that support by LG and VZ is diminishing. This is the beauty of open source, though. Now the community can support it.

I believe the Revolution really is a good phone. It's got a good GPU and CPU. It's not dual-core, no, but with a good ROM on there, it can be much more efficient than a dual-core phone that is loaded with crapware.

Cybie did inspire me to put my work up sooner so that we can all focus on it and not duplicate our efforts as much.
 

aichrist

Member
Sep 28, 2011
29
49
Head over to #lgrevolution and I'll be there as IOMonster.

Yep, for ICS we need a lot of work in the KGSL department in kernel for getting proper Adreno support working... Tiamat is working on adding the new KGSL/USB/Genlock support to his MSM7X30 repo here ( http://git.tiamat-dev.com/7x30/htc-kernel-msm7x30/ ) and after that we need to merge our kernel sources with his (boardfiles, includes, configs, etc)

Booting to lockscreen is great, but there's a LOT of work to be done before we can have a "working" ICS by any stretch of the imagination... ICS is a whole new beast, unfortunately...

OK so I was doing more debugging last night in the EGL/SurfaceFlinger/HardwareRenderer code. I also looked at some of Tiamat's work on the MSM7X30 kernel.

I can see now what you mean with regard to merging parts of that kernel into our own. I am assuming that kernel is being crafted to work with ICS-friendly EGL blobs for the adreno205. Is that correct? If so, then that kernel would have code that would be required to talk to the binary blob EGL drivers for Adreno205 that we would pull from some device that has the same chip and has official proprietary drivers for ICS available. I believe the HTC Droid Incredible 2 is one such device. Is this roughly what you were thinking?

I initially had thought of going down a different path: Instead of using newer ICS proprietary drivers and updating our kernel to support it, I was planning on keeping the kernel we have and the binary drivers we have, which are already made to work with each other. The work then required to get ICS working would be to change parts of the ICS userspace code such that they'd work with our older drivers. I don't have the links on hand, but I believe this is possible because I read about others taking this strategy on other devices that do not have ICS support officially but do have proper GB support. It also makes sense to me logically that the userspace code could be changed to our heart's content to work with older drivers, since we have full access to that source code. One option that I read about that we could potentially do is write a wrapper for the *adreno200*so librares that would implement the newer API that ICS is expecting and would translate the calls into the older API that is supported in our GB proprietary drivers.

It looks to me like we have two possible ways forward with regard to getting hardware acceleration working: upgrading the kernel and drivers to have "proper" ICS support, or patching ICS userspace code to work with GB drivers and kernel. I believe that patching the ICS userspace code would get us up and running faster while upgrading the kernel and adding newer drivers would be the better long-term solution.

Here are a couple of patches that people have already implemented to support older EGL blobs/kernels:


Let me know what you think.

Also, what do you think about using the BOARD_USES_QCOM_HARDWARE := true directive to our CM board configuration? I noticed references to the QCOM_HARDWARE flags all over the video code. It seems we would want this since we are using a QCOM video chip. The only problem is the build failed for me when I added this flag. There's an issue about it on github: https://github.com/CyanogenMod/android_hardware_qcom_display/issues/3#issuecomment-3457179.
 

zyrtek69

Senior Member
Oct 7, 2010
428
33
OK so I was doing more debugging last night in the EGL/SurfaceFlinger/HardwareRenderer code. I also looked at some of Tiamat's work on the MSM7X30 kernel.

I can see now what you mean with regard to merging parts of that kernel into our own. I am assuming that kernel is being crafted to work with ICS-friendly EGL blobs for the adreno205. Is that correct? If so, then that kernel would have code that would be required to talk to the binary blob EGL drivers for Adreno205 that we would pull from some device that has the same chip and has official proprietary drivers for ICS available. I believe the HTC Droid Incredible 2 is one such device. Is this roughly what you were thinking?

I initially had thought of going down a different path: Instead of using newer ICS proprietary drivers and updating our kernel to support it, I was planning on keeping the kernel we have and the binary drivers we have, which are already made to work with each other. The work then required to get ICS working would be to change parts of the ICS userspace code such that they'd work with our older drivers. I don't have the links on hand, but I believe this is possible because I read about others taking this strategy on other devices that do not have ICS support officially but do have proper GB support. It also makes sense to me logically that the userspace code could be changed to our heart's content to work with older drivers, since we have full access to that source code. One option that I read about that we could potentially do is write a wrapper for the *adreno200*so librares that would implement the newer API that ICS is expecting and would translate the calls into the older API that is supported in our GB proprietary drivers.

It looks to me like we have two possible ways forward with regard to getting hardware acceleration working: upgrading the kernel and drivers to have "proper" ICS support, or patching ICS userspace code to work with GB drivers and kernel. I believe that patching the ICS userspace code would get us up and running faster while upgrading the kernel and adding newer drivers would be the better long-term solution.

Here are a couple of patches that people have already implemented to support older EGL blobs/kernels:


Let me know what you think.

Also, what do you think about using the BOARD_USES_QCOM_HARDWARE := true directive to our CM board configuration? I noticed references to the QCOM_HARDWARE flags all over the video code. It seems we would want this since we are using a QCOM video chip. The only problem is the build failed for me when I added this flag. There's an issue about it on github: https://github.com/CyanogenMod/android_hardware_qcom_display/issues/3#issuecomment-3457179.

You guys are great! I hope this is doable, keep up the hard work..

Sent from my Nexus S 4G using XDA App
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    I have been working on porting CM9 to the VS910. So far I have gotten it to boot to the lock screen.

    What Works
    • Boot animation
    • Lock screen
    • SurfaceFlinger
    • logcat/adb shell
    • 3d accel is half working. I have gotten SurfaceFlinger to load up and interface the proprietary drivers (from GB) correctly, but HardwareRenderer (java framework) fails because the drivers don't give up a valid config.

    What Doesn't Work
    • Touch screen
    • HardwareRenderer (fails because HardwareRenderer.chooseEglConfig() returns null value)
    • Everything else

    Currently this ROM is totally unusuable for anything except for development. At this point, I do believe it is possible to get CM9 running, but it will take a good bit of developer effort. It would be helpful for any other developers around here to give some insight on the errors that come up in the adb logs.

    How To Build
    1. Follow Google's instructions for setting up a Linux system or VM for Android AOSP building
    2. Follow CM9 build instructions up to brunch command
    3. git clone git://github.com/andyichr/makerom.git to a location, such as ~/android/makerom
    4. Overlay the files in ~/android/makerom/cm9-system/overlay onto the cm9/system directory (this adds vs910 brunch)
    5. Adjust values in makerom.sh to match your own paths (MAKE SURE TO POINT IT AT A VALID KERNEL --I didn't include instructions for building a kernel)
    6. Adjust values in makecm9.sh to match your own paths
    7. Run ~/android/makerom/makecm9.sh to build cm9 (this takes a long time, depending on your system)
    8. If build is successful, run ~/makerom/makerom.sh which will output a ROM which may be flashed to the device for testing

    This is very rough work, but it proves that the basic parts of CM9/ICS do function on the Revolution. The cyanogenmod developers have already added some patches to the android source which allow ICS to run using video drivers from Gingerbread. This means it should be possible to get things working.

    The current major problem with this ROM is that the HardwareRenderer does not initialize. Immediately after this, the main trebuchet process is killed and the system reboots itself after a while.

    I will be happy to do what I can to support the process of porting CM9 to our phones. I read that a couple of other devs may be looking into porting CM7, but I think focusing on 9 might be more worth the effort, since we already have Gingerbread.

    I have also attached a logcat to this post which should give developers some idea about what exactly is broken, which will lead to the first steps of debugging and porting.

    Any interested developers should fork my repo on github (git://github.com/andyichr/makerom.git) which has the build scripts and patches.

    That's about it for now. I very well may have left out some steps along the way. If you try to follow this process and it doesn't work out, let me know and I'll help you out.

    ROM Download (very broken --only use for testing and development)

    http://www.multiupload.com/GI0MLQYTE0 - Flash this if you want to see ICS boot to the lock screen or help test/debug. It's not useful for much else at this point.

    We're getting there! I've already patched the android egl framework code slightly and built a kernel. CM team already patched frameworks/base for 2.3 video drivers. We'll patch what we have to to get this thing running! I am pretty busy but I will follow this thread and I hope for this to be a collaborative, transparent porting process! Good luck!
    14
    Hey guys n gals, I submitted CWM to koush today for a official build. And CWM Touch will be available once koush does his thing, or hets his automated stuff completed on builder. finished lol.
    9
    Hi All,

    I'll give you a quick update on what's going on. I spent the weekend building and testing a build that has more support for our msm7x30 hardware. I did get the EGL problem out of the way, but the kernel is complaining about kgsl page faults. I believe this is because the build I have is using the gralloc.msm7x30 library built by the msm7x30 common config where we probably need to use the gralloc.msm7k library taken from a GB build because the drivers, firmware, and kernel are from GB.

    Regarding the genlock support that thecubed mentioned, I found a CM build flag to turn off genlock support in the android build, which should allow us to use a kernel that doesn't have the genlock device driver. That said, I found a fellow developer named Isaac who is doing some great work on the Motorola Triumph. He's got a GB kernel that the applied genlock to. Looking at his work, it should be possible for me to do the same with our kernel. So, even though we may not _need_ genlock support in our kernel, it may be an easy win to get anyway, and it will make our kernel more ICS friendly.

    From here, the next step I am going to do is merge what I can from Isaac's work (kernel and android device folder) into my own work. I'll also work on getting android to use our gralloc.msm7k rather than the generic msm7x30 one. It's not immediately obvious how to do that in the Android build config files, nor does it work to simply substitute our prebuilt library in system/lib/hw/.

    Another thing -- beamer is sending me an extra phone of his for me to test with. This will help me tremendously as I won't have to backup my daily driver phone, take it apart, and reflash it every time I test a CM9 build. So, thanks a zillion, beamer! Your generosity will increase the efficiency of my process at least two-fold.
    9
    Is anyone actively working on this?

    Sent from my VS910 4G using xda premium

    I still need to finsh that repo so others can take a stab at it.

    I been working on RIL with CM7, which will need to be working for CM9 too. ;)
    8
    Not sure about dead dead but I just had a new baby and finished up a semester of school and also started a new day job so I just haven't had time for any new contributions. Also my testing phone is in an awkward state with ext4 partitions and an ext4 recovery but we have no actual working ext4 roms (my ics rom included). So I have to do a bit of work to even get back to regular testing.

    That said I am not "done" with this phone by any means and also things have settled down in my life a bit and I won't sign up for any more classes until fall at the earliest.

    Taking all that into consideration, this is something I do for fun and probably most other devs do it for fun too so you really just have to see what developers and hackers put out and be happy with that. When there are expectations about what will be released in the future then it just becomes a job that doesn't pay very well. My rate in the real world is good so I don't really need this type of open source "internship" if you will. I just want to give you all some insight into a developer's thought process on this type of thing. In other words just be happy with what is out already and hope, but don't expect, for new contributions.

    Sent from my VS910 4G using xda premium