Skip to main content

PhoneME Installer - How does it work?

3 replies [Last post]
omone
Offline
Joined: 2007-07-25
Points: 0

Hi all,
I was wondering where could I find some documentation about how the process of install effectively works for the PhoneME feature MR2.
I've read, in another post, that the steps are:

---------------------------------------------------------------------------------------------------------
Basically, the VM build has the following major phases:
1.Build the interpreter loop generator (aka loopgen)
2.Build the ROM image generator (aka romizer, romgen)
3.Execute loopgen to generate interpreter loop
4.Execute romgen to generate ROM image
5.Build the target VM linking it with interpreter loop and ROM image.

loopgen and romgen are special flavors of the VM itself and they are build for the host platform. Thus, they should be built with host native toolchain. Target VM binary should be built with the target-specific toolchain.
-----------------------------------------------------------------------------------------------------------------------

Where can I find details about loopgen, romizer/romgen? Do they come from other open source projects?

In particular I'm getting stuck with romgen app, and how to let it find a custom library to link.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
danila
Offline
Joined: 2006-09-25
Points: 0

Hi omone,

loopgen and romgen are built from the same source base as the target CLDC VM build
(cldc component).
What kind of custom library do you mean?
Is it native or java library?

omone
Offline
Joined: 2007-07-25
Points: 0

Thanks danila,

>What kind of custom library do you mean?
>Is it native or java library?

It's a native one, and it's written in C. During the initialization of JVM (JVM.cpp), our library is invoked and starts a POSIX thread.
Hence we should find a way to invoke the functions of our library from the CLDC and MIDP source code.

Essentially, It's the same problem than paolo one's
http://forums.java.net/jive/thread.jspa?threadID=34917&tstart=0

danila
Offline
Joined: 2006-09-25
Points: 0

omone,

> In particular I'm getting stuck with romgen app, and how to let it find a custom library to link.

romgen doesn't work with native libraries.
They are linked on step 5 of the above VM build steps.
I think you will have to modify makefiles.

For standalone CLDC VM build, see cldc/build/share/jvm.make:
$(JVM_EXE): $(BIN_DIR) $(BUILD_PCH) $(JVMX_LIB) $(JVM_LIB) $(JVMTEST_LIB) \
$(EXE_OBJS)
$(A)$(LINK) $(LINK_FLAGS) /out:$@ $(EXE_OBJS) $(JVMX_LIB) $(JVM_LIB) \
$(JVMTEST_LIB) $(PCSL_LIBS)

For full-stack phoneME Feature build, see midp/src/ams/example/jams/runMidlet.gmk:

$(BINDIR)/runMidlet$(g)$(p)$(EXE): \
$(MIDP_DEPS) $(OBJLIB) $(AMS_RUNMIDLET_OBJ_FILES)
@echo " ... linking $@ " $(LOG)
$(A)$(LD) $(LD_FLAGS) $(LINKER_OUTPUT)`$(call fixcygpath,$@ \
$(LD_START_GROUP) $(AMS_RUNMIDLET_OBJ_FILES) $(OBJLIB) $(LIBS))` $(LD_END_GROUP) $(LOG)