[DEV] A1 Lenovo IdeaPad ICS Port

Search This thread

spiegeleixxl

Member
Jan 1, 2012
28
71
Hello.

In this topic we talk about the Lenovo ICS versions and the home-brown self-made Ice Cream Sandwich I'm trying to build.

Currently I'm trying to port Ice Cream Sandwich (Android 4.0.4) to A1 IdeaPad by Lenovo.

Currently working:
* Touchscreen Input
* SGX530 Hardware Graphic Acceleration
* Orientation
* 3D Acceleration
* Brightness (using lights.omap3.so from Lenovo)


Not working:
* Audio
* ...

UPDATE 05.08.2012:
SGX530 Integration succeeded into Android AOSP ICS 4.0.4!
One should have to know that you have to use a DIFFERENT SGX DDK for ICS than for Gingerbread but that's not documented... [email protected] for ICS, 1.7.X for GB. Installed the proper components, ES=5.X and then we are rolling. I'm now trying to use some of the ICS libraries from the Lenovo ICS, but those have horrible dependencies. Thou I can most likely take the camera.omap3.so, I still want to be able to build those libraries from source, where available, so I gotta have to collect some stuff together. If this progresses nicely, I might be able to make a CM9 port here aswell, but for now, I need to get the rest of the functionallity working (WiFi driver [dhd_oob.ko] registers, but doesn't appear on the ICS yet, same for bluetooth. Sound is not working yet (E/AudioFlinger( 4034): createTrack_l() Bad parameter: sampleRate 44100 m 44100 format 1 m 1, channelMask 0x0000000 m 0x00000001 for output 0x3 with format 67520, e.a. channelMask is not doing what it should do), ...)



Again, I'm sorry that I don't have much spare time right now, so the progress is rather slow.


Status:
Right now Ice Cream Sandwich is booting, I had to patch SystemUI.apk to force hardware acceleration off. I tried to set debug.egl.hw=0 in the prop-file, but it didn't change anything, so I had to modify the source to hard-set it to accept no hardware acceleration.

I'm trying to get input to work, but it seems that the mg-capacity / Morgan Touch Capacity Display doesn't give proper values to InputReader. Since the libinput.so got massivly changed after switching from GingerBread to Ice Cream Sandwich, it doesn't seem to give proper values to the InputReader anymore. I patched/modified my libinput.so to display raw events and log them to logcat, but I gotta take a look if I have to write myself a wrapper for that.


UPDATE 31.03.2012:
- I was able to fix the missing BTN_TOUCH in the kernel sources. Now we have a working touchscreen.
- Added ro.sf.hwrotation 270, so the input is correct

UPDATE 25.07.2012:
- Sorry for the lack of updates, I currently don't have much spare time to work on this, sadly.
- What I found out is, that I was able to implement SGX530 libraries to Ice Cream Sandwich, but the driver wouldn't really activate my screen. To be honest, when i loaded the SGX drivers, my screen or speakers (not sure which) started to give this really high pitched noise. I'm not sure where it came from, but I'm sure I ****ed something up with the SGX drivers. We can't simply take the Gingerbread SGX Drivers to Ice Cream Sandwich, sadly. And we can't simply use the SGX Module from the version Lenovo provided, since they depend on a certain kernel module.
E.a. If you use a GingerBread Kernel with the Input Fix (like the one I compiled), you can boot Ice Cream Sandwich fine and stuff, but you can not use the SGX530 modules from the Lenovo ICS. (As this one flashes a new kernel version, and modifies the MBR and does other witch-craftery)
My ultimate goal would be, to use the Gingerbread Kernel from Lenovo with the additional screen input fixes for ICS and add the SGX/PowerVR 530 to that, so we would have hardware acceleration (for now). I want to avoid the 3.x kernel from Lenovo as much as possible as it seems to have various terrible problems in the regular use (disconnecting Wifi, standby problems, power supply problems, etc.)
We can't simply make an omap-kernel from the 3.x tree aswell, as we are missing lots of the arch/arm/mach-omap2/board-evt* and the important arch/arm/mach-omap2/board-evt1a.c which initializes our board for the boot process. And even if we could use a 3.x tree and implement powerVR into it, we would have to port ALL the changes Lenovo made to the sources (some MMC adaptions, power supply adaptions, modification to the rfkill, etc.) to the new kernel by which, most likely, lenovo will release either another pad or ICS for A1 (as it would take a HUGE amount of time).

So the goals are:
- Wait for Lenovo to stabilize the kernel of ICS and use their ROM.
OR:
- Use GB-Kernel from Lenovo Source Ball, try to implement PowerVR/SGX530 drivers and user-land applications to the ICS
- Slowly adapting other OMAP devices and libraries (brightness, vibration, sound, ...)


Chat:
#ideapad-a1 @ irc.freenode.net
(it's gmarkall's channel, but I hang out there.)
 
Last edited:

TippyTurtle

Senior Member
Feb 13, 2011
59
19
My guess is that the Kernel is missing most of the drivers you need. I have been able to sort out this hardware so far:
CPU: TI OMAP3622 ARM® Cortex™-A8 processor
Video: PowerVR SGX530
Wireless: Broadcom BCM4329
Bluetooth: Broadcom BCM4329
Audio: TI TLV320AIC3110 (tlv320aic3111)
GPS: Broadcom BCM4751
I2C Ambient Light Sensor: Capella CM3217 (I2C) input5
Power Management: TI twl4030 (I2C)
Soft keypad?: TI twl4030 (I2C) input1
Capacitive Touch: TI twl4030 (I2C) input2
Power Button: TI twl4030 (I2C) input3
Back Camera: s5k5ca (3mp camera)
Front Camera: omap34xxcam Aptina MT9V115
Accelerometer (G sensor): Analog Devices ADXL345 (I2C) input4
Gyroscope: None
eCompass: None

Hopefully this helps when choosing kernel options.

---------- Post added at 08:58 AM ---------- Previous post was at 08:55 AM ----------

...additionally, the Nook Color is nearly the same hardware from what I can tell and they seem to be getting pretty far on ICS.


If someone can post a dmesg listing from a nook color, I can compare it to an A1 to try to document the hardware differences.
 

spiegeleixxl

Member
Jan 1, 2012
28
71
OK, some news:
It seems I'm pretty much f*cked until we get the sources for the kernel. The GB Kernel doesn't send the proper events for InputReader/EventHub.

I investigated the input within the system using the "getevent" tool (getevent -l).
The device itself seems to be able to report PRESSURE from what I've seen, just plain doesn't want to do it. (using 'dumpsys window')

It currently doesn't send a PRESSURE event which we need for activating the touchscreen. (Instead it gets sent by the redicoulus light sensor...)

One attempt would be to hack away and modify the InputReader to send a ABS_MT_PRESSURE event on every ABS_MT_X modification, or just wait for the sources.

On related note: I also tried to compile CM9 in an attempt to see if it may fix the input issuses or use a different input system, but it's just the same result as using vanilla ICS :(
 
  • Like
Reactions: purloiner

stranaha

New member
Jan 21, 2012
2
0
Osaka
OK, some news:
It seems I'm pretty much f*cked until we get the sources for the kernel. The GB Kernel doesn't send the proper events for InputReader/EventHub.

I investigated the input within the system using the "getevent" tool (getevent -l).
The device itself seems to be able to report PRESSURE from what I've seen, just plain doesn't want to do it. (using 'dumpsys window')

It currently doesn't send a PRESSURE event which we need for activating the touchscreen. (Instead it gets sent by the redicoulus light sensor...)

One attempt would be to hack away and modify the InputReader to send a ABS_MT_PRESSURE event on every ABS_MT_X modification, or just wait for the sources.

On related note: I also tried to compile CM9 in an attempt to see if it may fix the input issuses or use a different input system, but it's just the same result as using vanilla ICS :(

Access to source would definitely make this a lot easier! Thankfully, the admin over at the Lenovo forum has promised to release the A1 source within the next week (just Google search "Lenovo Ideapad A1 source code", should be first or second link).

Thanks for spearheading this project. Would be great to see ICS on the A1!!
 

jomeister15

Senior Member
Mar 17, 2011
350
585
If you don't mind me asking, how exactly did you force hardware acceleration off inside of the SystemUI.apk? I'm currently working on doing something similar to this for the skyrocket, but I keep running into systeumui force closes.
 

spiegeleixxl

Member
Jan 1, 2012
28
71
One possible change would be changing the AndroidManifest.xml, i suppose:
frameworks/base/packages/SystemUI/AndroidManifest.xml: android:hardwareAccelerated="true"

Allthou I changed it somewhere in source, I can look it up for you later, try changing that XML option.
 

drdoolittle

Senior Member
Feb 20, 2012
52
8
Great, can't wait for the A1 source being published - alas I would be glad if I would have any experience with linux/modding to help getting ICS to work on the A1 :( Kudos to spiegeleixxl for spearheading the development here!
 

ThorStev

New member
Feb 21, 2012
2
2
Source Code released

finally Lenovo did it...

Thanks to Mark from Lenovo !

download.lenovo.com/lenovo/content/sm/A1-Kernel-Source.tgz
 

spiegeleixxl

Member
Jan 1, 2012
28
71

Luckily enough the mg-i2c-driver is in there. It looks like it's failing to report some ABS_MT messages that are required for libinput/EventHub/InputReader to work. If gmarkall and me get the kernel compiled and working we can get rolling on porting ICS.

The graphics driver for ICS are also available via TI SGX SDK which is freely available.

So we're going into a good direction! :)
 
  • Like
Reactions: AmberLynn
Feb 19, 2012
32
1
Yangon, Myanmar
waiting for your first build .. ;)

