Jump to content

Advent Vega kernel source code now available!


Guest PaulOBrien

Recommended Posts

Hi everyone,

I like to finish my final update but I am trying to edit the screen rotation but I can't seem to find the kernel file for it. On my desire HD we used a sensor file, but I can't find the correct one here.

So which should I edit?

Kind Regards,

Areo

Link to comment
Share on other sites

Guest ejtagle

Hi everyone,

I like to finish my final update but I am trying to edit the screen rotation but I can't seem to find the kernel file for it. On my desire HD we used a sensor file, but I can't find the correct one here.

So which should I edit?

Kind Regards,

Areo

The accelerometer driver is located in /drivers/input/misc/bma150.c ... But, you shouldn't be editing it... There are no bugs there ;) (in SW development, they say we should not try to "fix" what is not "broken" ;) )

Regards

Eduardo

Link to comment
Share on other sites

Guest ejtagle

And for the curious... An small riddle ... What is the purpose of the attached file ? - It is truly preliminary (and completely untested!) support for... fill in the blanks ... AOSP ... fill in blanks ... shuttle.

If any could help with it, it would make things to happen faster! :)

port.rar

Link to comment
Share on other sites

And for the curious... An small riddle ... What is the purpose of the attached file ? - It is truly preliminary (and completely untested!) support for... fill in the blanks ... AOSP ... fill in blanks ... shuttle.

If any could help with it, it would make things to happen faster! :)

Yummy !!!

add_lunch_combo full_shuttle-userdebug

Nice one :)

Link to comment
Share on other sites

Guest ejtagle

As far as i see, ICS and HC are very similar regarding hw drivers, except audio and camera ... But, all the other HC drivers should work in ICS with no modifications... That includes OpenGL and OMX drivers for tegra2 :)

I am not referring to kernel drivers, rather than, android libraries that interfase kernel exposed apis to the android framework. Kernel should not require modifications for ICS :D

Edited by ejtagle
Link to comment
Share on other sites

As far as i see, ICS and HC are very similar regarding hw drivers, except audio and camera ... But, all the other HC drivers should work in ICS with no modifications... That includes OpenGL and OMX drivers for tegra2 :)

Yeah you'd think it would be ok ... i nearly have it booting with the stuff you sent out ... EGL is an issue for me though.. when i use the libGLES_android.so file that comes with 4.0, i get boot loops with the android splash because egl is not inited ... when i use the egl libs from 3.2 .. i get a blank screen with boot loops ...

Nearly there though :)

Ill add some more detail tonight when i have some more time, leving work now to go home...

D/libEGL ( 139): loaded /system/lib/egl/libGLES_android.so

D/dalvikvm( 135): GC_EXPLICIT freed 76K, 22% free 6712K/8579K, paused 2ms+2ms

D/libEGL ( 139): loaded /system/lib/egl/libEGL_tegra.so

D/libEGL ( 139): loaded /system/lib/egl/libGLESv1_CM_tegra.so

D/libEGL ( 139): loaded /system/lib/egl/libGLESv2_tegra.so

E/libEGL ( 139): eglQuerySurface:477 error 300d (EGL_BAD_SURFACE)

E/libEGL ( 139): eglQuerySurface:477 error 300d (EGL_BAD_SURFACE)

E/libEGL ( 139): eglQuerySurface:477 error 300d (EGL_BAD_SURFACE)

E/libEGL ( 139): eglMakeCurrent:685 error 3009 (EGL_BAD_MATCH)

E/SurfaceFlinger( 139): Couldn't create a working GLES context. check logs. exiting...

Above is with all 3.2 EGL and libnv* libs added ... black screen on boot ....

Wondering now how to swicth GL off to use software renderer ... ill look to that later also ....

Edited by Cass67
Link to comment
Share on other sites

Guest ejtagle

Yeah you'd think it would be ok ... i nearly have it booting with the stuff you sent out ... EGL is an issue for me though.. when i use the libGLES_android.so file that comes with 4.0, i get boot loops with the android splash because egl is not inited ... when i use the egl libs from 3.2 .. i get a blank screen with boot loops ...

Nearly there though :)

Ill add some more detail tonight when i have some more time, leving work now to go home...

D/libEGL ( 139): loaded /system/lib/egl/libGLES_android.so

D/dalvikvm( 135): GC_EXPLICIT freed 76K, 22% free 6712K/8579K, paused 2ms+2ms

