[android-porting] Re: Dalvik on glibc

2009-03-16 Thread fadden
On Mar 14, 10:58 pm, Avtar Singh wrote: > On Sat, Mar 14, 2009 at 11:11 PM, vkat wrote: > > Finally, I got it running. Was able to run Hello World and some sample > > socket programs (server and client). > > How did you compile Dalvik's libdalvikvm module to run with glibc? Will not > there be a

[android-porting] Re: Dalvik on glibc

2009-03-16 Thread vkat
I am using only dalvik (not Android OS). I did not use most of bionic source or header files. There were a very few header/sources in bionic that was not in glibc, had to bring them over. Obviously I did not use the Android.mk or its build environment. I had to create my own Makefiles and simulate

[android-porting] Re: Dalvik on glibc

2009-03-14 Thread Avtar Singh
On Sat, Mar 14, 2009 at 11:11 PM, vkat wrote: > Finally, I got it running. Was able to run Hello World and some sample > socket programs (server and client). How did you compile Dalvik's libdalvikvm module to run with glibc? Will not there be a clash of bionic/glibc headers and system calls? --

[android-porting] Re: Dalvik on glibc

2009-03-14 Thread vkat
Finally, I got it running. Was able to run Hello World and some sample socket programs (server and client). On Mar 13, 8:56 pm, Venkatesh Ramamurthy wrote: > For the padding problem, I haven't figured but made a workaround. Very > strange behavior is that even #pragma pack(1) was not packing the

[android-porting] Re: Dalvik on glibc

2009-03-13 Thread Venkatesh Ramamurthy
For the padding problem, I haven't figured but made a workaround. Very strange behavior is that even #pragma pack(1) was not packing the structure, I had to put in an explicit __attribute__((packed)) around a few structures. After padding a few other structures, I gotten around the second problem

[android-porting] Re: Dalvik on glibc

2009-03-13 Thread fadden
On Mar 12, 7:42 pm, vkat wrote: > I figured the problem, the typedef DexTypeItem was getting padded to 4 > bytes even though it has only one u2 property. This was causing the > structure array to be misaligned. The strange thing is when I compiled > libdex, I passed the same gcc options as that o

[android-porting] Re: Dalvik on glibc

2009-03-12 Thread vkat
I figured the problem, the typedef DexTypeItem was getting padded to 4 bytes even though it has only one u2 property. This was causing the structure array to be misaligned. The strange thing is when I compiled libdex, I passed the same gcc options as that of in the Android environment. Now I am d

[android-porting] Re: Dalvik on glibc

2009-03-12 Thread fadden
On Mar 12, 10:02 am, Sean McNeil wrote: > I'm not sure, but could this also be related to short enums? I seem to > remember seeing something like this when I had a mixture of old code > compiled with and new code compiled without short enums. Everything related to DEX file access should be using

[android-porting] Re: Dalvik on glibc

2009-03-12 Thread Dan Bornstein
On Thu, Mar 12, 2009 at 10:13 AM, vkat wrote: > Also I ran dexdump and it does not show any errors. Seeing the code > for dexdump, it dumps only the class details (optionally the > classdefs). As far as I understood the code, it was not parsing the > type list. That's why I said "dexdump won't p

[android-porting] Re: Dalvik on glibc

2009-03-12 Thread vkat
Dan, Thanks for the pointers. I will try the dex-debug option. Just to clarify, I generally do not suspect the classes.dex (from core.jar) to be corrupt, because I copied this file in verbatim from the Android build environment. I did not rebuild this. I am able to run emulator version using the s

[android-porting] Re: Dalvik on glibc

2009-03-12 Thread Sean McNeil
I'm not sure, but could this also be related to short enums? I seem to remember seeing something like this when I had a mixture of old code compiled with and new code compiled without short enums. On Thu, Mar 12, 2009 at 11:53 PM, Dan Bornstein wrote: > > On Thu, Mar 12, 2009 at 8:10 AM, vkat w

[android-porting] Re: Dalvik on glibc

2009-03-12 Thread Dan Bornstein
On Thu, Mar 12, 2009 at 8:10 AM, vkat wrote: > I am in the process of porting the dalvik VM to a glibc based ARM SoC. > I have done (hopefully) most of the the porting. Now when I start > dalvikvm I am getting an error when dexopt is trying to optimize the > core.jar file. > [...] > W( 5289) Bad