Skip to main content

Can I use Linux IA32 as a target platform for phoneME project?

4 replies [Last post]
Anonymous

hi,

I read through the "getting start" document of phoneME project. But it seems
that I only can use Linux IA32 platform as host not target. And the only
supported Linux platform is for ARM, which also need the cross-toolchain
from MVista, which is not open. Is there any workaround to get phoneME
running on Linux IA32?

Thanks,
Neo
--
I would remember that if researchers were not ambitious
probably today we haven't the technology we are using!
[att1.html]

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 Neo,

to build phoneME Feature for Linux IA32 you need to build PCSL and CLDC VM for that platform first.
Here is a list of steps to build and run phoneME Feature Software (without any optional JSRs):

1.Checkout PCSL, CLDC and MIDP sources:

# svn checkout https://phoneme.dev.java.net/svn/phoneme/components/pcsl/trunk ~/phoneme/pcsl
# svn checkout https://phoneme.dev.java.net/svn/phoneme/components/cldc/trunk ~/phoneme/cldc
# svn checkout https://phoneme.dev.java.net/svn/phoneme/components/midp/trunk ~/phoneme/midp

2.Build PCSL

# cd ~/phoneme/pcsl
# export PCSL_OUTPUT_DIR=~/phoneme/build/pcsl
# gmake PCSL_PLATFORM=linux_i386_gcc NETWORK_MODULE=bsd/generic all

3.Build CLDC VM

# cd ~/phoneme/cldc/build/linux_i386
# export JVMWorkSpace=~/phoneme/cldc
# export JVMBuildSpace=~/phoneme/build/cldc
# gmake ENABLE_PCSL=true all

4.Build phoneME Feature Software

# cd ~/phoneme/midp/build/linux_fb_gcc
# export MIDP_OUTPUT_DIR=~/phoneme/build/midp
# gmake CLDC_DIST_DIR=~/phoneme/build/cldc/linux_i386/dist all

5.Run phoneME Feature Software
You need to have Qt Virtual Framebuffer running with depth 16. See http://doc.trolltech.com/qtopia2.2/html/qvfb-qtopia.html

# qvfb -depth 16 &
# ~/phoneme/build/midp/bin/i386/autotest

Please let me know if it works for you.

Thanks,
Danila

selenau
Offline
Joined: 2006-10-11
Points: 0

On my system

gcc (GCC) 4.1.1 20061011 (Red Hat 4.1.1-30)

I had errors below, which I have to remove "JVMFPUControl::" from both.

/home/selenau/j2me/phoneME_feature/cldc/src/vm/cpu/i386/FloatSupport_i386.cpp:90: error: extra qualification 'JVMFPUControl::' on member 'restore'
/home/selenau/j2me/phoneME_feature/cldc/src/vm/cpu/i386/FloatSupport_i386.cpp:95: error: extra qualification 'JVMFPUControl::' on member 'set_fpu_control_word'

Also,

/home/selenau/j2me/phoneME_feature/cldc/src/vm/cpu/i386/SourceMacros_i386.cpp:700: warning: 'inst$__pfn' may be used uninitialized in this function
/home/selenau/j2me/phoneME_feature/cldc/src/vm/cpu/i386/SourceMacros_i386.cpp:700: warning: 'inst$__delta' may be used uninitialized in this function

but no cure yet.

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

The "extra qualification" error is a new feature of GCC 4.1.
This code compiles clean with GCC 4.0 and before.

It is ok to fix it by removing the class qualifier:

+++ FloatSupport_i386.cpp (working copy)
@@ -87,12 +87,12 @@
set_fpu_control_word(0x027F);
}

- void FPUControl::restore() {
+ void restore() {
fldcw(Address(Constant("local_saved_cw"))); // Restore rounding mode
}

private:
- void FPUControl::set_fpu_control_word(int mode) {
+ void set_fpu_control_word(int mode) {
fstcw(Address(Constant("local_saved_cw")));
fstcw(Address(Constant("local_masked_cw")));
// we'd better use explicit setting

The uninitialized usage warning is valid and should be fixed by like this:

+++ SourceMacros_i386.cpp (working copy)
@@ -697,7 +697,7 @@
// Pops off one item from the FPU stack, using space that's currently
// unused above the top of stack.
void SourceMacros::clear_one_from_fpu_stack(Tag tag, int offset) {
- void (SourceAssembler::*inst)(const Address& );
+ void (SourceAssembler::*inst)(const Address& ) = NULL;
switch(tag) {
case float_tag: case int_tag:
inst = (tag == int_tag) ? &SourceAssembler::fistp_f

Both errors have already been fixed in phoneME Feature MR2.

pavelp
Offline
Joined: 2006-09-29
Points: 0

Hi Neo,

Thank you for your question. Linux/x86 is not supported in the current release. phoneME Feature MR2 will officially support Linux/x86 configuration (https://phoneme.dev.java.net/content/phoneme_feature_r2.html).

However you can build and run phoneME Feature MR1 on Linux/i386. You can use GNU Cross Compiler 3.4. To build CLDC for linux/i386 please change to $JVMWorkSpace/build/linux_i386 and run the make command.

Output will be generated under $JVMBuildSpace/build/linux_i386/target/bin

Regards,
Pavel