Hi All, I'm trying to port dalvik VM onto PPC. I could able to build 'dalvikvm' binary and the respective 'jar' files that are needed for the execution of 'dalvikvm'('core.jar' , 'ext.jar','framework.jar',android.policy.jar' and 'services.jar')
To test dalvikvm i followed the following steps:- 1: export LD_LIBRARY_PATH=/home/cupcake/out/debug/target/product/eee_701/ system/lib 2: export ANDROID_ROOT=/home/cupcake/out/debug/target/product/eee_701/ system 3: export BOOTCLASSPATH=/home/cupcake/out/debug/target/product/eee_701/ systemframework/core.jar:/home/cupcake/out/debug/target/product/ eee_701/system/framework/ext.jar:/home/cupcake/out/debug/target/ product/eee_701/system/framework/framework.jar 4: export ANDROID_DATA=/tmp/dalvik_$USER mkdir -p $ANDROID_DATA/dalvik-cache 5: $cat Foo.java public class Foo { public static void main(String[] args) { System.out.println("Hello, world"); } } $javac Foo.java $dx --dex --output=foo.jar Foo.class 6: $./dalvikvm -cp foo.jar Foo For the first execution of 'dalvikvm' I got segmentation fault. On debugging in gdb I found where it was crashing. To fix it I made modification in the following file 'dalvik/vm/mterp/common/asm-constants.h' Line No :186 ORIGINAL-> MTERP_OFFSET(offArrayObject_contents, ArrayObject, contents, 12) MODIFIED-> MTERP_OFFSET(offArrayObject_contents, ArrayObject, contents, 16) Reason:- 'contents' member in ArrayObject structure is a 64-bit entity and there are three 32-bit entities above it. For satisfying 64-bit alignment 'contents' member should start at 16 byte offset rather than 12 byte. After making the above change, I followed the same steps to execute dalvikvm, but this time i didnt get the seg fault but one message came up saying "Dalvik VM init failed (check log file)". On debugging in gdb I found the error line to be at system/core/libcutils/ashmem-dev.c:60 ret = ioctl(fd, ASHMEM_SET_SIZE, size) ; -- with errno set to -ENOTTY. I really need help on this to go ahead Thanks in advance Anand --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting -~----------~----~----~----~------~----~------~--~---