BUG Community

Welcome! Log In

Forums Applications JNI

Subscribe to JNI  4 posts, 2 voices

Log in to reply to this topic
 
Mar 12, 2008 9:48pm
Medium Bug Labs team finsprings 268 posts

I’m not sure which section this belongs in, but are there any recommendations on the use of JNI on the Bug?

For example:
Since JNI is generally non-portable, what should I use as my starting point?
Any JNI-related limitations of PhoneME of note?
What C library did you choose for the bug?
Any compiler or linker flags of note?

I have a recent iMX27 LTIB build on my Fedora Core 8 VM for other reasons. I imagine it’s pretty close to what the bug has with its iMX31, but I guess it depends what C library you guys are using and whether you used LTIB or went some other way to get Linux up and running on it. I was hoping that I could build a JNI lib on that but I can’t think of a way to test it until my real bug shows up. Is there any point in doing JNI stuff in the VirtualBug in the meantime?

Mar 22, 2008 1:44am
Medium Bug Labs team kgilmer 215 posts

Hi finsprings,

Since JNI is generally non-portable, what should I use as my starting point?


There are bundles in our cvs tree (which are out of date, I'll work on pushing a snapshot to our external CVS server next week) that begin with com.buglabs.bug.jni. These bundles contain all the JNI code (C and Java) to access BUG base and module functionality.

Any JNI-related limitations of PhoneME of note?


Not that I'm aware of :)

What C library did you choose for the bug?


The BUG rootfs is glibc-4.1.1 based. We also use LTIB to build our rootfs. We simply use the default target configuration for the iMX31 with some additional patches to the kernel. All of this will be available on the public CVS server shortly.

Any compiler or linker flags of note?


Not really. Our JNI projects include makefiles to build the jni target libraries. You can call them from LTIB to generate the BUG (target) files. If you are familiar with how LTIB works you have a head start.

Is there any point in doing JNI stuff in the VirtualBug in the meantime?


Well, you could validate that you can build the JNI libraries on your FC VM. Once I publish the projects check them out and try