JDK GNU/Linux SPARC and MIPS

Jonathan Springer springer at reservoir.com
Tue Sep 4 10:01:41 PDT 2007


Sunil Amitkumar Janki wrote:

> Christian Thalinger wrote:
> 
>> On Wed, 2007-08-22 at 14:56 +0200, Sunil Amitkumar Janki wrote:
>>
>>> I have GNU/Linux running on x86, MIPS and SPARC but only
>>> x86 has an up to date JDK. For MIPS I have JDK 1.5.0 and
>>> for SPARC Blackdown's JDK 1.4.1.
>>>
>>> I would like to see support for both architectures integrated
>>> into the JDK sources alongside x86, x86_64 and Solaris SPARC
>>> so all systems can benefit from up to date Java installations.
>>>
>>> Could someone point out to me what I'd have to do to get
>>> the latest JDK up and running and support for it integrated
>>> into mainline sources?
>>
>> Well, you could port HotSpot or join us, in whatever way, in the IcedTea
>> project where we try to get OpenJDK running on non-HotSpot platforms.
>>
>> - twisti
> 
> I think it's a better use of my time to get OpenJDK running on
> MIPS and SPARC than porting an older HotSpot JVM. I hope
> there are provisions for other architectures in the build system
> or at least that it's flexible enough to accommodate for those.
> 
> What parts of IcedTea would have to be ported or rewritten in
> order to support MIPS and SPARC? I will checkout from the
> repository and see what the IcedTea source code looks like later
> today.

The biggest part of porting is the core Hotspot virtual machine itself.  The amount of 
code that needs to be rewritten to port that to a new platform depends on whether either 
or both of OS or hardware are new.  OpenJDK is well-organized in that it separates out the 
platform-dependent code into separate directories.  There are three categories of 
platform-dependent directory: os, cpu, and os_cpu.

The easiest of your ports would be Linux-SPARC, since there are already directories 
os=linux and cpu=sparc, so you would just have to write the code in os_cpu=linux_sparc. 
This is probably about 2500 LOC.  Ports to a new os are harder, requiring about 10k LOC 
(could be more if the OS is especially primitive).  Ports to a new cpu are the hardest, 
requiring from maybe 25k to 45k LOC, depending on the route you choose and whether you do 
all the parts.

(Redirected from distro-pkg-dev since this isn't really a distro discussion.)

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



More information about the hotspot-dev mailing list