D/libEGL ( 139): loaded /system/lib/egl/libEGL_tegra.so

D/libEGL ( 139): loaded /system/lib/egl/libGLESv1_CM_tegra.so

D/libEGL ( 139): loaded /system/lib/egl/libGLESv2_tegra.so

E/libEGL ( 139): eglQuerySurface:477 error 300d (EGL_BAD_SURFACE)

E/libEGL ( 139): eglQuerySurface:477 error 300d (EGL_BAD_SURFACE)

E/libEGL ( 139): eglQuerySurface:477 error 300d (EGL_BAD_SURFACE)

E/libEGL ( 139): eglMakeCurrent:685 error 3009 (EGL_BAD_MATCH)

E/SurfaceFlinger( 139): Couldn't create a working GLES context. check logs. exiting...

Above is with all 3.2 EGL and libnv* libs added ... black screen on boot ....

Wondering now how to swicth GL off to use software renderer ... ill look to that later also ....

this EGL_BAD_SURFACE makes me believe that we also need to use the tegra surface allocator. We don't have sources for it, but i think the HC allocator should perfectly work with ICS. In fact, i started from the opposite side.. Using the HC rom as a base, i kept all the libnv*.so and also the /system/lib/hw/* and replaced the rest with ICS versions, and i was able to go even further. Even if some libraries do not start with libnv*.* , if you look for libraries containing the string "Nvidia", you'll find there are some others that must be kept also

Regards,

Eduardo

PS: ICS without HW acceleration is a no go .. And, i am pretty sure we can use the original HC openGl drivers, as starting from HC rom and gradually replacing components with the ICS versions has worked for me previously ... Just in case, to enable sw acceleration, you just need to modify the egl.cfg file, or i least, i think so (not tried it yet)

Link to comment
Share on other sites

Ill have a look more later... The egl.cfg still bootloops when I edit it too.. tried that...

EDIT :-

Ok i have it booting, unlock screen displays ...

Problems -

Display is green --

Guess due hw accel problems .. without hw accel in place we get the GLES errors.

hwcomposer.tegra.so --

Causes bootloops, needs to be out the way to get login .. if its in place on occasion we get a color screen ... still no touch tho ..

Touchscreen --

Non working - IDC is in place -

With hw composer removed we get i2c errors

<3>[ 527.742178] it7260 4-0046: failed to read points [1]

<3>[ 527.742256] tegra-i2c tegra-i2c.3: I2c error status 0x00000008

<3>[ 527.742273] tegra-i2c tegra-i2c.3: no acknowledge from address 0x46

<3>[ 527.742289] tegra-i2c tegra-i2c.3: Packet status 0x00010009

I dont see this with it in place, but loops too much and still does not work on the occasion i get to login screen.

Everything else -

non working :) -- Get to that later

Eduardo, Team -- if you want the nvflash/system for this i can send it on, let me know, i dont want to post it publicly as its a mess right now ...

Rgds

Cass

Edited by Cass67
Link to comment
Share on other sites

Guest ejtagle

Ill have a look more later... The egl.cfg still bootloops when I edit it too.. tried that...

EDIT :-

Ok i have it booting, unlock screen displays ...

Problems -

Display is green --

Guess due hw accel problems .. without hw accel in place we get the GLES errors.

hwcomposer.tegra.so --

Causes bootloops, needs to be out the way to get login .. if its in place on occasion we get a color screen ... still no touch tho ..

Touchscreen --

Non working - IDC is in place -

With hw composer removed we get i2c errors

<3>[ 527.742178] it7260 4-0046: failed to read points [1]

<3>[ 527.742256] tegra-i2c tegra-i2c.3: I2c error status 0x00000008

<3>[ 527.742273] tegra-i2c tegra-i2c.3: no acknowledge from address 0x46

<3>[ 527.742289] tegra-i2c tegra-i2c.3: Packet status 0x00010009

I dont see this with it in place, but loops too much and still does not work on the occasion i get to login screen.

Everything else -

non working :) -- Get to that later

Eduardo, Team -- if you want the nvflash/system for this i can send it on, let me know, i dont want to post it publicly as its a mess right now ...

Rgds

Cass

I do suspect touchscreen issues could be related to udev ... Some entries are missing for it ... Regarding hw acceleration, id guess it would be priority #1 ... We need it to make Icecream flow ;)

