diff --git a/packaging/Dockerfile b/packaging/Dockerfile index bbccd79..445db40 100644 --- a/packaging/Dockerfile +++ b/packaging/Dockerfile @@ -1,4 +1,4 @@ -ARG DEBIAN_RELEASE=stretch +ARG DEBIAN_RELEASE=buster FROM ev3dev/ev3dev-$DEBIAN_RELEASE-ev3-base ARG DEBIAN_RELEASE diff --git a/scripts/Dockerfile b/scripts/Dockerfile index c6b6ce5..0e791e8 100644 --- a/scripts/Dockerfile +++ b/scripts/Dockerfile @@ -1,4 +1,4 @@ -ARG DEBIAN_RELEASE=stretch +ARG DEBIAN_RELEASE=buster ARG BUILD_TYPE=cross FROM ev3dev-lang-java:jdk-$BUILD_TYPE-$DEBIAN_RELEASE diff --git a/scripts/config.sh b/scripts/config.sh index bc094a9..b64e2db 100644 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -316,6 +316,33 @@ elif [ "$JDKVER" == "15" ]; then HOTSPOT_ABI=arm-sflt JNI_PATH_FLAGS="--with-jni-libpath=/usr/lib/$DEB_HOST_MULTIARCH/jni:/lib/$DEB_HOST_MULTIARCH:/usr/lib/$DEB_HOST_MULTIARCH:/usr/lib/jni:/lib:/usr/lib" +# OpenJDK 17 +elif [ "$JDKVER" == "17" ]; then + VERSION_POLICY="latest_general_availability" + JAVA_REPO="https://github.com/adoptium/jdk17u.git" + JAVA_SCM="git" + PATCHVER="jdk17" + AUTOGEN_STYLE="v2" + if [ "$BUILDER_TYPE" = "native" ]; then + HOSTJDK="$BUILDDIR/jdk-ev3" + HOSTJDK_RENAME_FROM="$BUILDDIR/jdk" + HOSTJDK_FILE="$BUILDDIR/jdk-ev3.tar.gz" + # stretch and buster have different versions + if [ "$BUILDER_DISTRO" = "stretch" ]; then + HOSTJDK_URL="https://ci.adoptium.net/job/eljbuild/job/stretch-bleeding/85/artifact/build/jdk-ev3.tar.gz" + else + HOSTJDK_URL="https://ci.adoptium.net/job/eljbuild/job/buster-bleeding/84/artifact/build/jdk-ev3.tar.gz" + fi + else + # same for both stretch & buster + HOSTJDK="$BUILDDIR/jdk-17.0.10+7" + HOSTJDK_FILE="$BUILDDIR/OpenJDK17U-jdk_x64_linux_hotspot_17.0.10_7.tar.gz" + HOSTJDK_URL="https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.10%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.10_7.tar.gz" + fi + IMAGEDIR="$JDKDIR/build/linux-arm-${JDKVM}-${HOTSPOT_DEBUG}/images" + HOTSPOT_ABI=arm-sflt + JNI_PATH_FLAGS="--with-jni-libpath=/usr/lib/$DEB_HOST_MULTIARCH/jni:/lib/$DEB_HOST_MULTIARCH:/usr/lib/$DEB_HOST_MULTIARCH:/usr/lib/jni:/lib:/usr/lib" + # OpenJDK Loom & Master+dev elif [ "$JDKVER" == "loom" ] || [ "$JDKVER" == "tip" ]; then if [ "$JDKVER" == "loom" ]; then @@ -327,7 +354,7 @@ elif [ "$JDKVER" == "loom" ] || [ "$JDKVER" == "tip" ]; then else VERSION_POLICY="latest_tag" JAVA_REPO="https://github.com/openjdk/jdk.git" - PATCHVER="jdk16" + PATCHVER="jdk17" fi JAVA_SCM="git" AUTOGEN_STYLE="v2" diff --git a/scripts/jdk17_new.patch b/scripts/jdk17_new.patch new file mode 100644 index 0000000..2ae0adc --- /dev/null +++ b/scripts/jdk17_new.patch @@ -0,0 +1,46 @@ +diff --git a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4 +index 43653c115..4c5f960a8 100644 +--- a/make/autoconf/hotspot.m4 ++++ b/make/autoconf/hotspot.m4 +@@ -138,6 +138,11 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC], + HOTSPOT_TARGET_CPU_DEFINE="ARM32" + fi + ++ if test "x$OPENJDK_BUILD_CPU" = xarm; then ++ HOTSPOT_BUILD_CPU=arm_32 ++ HOTSPOT_BUILD_CPU_DEFINE="ARM32" ++ fi ++ + # --with-cpu-port is no longer supported + UTIL_DEPRECATED_ARG_WITH(with-cpu-port) + +diff --git a/src/hotspot/share/memory/metaspaceShared.cpp b/src/hotspot/share/memory/metaspaceShared.cpp +index 7adecd141..e895e21d1 100644 +--- a/src/hotspot/share/memory/metaspaceShared.cpp ++++ b/src/hotspot/share/memory/metaspaceShared.cpp +@@ -71,6 +71,7 @@ + #include "utilities/ostream.hpp" + #include "utilities/defaultStream.hpp" + #include "utilities/hashtable.inline.hpp" ++#include "gc/shared/softRefPolicy.hpp" + #if INCLUDE_G1GC + #include "gc/g1/g1CollectedHeap.inline.hpp" + #endif +diff --git a/src/hotspot/share/oops/constantPool.cpp b/src/hotspot/share/oops/constantPool.cpp +index 1761efa7a..cd0602cd0 100644 +--- a/src/hotspot/share/oops/constantPool.cpp ++++ b/src/hotspot/share/oops/constantPool.cpp +@@ -443,8 +443,12 @@ void ConstantPool::remove_unshareable_info() { + } + + int ConstantPool::cp_to_object_index(int cp_index) { ++ Array *map = reference_map(); ++ if (map == 0) ++ return _no_index_sentinel; ++ + // this is harder don't do this so much. +- int i = reference_map()->find(cp_index); ++ int i = map->find(cp_index); + // We might not find the index for jsr292 call. + return (i < 0) ? _no_index_sentinel : i; + } diff --git a/scripts/jdk17_nosflt.patch b/scripts/jdk17_nosflt.patch new file mode 100644 index 0000000..9c8404b --- /dev/null +++ b/scripts/jdk17_nosflt.patch @@ -0,0 +1,20 @@ +diff --git a/src/hotspot/cpu/arm/assembler_arm_32.hpp b/src/hotspot/cpu/arm/assembler_arm_32.hpp +index dd04ad1ab..d43e29e5a 100644 +--- a/src/hotspot/cpu/arm/assembler_arm_32.hpp ++++ b/src/hotspot/cpu/arm/assembler_arm_32.hpp +@@ -1248,10 +1248,11 @@ extern int __aeabi_dcmpgt(double, double); + + // Imported code from glibc soft-fp bundle for + // calculation accuracy improvement. See CR 6757269. +-extern double __aeabi_fadd_glibc(float, float); +-extern double __aeabi_fsub_glibc(float, float); +-extern double __aeabi_dadd_glibc(double, double); +-extern double __aeabi_dsub_glibc(double, double); ++#define __aeabi_fadd_glibc __aeabi_fadd ++#define __aeabi_fsub_glibc __aeabi_fsub ++#define __aeabi_dadd_glibc __aeabi_dadd ++#define __aeabi_dsub_glibc __aeabi_dsub ++ + }; + #endif // __SOFTFP__ + diff --git a/system/Dockerfile.cross b/system/Dockerfile.cross index 1f0bcd7..e0dcd27 100644 --- a/system/Dockerfile.cross +++ b/system/Dockerfile.cross @@ -1,4 +1,4 @@ -ARG DEBIAN_RELEASE=stretch +ARG DEBIAN_RELEASE=buster ARG ARCH=armel FROM debian:$DEBIAN_RELEASE ARG DEBIAN_RELEASE @@ -7,9 +7,11 @@ ARG ARCH # this is a customized version of ev3dev-stretch-cross image # setup repositories and install required packages -COPY sources.list.$DEBIAN_RELEASE /etc/apt/sources.list +#COPY sources.list.$DEBIAN_RELEASE /etc/apt/sources.list COPY ev3dev-archive-keyring.gpg /etc/apt/trusted.gpg.d/ RUN dpkg --add-architecture $ARCH && \ + apt-get update && \ + apt-get install apt-transport-https -y && \ apt-get -qq update && \ DEBIAN_FRONTEND=noninteractive apt-get -qq install --yes --no-install-recommends \ bash-completion \ @@ -64,7 +66,7 @@ RUN dpkg --add-architecture $ARCH && \ git \ zlib1g-dev && \ ( if [ "$DEBIAN_RELEASE" = "stretch" ]; then \ - wget http://ftp.debian.org/debian/pool/main/s/systemtap/systemtap-sdt-dev_3.1-2_$ARCH.deb -O /tmp/systemtap.deb; \ + wget http://archive.debian.org/debian/pool/main/s/systemtap/systemtap-sdt-dev_3.1-2_$ARCH.deb -O /tmp/systemtap.deb; \ elif [ "$DEBIAN_RELEASE" = "buster" ]; then \ wget http://ftp.debian.org/debian/pool/main/s/systemtap/systemtap-sdt-dev_4.0-1_$ARCH.deb -O /tmp/systemtap.deb; \ fi ) && \ diff --git a/system/Dockerfile.native b/system/Dockerfile.native index d7e5a5a..523dcbc 100644 --- a/system/Dockerfile.native +++ b/system/Dockerfile.native @@ -1,4 +1,4 @@ -ARG DEBIAN_RELEASE=stretch +ARG DEBIAN_RELEASE=buster ARG ARCH=armel FROM ev3dev/debian-$DEBIAN_RELEASE-$ARCH-qemu-minbase ARG DEBIAN_RELEASE diff --git a/system/sources.list.buster b/system/sources.list.buster index 17c1d92..9410352 100644 --- a/system/sources.list.buster +++ b/system/sources.list.buster @@ -1,4 +1,8 @@ +deb http://httpredir.debian.org/debian buster main contrib non-free +#deb-src http://httpredir.debian.org/debian buster main contrib non-free deb http://deb.debian.org/debian buster main contrib non-free -deb http://deb.debian.org/debian buster-updates main contrib non-free -deb http://deb.debian.org/debian-security buster/updates main contrib non-free -deb http://archive.ev3dev.org/debian buster main +#deb http://security.debian.org/ buster/updates main contrib non-free +#deb-src http://security.debian.org/ buster/updates main contrib non-free + +deb http://archive.ev3dev.org/debian buster main +#deb-src http://archive.ev3dev.org/debian buster main diff --git a/system/sources.list.stretch b/system/sources.list.stretch index c0f063b..99cd653 100644 --- a/system/sources.list.stretch +++ b/system/sources.list.stretch @@ -1,4 +1,2 @@ -deb http://deb.debian.org/debian stretch main contrib non-free -deb http://deb.debian.org/debian stretch-updates main contrib non-free -deb http://deb.debian.org/debian-security stretch/updates main contrib non-free +deb http://archive.debian.org/debian stretch main contrib non-free deb http://archive.ev3dev.org/debian stretch main