how glad to see someone porting ICS to my cute A1 !
I've been searching someone trying to port ics since i bought A1 ...
wanna see a first build of ics to taste on my pad...
so much appreciate your works here .. guys....
 

spiegeleixxl

Member
Jan 1, 2012
28
71
how glad to see someone porting ICS to my cute A1 !
I've been searching someone trying to port ics since i bought A1 ...
wanna see a first build of ics to taste on my pad...
so much appreciate your works here .. guys....

It's not like i can't give you a BUILD, you'll even SEE something, but you won't be able to DO something cause it doesn't register the press event. ;)
 
  • Like
Reactions: AmberLynn

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    Hello.

    In this topic we talk about the Lenovo ICS versions and the home-brown self-made Ice Cream Sandwich I'm trying to build.

    Currently I'm trying to port Ice Cream Sandwich (Android 4.0.4) to A1 IdeaPad by Lenovo.

    Currently working:
    * Touchscreen Input
    * SGX530 Hardware Graphic Acceleration
    * Orientation
    * 3D Acceleration
    * Brightness (using lights.omap3.so from Lenovo)


    Not working:
    * Audio
    * ...

    UPDATE 05.08.2012:
    SGX530 Integration succeeded into Android AOSP ICS 4.0.4!
    One should have to know that you have to use a DIFFERENT SGX DDK for ICS than for Gingerbread but that's not documented... [email protected] for ICS, 1.7.X for GB. Installed the proper components, ES=5.X and then we are rolling. I'm now trying to use some of the ICS libraries from the Lenovo ICS, but those have horrible dependencies. Thou I can most likely take the camera.omap3.so, I still want to be able to build those libraries from source, where available, so I gotta have to collect some stuff together. If this progresses nicely, I might be able to make a CM9 port here aswell, but for now, I need to get the rest of the functionallity working (WiFi driver [dhd_oob.ko] registers, but doesn't appear on the ICS yet, same for bluetooth. Sound is not working yet (E/AudioFlinger( 4034): createTrack_l() Bad parameter: sampleRate 44100 m 44100 format 1 m 1, channelMask 0x0000000 m 0x00000001 for output 0x3 with format 67520, e.a. channelMask is not doing what it should do), ...)



    Again, I'm sorry that I don't have much spare time right now, so the progress is rather slow.


    Status:
    Right now Ice Cream Sandwich is booting, I had to patch SystemUI.apk to force hardware acceleration off. I tried to set debug.egl.hw=0 in the prop-file, but it didn't change anything, so I had to modify the source to hard-set it to accept no hardware acceleration.

    I'm trying to get input to work, but it seems that the mg-capacity / Morgan Touch Capacity Display doesn't give proper values to InputReader. Since the libinput.so got massivly changed after switching from GingerBread to Ice Cream Sandwich, it doesn't seem to give proper values to the InputReader anymore. I patched/modified my libinput.so to display raw events and log them to logcat, but I gotta take a look if I have to write myself a wrapper for that.


    UPDATE 31.03.2012:
    - I was able to fix the missing BTN_TOUCH in the kernel sources. Now we have a working touchscreen.
    - Added ro.sf.hwrotation 270, so the input is correct

    UPDATE 25.07.2012:
    - Sorry for the lack of updates, I currently don't have much spare time to work on this, sadly.
    - What I found out is, that I was able to implement SGX530 libraries to Ice Cream Sandwich, but the driver wouldn't really activate my screen. To be honest, when i loaded the SGX drivers, my screen or speakers (not sure which) started to give this really high pitched noise. I'm not sure where it came from, but I'm sure I ****ed something up with the SGX drivers. We can't simply take the Gingerbread SGX Drivers to Ice Cream Sandwich, sadly. And we can't simply use the SGX Module from the version Lenovo provided, since they depend on a certain kernel module.
    E.a. If you use a GingerBread Kernel with the Input Fix (like the one I compiled), you can boot Ice Cream Sandwich fine and stuff, but you can not use the SGX530 modules from the Lenovo ICS. (As this one flashes a new kernel version, and modifies the MBR and does other witch-craftery)
    My ultimate goal would be, to use the Gingerbread Kernel from Lenovo with the additional screen input fixes for ICS and add the SGX/PowerVR 530 to that, so we would have hardware acceleration (for now). I want to avoid the 3.x kernel from Lenovo as much as possible as it seems to have various terrible problems in the regular use (disconnecting Wifi, standby problems, power supply problems, etc.)
    We can't simply make an omap-kernel from the 3.x tree aswell, as we are missing lots of the arch/arm/mach-omap2/board-evt* and the important arch/arm/mach-omap2/board-evt1a.c which initializes our board for the boot process. And even if we could use a 3.x tree and implement powerVR into it, we would have to port ALL the changes Lenovo made to the sources (some MMC adaptions, power supply adaptions, modification to the rfkill, etc.) to the new kernel by which, most likely, lenovo will release either another pad or ICS for A1 (as it would take a HUGE amount of time).

    So the goals are:
    - Wait for Lenovo to stabilize the kernel of ICS and use their ROM.
    OR:
    - Use GB-Kernel from Lenovo Source Ball, try to implement PowerVR/SGX530 drivers and user-land applications to the ICS
    - Slowly adapting other OMAP devices and libraries (brightness, vibration, sound, ...)


    Chat:
    #ideapad-a1 @ irc.freenode.net
    (it's gmarkall's channel, but I hang out there.)
    9
    I can photograph it for you if you want, putting it up tomorrow :p

    scaled.php

    scaled.php

    scaled.php


    My A1 is a little bit dirty, shame on me.
    I also put up a nightly kernel with ICS compatible input support. http://gmarkall.spiegeleixxl.de/gmarkall/nightlies/cm7-a1-kernel-2012-04-04.uImage

    Here is a "test" version. You have to move the system/ and data/ folder to the root/ folder and put that onto the ext2 partition of a sdcard, put MLO, u-boot.bin and the kernel into the fat32 partition of your sdcard.

    DO NOT FLASH THIS KERNEL AND/OR SYSTEM TO YOUR A1, IF YOU DO SO, YOU COULD RISK BRICKING YOUR DEVICE!

    rootfs: http://gmarkall.spiegeleixxl.de/ICS/a1_dev_ics_rootfs.tar.bz2
    tested kernel: http://gmarkall.spiegeleixxl.de/ICS/a1_dev_ics_kernel.uImage
    idc-file to put into /system/usr/idc, so that the input device is a real "touch screen" and not a touching device: http://gmarkall.spiegeleixxl.de/ICS/mg-capacitive.idc
    9
    Yes, we finally got a full source, we can compile kernels now, I'm implementing the missing module as we speak, so expect ICS in the following week!
    5
    The current status is, that I'm trying to integrate SGX/3D Accelleration as before.
    4

    For everyone who is not able to understand German:

    * Download ICS-ROM: http://sdrv.ms/JYFPao (it's file "ISC1.2")
    * Flash with stock recovery tool: copy zip file from above to SD card and rename it to "update.zip". Power off. Press "Volume -" & power on again. DO NOT try CWM!
    * Root with help of "A1 rooter" update package
    * Fix SD card-Bug with help of "A1_ICS_SD-Card.zip" update package