All the other things, audio, touchscreen,camera, do not worry me ... We have source code for them. But HW acceleration is something we don-t have source for, so its important to know if it can be fixed ...

Attached (and splitted in 2 parts, due to forum attachment size restrictions), the latest patch to add nvidia tegra2 support to ICS... I have isolated all the Nvidia required libs (OpenGl, OpenMax, Shader compiler, surface allocator, firmware for the tegra video/audio accelerated decoders) and added them. Also updated the config. The product must be called tegra, not tegra2, otherwise the allocator is not recognized...

port_v2.part1.rar

Link to comment
Share on other sites

Second part of attachment

Ok, compiled with that lot in and it boots to the same state as before out the box ...

http://pastebin.com/99fXevU5 << without /system/lib/hw/hwcomposer.tegra.so removed .. nice and crashy at login screen

Meant to mention this yesterday, with your device profile there is a problem creating the recovery image, not that we need it but it would be nice to have that fixed, not figured out where its complaining about, not spent too much time looking to be honest, idea?

No private recovery resources for TARGET_DEVICE shuttle

Finding NOTICE files: out/target/product/shuttle/obj/NOTICE_FILES/hash-timestamp

make: *** No rule to make target `out/target/product/shuttle/obj/STATIC_LIBRARIES/librecovery_ui_shuttle_intermediates/librecovery_ui_shuttle.a', needed by `out/target/product/shuttle/obj/EXECUTABLES/recovery_intermediates/LINKED/recovery'. Stop.

make: *** Waiting for unfinished jobs....

Can get past by touching the files its complaining about back in... also in the device profile i had to touch

shuttle/bcmdhd.cal

and

shuttle/kernel

Im sure that is all ... :)

EDIT :- probably add the /system/etc/vold.fstab from vegacomb also... so sdcard mounts

Cheers

Cass

Edited by Cass67
Link to comment
Share on other sites

You guys want more help? I have 2 hands btw :)

Areo

Sure .. if you pulled the ics source and can compile it, jump right in !!

I could pm you the link to the stuff i built but it wouldn't help you with the stuff ed's providing, just means you'd be reliant on my updates ...

Let me know !

Cass

Link to comment
Share on other sites

Guest ejtagle

Cass67: Checking the log, seems something related to the screen is not being initialized ... Even if it is very complex to try to get something from it, i have done a quick analysis of it:

E/Netd ( 92): Unable to create netlink socket: Protocol not supported

E/Netd ( 92): Unable to open quota2 logging socket

\-[1]-> The kernel needs to support a network protocol we have not enabled yet...

E/CameraService( 98): Could not load camera HAL module

\-> Something to check related to our camera.shuttle.so

E/BatteryService( 142): usbOnlinePath not foundE/BatteryService( 142): batteryHealthPath not found \-> Battery status related...

E/SensorService( 142): couldn't load sensors module (No such file or directory)

\-> Accelerometer module is not being loaded... sensors.shuttle.so ,perhaps, it should be called sensors.tegra.so ?

F/BatteryStatsImpl( 142): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory) \-> this is related to [1]: seems that we are missing the xt_qtaguid and xt_quota2 netfilter compiled into our kernel -- I haven't checked this, but perhaps we will need to backport them from the tuna AOSP kernel...

W/InputManagerService( 142): Couldn't create dir.: /data/system/inputmethod

\-> either permissions missing, or /data folder not ptoperly mounted

E/OMXMaster( 98): OMX plugin failed w/ error 0x80001001 after registering 0 components

\-> Hummm.. something wrong with the display initialization ?

E/CommandListener( 92): Failed to open /proc/sys/net/ipv6/conf/wlan0/disable_ipv6: No such file or directoryE/WifiStateMachine( 142): Failed to disable IPv6: java.lang.IllegalStateException: Unable to communicate to native daemon for disabling ipv6 \-> kernel related ? -- Something related to ipv6 missing...

D/MountService( 142): got storage path: /mnt/sdcard description: Internal Storage primary: true removable: false emulated: true mtpReserve: 100 allowMassStorage: false maxFileSize: 0

D/MountService( 142): using emulated external storage \-> emulated sdcard ? -- sometinh is wrong with vold .. not properly mounting storage

I/ActivityManager( 142): Start proc com.android.launcher for activity com.android.launcher/com.android.launcher2.Launcher: pid=253 uid=10028 gids={}

I/SystemServer( 142): Enabled StrictMode for system server main thread.

