Bug 255662 - java/openjdk11: Add armv6 / armv7 support
Summary: java/openjdk11: Add armv6 / armv7 support
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: Mikael Urankar
URL:
Keywords: feature, needs-qa
Depends on:
Blocks:
 
Reported: 2021-05-06 16:08 UTC by Mikael Urankar
Modified: 2021-09-18 14:44 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (java)
koobs: maintainer-feedback? (glewis)


Attachments
v0 (3.35 KB, patch)
2021-05-06 16:08 UTC, Mikael Urankar
no flags Details | Diff
log file when running portmaster java/openjdk11 with qemu-arm-static (6.49 KB, text/plain)
2021-09-18 09:59 UTC, Martin Birgmeier
no flags Details
RPI-B panic message when trying to install openjdk11 (451.50 KB, image/jpeg)
2021-09-18 13:35 UTC, Martin Birgmeier
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2021-05-06 16:08:06 UTC
Created attachment 224730 [details]
v0

The bootstrap is on freefall: /home/mikael/bootstrap-openjdk11-arm-12-11.0.5.10.1.tar.xz
Comment 1 Greg Lewis freebsd_committer freebsd_triage 2021-05-13 03:47:58 UTC
Thanks Mikael.  I've copied your bootstrap over into the same distribution directory where I've got the others.  In a few hours you should be able to test the bootstrap change to make sure it works.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-05-18 16:00:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=362eb92da22191ba1aa95524f86a62afc9d92496

commit 362eb92da22191ba1aa95524f86a62afc9d92496
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2021-05-18 15:57:36 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-05-18 15:57:36 +0000

    java/openjdk11: Add armv6 / armv7 support

    PR:             255662
    Approved by:    portmgr (tier 2 blanket)

 java/bootstrap-openjdk11/Makefile |  8 ++++----
 java/bootstrap-openjdk11/distinfo |  2 ++
 java/openjdk11/Makefile           | 10 +++++-----
 3 files changed, 11 insertions(+), 9 deletions(-)
Comment 3 Martin Birgmeier 2021-09-17 16:18:41 UTC
I am trying this on armv6, and the bootstrap vm says that it is for armv7 only.

Therefore, the build of openjdk11 on armv6 fails.

-- Martin
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2021-09-17 18:15:32 UTC
I don't have access to an armv6 board right now, do you have a build log?

The bootstrap seems correct:

readelf -A bootstrap-openjdk11/bin/java | grep CPU_arch
  Tag_CPU_arch: ARM v6

file bootstrap-openjdk11/bin/java: ELF 32-bit LSB executable, ARM, EABI5 version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.2

Thanks.
Comment 5 Martin Birgmeier 2021-09-18 09:36:59 UTC
This first log is from an emulation using qemu-user-static. The failure at the "cd" command at the end is strange - that directory is perfectly reachable and writable.

This is interesting (all with qemu-user-static):

[0]# /usr/local/bootstrap-openjdk11/bin/javac -version
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
[1]# 

I'll try with a real Raspberry-Pi B+ a little later.

-- Martin
Comment 6 Martin Birgmeier 2021-09-18 09:59:26 UTC
Created attachment 227974 [details]
log file when running portmaster java/openjdk11 with qemu-arm-static
Comment 7 Martin Birgmeier 2021-09-18 13:35:07 UTC
Created attachment 227980 [details]
RPI-B panic message when trying to install openjdk11

So the rpi-b simply panicked...
Comment 8 Martin Birgmeier 2021-09-18 14:01:01 UTC
And furthermore on the RPI-B:

[0]# /usr/local/bootstrap-openjdk11/bin/javac -version
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP
[1]# 

-- Martin
Comment 9 Mikael Urankar freebsd_committer freebsd_triage 2021-09-18 14:44:41 UTC
I'm afraid that armv6 is not supported in server mode:
https://github.com/battleblow/openjdk-jdk11u/blob/bsd-port/src/hotspot/cpu/arm/vm_version_arm_32.cpp#L238

I've built this bootstrap on an armv7 board inside an armv6 chroot and never triggered this issue....

It's possible to use the zero mode but it'll require a new bootstrap.