Skip to content

Commit b0bd57c

Browse files
authored
Merge pull request #13 from ev3dev-lang-java/openjdk-9-stretch
Upgrade OpenJDK 9 system to Stretch
2 parents 0da9360 + e6938f6 commit b0bd57c

File tree

8 files changed

+21
-22
lines changed

8 files changed

+21
-22
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openjdk-9-ev3
1+
# OpenJDK 9 for EV3
22
A custom build of OpenJDK 9 for EV3, a Lego Mindstorms programmable brick featuring a ARM926EJ-S CPU.
33

44
## Components
@@ -45,8 +45,8 @@ JShell JDI agent on the remote side, which is handled by SSH as well.
4545
2. Adjust the JAVA_VERSION variable in `build/config.sh` to match the current OpenJDK tip: [OpenJDK 9 updates](http://hg.openjdk.java.net/jdk-updates/jdk9u/)
4646
3. Build the jdk9 cross-compilation environment:
4747
```sh
48-
sudo docker build -t ev3dev-lang-java:jdk9-system -f build/Dockerfile.system build
49-
sudo docker build -t ev3dev-lang-java:jdk9-build -f build/Dockerfile.scripts build
48+
sudo docker build -t ev3dev-lang-java:jdk9-stretch -f build/Dockerfile.system build
49+
sudo docker build -t ev3dev-lang-java:jdk9-build -f build/Dockerfile.scripts build
5050
```
5151
4. Run the newly prepared container. You have to mount a host directory to the the `/build` directory in the container,
5252
otherwise the build would get discarded. The final build needs at least 6.5 GB of free space (in the build directory).

build/Dockerfile.scripts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ev3dev-lang-java:jdk9-system
1+
FROM ev3dev-lang-java:jdk9-stretch
22

33
# copy build patches & scripts
44
COPY *.patch *.sh /opt/jdkcross/

build/Dockerfile.system

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
FROM debian:jessie
1+
FROM debian:stretch
22

3-
# this is a customized version of ev3dev-jessie-cross image
3+
# this is a customized version of ev3dev-stretch-cross image
44

55
# setup repositories and install required packages
66
COPY apt.sources.list.debian /etc/apt/sources.list
7+
COPY ev3dev-archive-keyring.gpg /etc/apt/trusted.gpg.d/
78
RUN dpkg --add-architecture armel && \
8-
apt-key adv --keyserver pgp.mit.edu --recv-keys D57D95AF93178A7C && \
9-
apt-key adv --keyserver pgp.mit.edu --recv-keys 7DE089671804772E && \
109
apt-get update && \
1110
DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
1211
bash-completion \
1312
ca-certificates \
1413
cmake \
1514
build-essential \
1615
crossbuild-essential-armel \
17-
gdb \
16+
gdb-multiarch \
1817
less \
1918
man-db \
2019
nano \
@@ -51,7 +50,7 @@ RUN dpkg --add-architecture armel && \
5150

5251
# download JDK 9
5352
RUN mkdir /opt/jdkcross
54-
RUN curl -SL http://download.java.net/java/GA/jdk9/9.0.1/binaries/openjdk-9.0.1_linux-x64_bin.tar.gz | tar -xzC /opt/jdkcross
53+
RUN curl -SL https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz | tar -xzC /opt/jdkcross
5554

5655
# prepare a nonroot user
5756
COPY compiler.sudoers /etc/sudoers.d/compiler

build/apt.sources.list.debian

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
deb http://deb.debian.org/debian jessie main contrib non-free
2-
deb http://deb.debian.org/debian-security jessie/updates main contrib non-free
3-
deb http://archive.ev3dev.org/debian jessie main
4-
deb http://emdebian.org/tools/debian/ jessie main
1+
deb http://deb.debian.org/debian stretch main contrib non-free
2+
deb http://deb.debian.org/debian-security stretch/updates main contrib non-free
3+
deb http://archive.ev3dev.org/debian stretch main

build/build.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ bash ./common/autoconf/autogen.sh
2727
# BUILD_NM="gcc-nm"
2828

2929
# configure the build
30-
bash ./configure --with-boot-jdk="$SCRIPTDIR/jdk-9.0.1" \
30+
bash ./configure --with-boot-jdk="$SCRIPTDIR/jdk-9.0.4" \
3131
--openjdk-target=arm-linux-gnueabi \
3232
--with-abi-profile=arm-ev3 \
3333
--enable-headless-only \
3434
--with-freetype-lib=/usr/lib/arm-linux-gnueabi \
3535
--with-freetype-include=/usr/include \
3636
--with-jvm-variants=client \
37-
--with-extra-cflags="-Wno-maybe-uninitialized -D__SOFTFP__" \
37+
--with-extra-cflags="-w -Wno-error -D__SOFTFP__" \
38+
--with-extra-cxxflags="-w -Wno-error -D__SOFTFP__" \
3839
--with-version-string="$JAVA_VERSION" \
3940
AR="arm-linux-gnueabi-gcc-ar" \
4041
NM="arm-linux-gnueabi-gcc-nm" \

build/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
JAVA_VERSION="9.0.4+11"
3+
JAVA_VERSION="9.0.4+12"
44
JAVA_REPO="http://hg.openjdk.java.net/jdk-updates/jdk9u/"
55
SCRIPTDIR="/opt/jdkcross"
66

build/ev3dev-archive-keyring.gpg

2.42 KB
Binary file not shown.

build/zip.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rm -rf ./jshell-support
1414
rm -f ./jdk-ev3
1515

1616
# build ev3 runtime image
17-
"$SCRIPTDIR/jdk-9.0.1/bin/jlink" \
17+
"$SCRIPTDIR/jdk-9.0.4/bin/jlink" \
1818
--module-path ./jmods/ \
1919
--endian little \
2020
--compress 0 \
@@ -25,8 +25,8 @@ rm -f ./jdk-ev3
2525
--output ./jre-ev3
2626

2727
# build microjdk
28-
"$SCRIPTDIR/jdk-9.0.1/bin/jlink" \
29-
--module-path "$SCRIPTDIR/jdk-9.0.1/jmods" \
28+
"$SCRIPTDIR/jdk-9.0.4/bin/jlink" \
29+
--module-path "$SCRIPTDIR/jdk-9.0.4/jmods" \
3030
--compress 2 \
3131
--strip-debug \
3232
--no-header-files \
@@ -41,8 +41,8 @@ ln -s ./jdk ./jdk-ev3
4141

4242
# JShell hack
4343
mkdir jshell-support
44-
"$SCRIPTDIR/jdk-9.0.1/bin/javac" -d ./jshell-support "$SCRIPTDIR/jshellhack/DumpPort.java"
45-
"$SCRIPTDIR/jdk-9.0.1/bin/jar" cf ./jshellhack.jar -C ./jshell-support jshellhack/DumpPort.class
44+
"$SCRIPTDIR/jdk-9.0.4/bin/javac" -d ./jshell-support "$SCRIPTDIR/jshellhack/DumpPort.java"
45+
"$SCRIPTDIR/jdk-9.0.4/bin/jar" cf ./jshellhack.jar -C ./jshell-support jshellhack/DumpPort.class
4646
cp ./jshellhack.jar ./jdk-pc/bin
4747
cp "$SCRIPTDIR/jshell-launch.sh" ./jdk-pc/bin
4848

0 commit comments

Comments
 (0)