W/NetworkManagementSocketTagger( 142): setKernelCountSet(10028, 1) failed with errno -2

I/ActivityThread( 253): Pub com.android.launcher2.settings: com.android.launcher2.LauncherProvider

D/dalvikvm( 207): GC_CONCURRENT freed 185K, 22% free 7134K/9095K, paused 4ms+2ms

D/AndroidRuntime( 207): Shutting down VM

W/dalvikvm( 207): threadid=1: thread exiting with uncaught exception (group=0x40a721f8)

I/ActivityThread( 241): Pub mms: com.android.providers.telephony.MmsProvider

E/ActivityThread( 222): Failed to find provider info for com.android.inputmethod.latin.dictionarypack

E/AndroidRuntime( 207): FATAL EXCEPTION: main

E/AndroidRuntime( 207): java.lang.RuntimeException: Unable to create service com.android.systemui.SystemUIService: java.lang.RuntimeException: Tablet device cannot show navigation bar and system bar

E/AndroidRuntime( 207): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2262)

.... \-> dalvikvm commited self suicide! -> this could be caused by the previous erros (netd not starting, missing kernel interfaces, improper mount points...) - The process died because the statusbar and navigationbar are not there. And i think they are not there because they failed to load due to missing kernel interfaces. I think that backporting the missing filters to our kernel should not be a problem ... or perhaps they are just not compiled in...

From this point onwards, cascaded errors due to required components not online...

And, a little bit below, hwcomposer is crashing... I think we will have to fix it, otherwise, hw acceleration will never work ...

Well, there are tons of things to do... getting configuration right is one of them... We have to clean those errors one by one ... I'll take a look on the hwcomposer issue.. I think it is the most important thing ...

Areo: We always welcome help with any tasks related to this... There are plenty of things to do!

I will try to take a look at hwcomposer issues, and then, backporting those netfilters android is requiring to work

Link to comment
Share on other sites

vold fixed, SD card mounts now..

Edit --

W/InputManagerService( 142): Couldn't create dir.: /data/system/inputmethod

Fixed, permissions on /data/system wrong, 775 seems fine.

E/CameraService( 98): Could not load camera HAL module

\-> Something to check related to our camera.shuttle.so

Fixed, should be camera.tegra.so and in /system/lib/hw was in /system/lib/

I/CameraService( 98): CameraService started (pid=98)

So that's 3 down.. many to go :)

Edited by Cass67
Link to comment
Share on other sites

Guest ejtagle

vold fixed, SD card mounts now..

Edit --

W/InputManagerService( 142): Couldn't create dir.: /data/system/inputmethod

Fixed, permissions on /data/system wrong, 775 seems fine.

E/CameraService( 98): Could not load camera HAL module

\-> Something to check related to our camera.shuttle.so

Fixed, should be camera.tegra.so and in /system/lib/hw was in /system/lib/

I/CameraService( 98): CameraService started (pid=98)

So that's 3 down.. many to go :)

Looking at the hwcomposer issue. We actually need it ;) -- Based on the reference implementation, this shouldn't be hard to fix (or at least, i hope so) ... Also looking at the kernel side issue ... Trying to decide if we should port to the 3.0 kernel, or backport the missing features from the 3.0 to the 2.6 kernel ;)

Link to comment
Share on other sites

Looking at the hwcomposer issue. We actually need it ;) -- Based on the reference implementation, this shouldn't be hard to fix (or at least, i hope so) ... Also looking at the kernel side issue ... Trying to decide if we should port to the 3.0 kernel, or backport the missing features from the 3.0 to the 2.6 kernel ;)

For me id normally always say go forward and not backwards .. but in this case id suspect a little back-porting will be easier than porting all your 2.6 work forward ... only you can tell that though ;)

Link to comment
Share on other sites

Guest ejtagle

For me id normally always say go forward and not backwards .. but in this case id suspect a little back-porting will be easier than porting all your 2.6 work forward ... only you can tell that though ;)

I have been looking at the panda-omap linux kernel, and seems there is some sort of tegra2 support (probably, the support that was merged into mainline). That kind of support is not enough for android, but, what i wil try is just to plug into that kernel the drivers we have. With a bit of luck, that will work. I am almost sure that , except audio, by doing this, most things will work. Audio will require a little bit of tweaking, but i hope it does not require too much ;)

