Building for mips
David Holmes
david.holmes at oracle.com
Mon Mar 25 11:48:46 UTC 2019
Hi Daniel,
The Portola project started from JDK 10 so you won't find any musl
patches for JDK 8.
There is no current working MIPS port for OpenJDK - yes there was back
in JDK 7. There was talk of it reviving for 8 but that hasn't happened
as yet:
https://mail.openjdk.java.net/pipermail/mips-port/2018-August/000087.html
So you would be trying to either bring an old MIPS port into the Portola
repo (massive task, not recommended). Or else you need to start with the
OpenJDK 7 MIPS port and then try to apply the musl changes to that by
looking at the changesets that have been applied to the portola repo.
That's also not a small job and the differences between JDK 7 and JDK
10+ code are huge.
Mikael Vidstedt did the musl work in portola so he may be able to give
you some specific pointers when he's available.
You may be able to build a Zero interpreter version of Portola for MIPS
- you'd need to ask the Zero folk about that.
With regards to general repo structure ... there are lots of OpenJDK
repos. jdk/jdk is the mainline repo currently targeting JDK 13.
http://hg.openjdk.java.net/jdk/jdk/
You'll find tags in there for earlier versions but no branches as we
don't use those in the mainline repo. There are independent repos for
the various OpenJDK update versions: 8u, 11u, 12u.
http://hg.openjdk.java.net/jdk-updates
Then there are various project specific repos, like portola (e.g.
valhalla, panama) that have their own particulars that you'd need to
check with the individual projects.
HTH
David
On 25/03/2019 6:46 pm, Daniel Santos wrote:
> Thank you so much for your response! :)
>
> On 3/25/19 3:08 AM, A. Wilcox wrote:
>> [I am unable to send to the list for some reason; if you want to reply,
>> you may reply to the list.]
>>
>>
>> On 03/25/19 00:31, Daniel Santos wrote:
>>> Hello,
>>>
>>> I'm new to the openjdk project, but I would like to build openjdk with
>>> musl on mips (for a 24KEc which is a 32-bit little endian cpu). Debian
>>> has paved a bit of the way here, so I was hoping to pull in their
>>> patches, but it seems there are a lot of differences between the portola
>>> project and the main line.
>>
>> You should be able to start with "vanilla" OpenJDK + the patches from
>> Alpine / Adélie. This way you can build up from GCJ (GCC 6 Java),
>> instead of having to do a cross build (which is a bit tricky, especially
>> for newcomers).
>
> Interesting. I don't currently have a cross toolchain for gcc 6 with
> gcj support, but that's on my list (to explore natively compiling some
> java instead of running it via zero). Can you tell me where I can find
> the OpenJDK patches from Alpine?
>
> I seem to have gotten through all of the configure issues with doing a
> cross compile, it was quite unnecessarily difficult. It kept telling me
> it was checking for my compiler, printing the exact full path of it, and
> then saying it wasn't there. It turned out that passing CC and CXX with
> the full path to the compiler instead of just the executable name and a
> TOOLS_DIR set was the problem, but the configure test is just terribly
> written. I've got a todo for going back and seeing if I can clean that
> up, but I'm not an m4 expert.
>
> So exactly which repository is the "vanilla" OpenJDK? Would that be
> jdk/jdk? I'm used to a repository having tags and branches for various
> major and minor versions and revisions. I find myself a bit bewildered
> by the repo structure. :)
>
> I'm currently using GCC 7.3 from OpenWRT's build system (buildroot) and
> fixing a few issues with that (new warnings and such).
>
>>> My first question is to better understand how the OpenJDK repositories
>>> work -- this is my first experience with mercurial and I'm used to git.
>>> Is Portola a set of patches that are rebased on to the main line
>>> openjdk, or are patches from the main line imported into Portola upon
>>> each release?
>>
>> The patches are merged in to the Portola repositories regularly from
>> mainline JDK. An example merge commit:
>>
>> https://hg.openjdk.java.net/portola/jdk12/rev/d050b70ca89f
>
> Ok, that's helpful to know. I should have mentioned that I'm working
> with jdk8 using the portola/portola project starting from the jdk8-b120
> tag. I've got about 40 patches on top of that, mostly from Debian since
> they have openjdk for mipsel (but with glibc) working.
>
> Oh crack! So I started from the jdk8-b120 tag in one worktree and from
> jdk13+11 in another -- so I'm just working from the vanilla tags w/o
> Portola patches huh? It would explain why there appears to have been so
> little work done for musl, lol!
>
>
>>> I didn't see a -musl handler in common/autoconf/build-aux/config.sub.
>>> What machine description do you guys use when building Portola on a
>>> *-linux-musl machine, *-linux-gnu?
>>
>> https://hg.openjdk.java.net/portola/jdk12/file/d050b70ca89f/make/autoconf/build-aux/config.sub#l32
>>
>> Only x86_64-unknown-linux-musl is considered, as the official Portola
>> builds are x86_64 only. They work on at least PowerPC and ARM as well,
>> in our testing.
>>
>>
>> Best to you and yours,
>> --arw
>
> I'm using mipsel-openwrt-linux-musl, but the config.sub on jdk8 is quite
> different. How can I get to the jdk8 Portola tags and/or branches?
>
> Thanks!
> Daniel
>
More information about the portola-dev
mailing list