Compilation on MIPS

Jonathan Springer springer at reservoir.com
Thu Mar 5 07:17:43 PST 2009


Hi Maram,

Maram, Pradeepreddy (NSN - IN/Bangalore) wrote:
> Hello All,
> 
> I have compiled the  Ultraviolet port of OpenJDK for windriver Linux on  
> Octeon (MIPS).

Sounds terrific!

> Execution of any command fails as below,
> 
> # ./java -version
> Error occurred during initialization of VM
> java/lang/ClassFormatError: Incompatible magic value 3199925962 in class 
> file java/lang/Object
> 
> My further investigations showed that the above magic number hexadecimal 
> equal is "BEBAFECA", which is in reverse order of "CAFEBABE" (used by 
> the class loader to see if a class file is really a class definition 
> file or not).
> 
> The system where I am running this binary supports "BIG ENDIAN" and I 
> have see a comment in file jniTypes_mips.hpp as below,
> 
> #ifndef VM_LITTLE_ENDIAN
> #error Unimplemented
> #endif
> (no support for BIG ENDIAN)
> 
> Does it mean that, current MIPS port supports only "LITTLE ENDIAN" systems?

That's correct.  The Ultraviolet port was done for a little-endian 
implementation of MIPS.  The places where this matters have been 
ifdef-ed in the code as above, so it should be a simple matter to add 
the right code to make it work in big-endian mode.

-Jonathan

-- 
Jonathan Springer     |
Reservoir Labs, Inc.  |  http://www.reservoir.com/



More information about the mips-port mailing list