Yes, i also think that we have to move forward. I don't see the updating of the linux kernel as an issue fot hw graphics acceleration, as we will be using the 2.6.36 video subsystem (it was not merged into mainline, so we need to use it. The linux kernel will expose the same interfaces as the 2.6.36 kernel in the video subsystem, so it should work ...

Link to comment
Share on other sites

Guest BillyBobJoe

I have been looking at the panda-omap linux kernel, and seems there is some sort of tegra2 support (probably, the support that was merged into mainline). That kind of support is not enough for android, but, what i wil try is just to plug into that kernel the drivers we have. With a bit of luck, that will work. I am almost sure that , except audio, by doing this, most things will work. Audio will require a little bit of tweaking, but i hope it does not require too much ;)

Yes, i also think that we have to move forward. I don't see the updating of the linux kernel as an issue fot hw graphics acceleration, as we will be using the 2.6.36 video subsystem (it was not merged into mainline, so we need to use it. The linux kernel will expose the same interfaces as the 2.6.36 kernel in the video subsystem, so it should work ...

Hi Guys,

Just been looking at the Nvidia GIT and found this lurking at the bottom. It look like someone there is trying their hand at making some changes.

Not sure if it will be of any use but it looks as if there is some work around video support in version 3.0.x.

http://nv-tegra.nvidia.com/gitweb/?p=user/amartin/linux-2.6.git;a=log;h=refs/heads/chromeos-3.0

Billy..

PS Great work there Cass and Eduardo. You two seem to be making some solid progress. If you need anything just ask.

Link to comment
Share on other sites

Guest ejtagle

Hi Guys,

Just been looking at the Nvidia GIT and found this lurking at the bottom. It look like someone there is trying their hand at making some changes.

Not sure if it will be of any use but it looks as if there is some work around video support in version 3.0.x.

http://nv-tegra.nvid...ds/chromeos-3.0

Billy..

PS Great work there Cass and Eduardo. You two seem to be making some solid progress. If you need anything just ask.

Unfortunately, i think this is for Tegra3... Seems Nvidia has completely lost interest on the Tegra2 platform :(

Link to comment
Share on other sites

Guest BillyBobJoe

Unfortunately, i think this is for Tegra3... Seems Nvidia has completely lost interest on the Tegra2 platform :(

seems old after google bought Motorola's mobile business the marker of the soon and not push for the tegra 2

maybe the google team will be the ones that are the first to pull together the necessary pressure to get things moving especially as we all think that the years 3 tabs won't be out until the summer.

Billy..

Link to comment
Share on other sites

>>I/Netd ( 92): Netd 1.0 starting

>>E/Netd ( 92): Unable to create netlink socket: Protocol not supported

>>E/Netd ( 92): Unable to open quota2 logging socket

Ok, think i resolved the netd socket issue by porting the quota2 netfilter from Tuna kernel

# adb logcat |grep Netd

I/Netd ( 91): Netd 1.0 starting

No errors here .anymore ...

F/BatteryStatsImpl( 142): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed: ENOENT (No such file or directory)

This one however is proving to be a bit harder, spent a couple of hours trying to backport this and failing ... too many changes to the code for it to be as easy as the quota2 one (for me) ;)

Suppose this wont make a diff if you do move forward to 3.x kernel...

Edit:-

http://pastebin.com/NMGv022H

Edited by Cass67
Link to comment
Share on other sites

Guest ejtagle

Ok, think i resolved the netd socket issue by porting the quota2 netfilter from Tuna kernel

# adb logcat |grep Netd

I/Netd ( 91): Netd 1.0 starting

No errors here .anymore ...

This one however is proving to be a bit harder, spent a couple of hours trying to backport this and failing ... too many changes to the code for it to be as easy as the quota2 one (for me) ;)

Suppose this wont make a diff if you do move forward to 3.x kernel...

Edit:-

http://pastebin.com/NMGv022H

By looking at the log, i'd say we are in pretty good shape! :) -- I am trying to port to the 3.0 kernel. Seems it will be harder than expected, as the changed the way interrupts are handled from 2.6.36 to 3.0. That change does not affect drivers, but does affect the tegra2 support. The support that was already in place is completely lacking, so, porting the 2.6.36 nvidia changes is a must. I am at it ... I think that if i get it right, it will be better than backporting 3.0 filters to 2.6.36 filters ... ;)

Still have to figure out the hwcomposer thing. I assume they changed some structs from HC to ICS. It should be possible to check the change history of the associated header to be sure ;)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.