|
1 | 1 | # openjdk-9-ev3
|
2 |
| -A custom Build of OpenJDK 9 Sources for EV3, a Lego Mindstorms Brick using ARM Soft Float |
| 2 | +A custom build of OpenJDK 9 for EV3, a Lego Mindstorms programmable brick featuring a ARM926EJ-S CPU. |
| 3 | + |
| 4 | +## Components |
| 5 | +The output consists of these parts: |
| 6 | +* JRE running on the EV3 - `jre-ev3.zip` |
| 7 | + * Stripped down version -- a runtime image |
| 8 | +* JDK built for the EV3 - `jdk-ev3.zip` |
| 9 | + * Basically the full build |
| 10 | +* [Official OpenJDK linux-amd64](http://jdk.java.net/9/) with EV3 jmods |
| 11 | + * Only a stripped down version -- also a runtime image |
| 12 | + * It can be used for creating custom JRE images. For this, jlink and the ev3 jmods are included. |
| 13 | + * It has `javac` (jdk.compiler module). |
| 14 | + * JShell remote launcher (hackish, linux-only) is available. |
| 15 | + |
3 | 16 |
|
4 | 17 | ## Building
|
5 | 18 |
|
| 19 | +0. Clone/download this repo to your computer. |
6 | 20 | 1. Install [Docker](https://docs.docker.com/engine/installation/) for your operating system.
|
7 |
| -2. Build the jdk9 cross-compilation environment: |
| 21 | +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/) |
| 22 | +3. Build the jdk9 cross-compilation environment: |
8 | 23 | ```sh
|
9 | 24 | sudo docker build -t ev3dev-lang-java:jdk9-system -f build/Dockerfile.system build
|
10 | 25 | sudo docker build -t ev3dev-lang-java:jdk9-build -f build/Dockerfile.scripts build
|
11 | 26 | ```
|
12 |
| -3. Run the newly prepared container. You have to mount a host directory to the the `/build` directory in the container, |
| 27 | +4. Run the newly prepared container. You have to mount a host directory to the the `/build` directory in the container, |
13 | 28 | otherwise the build would get discarded. The final build needs at least 6.5 GB of free space (in the build directory).
|
14 | 29 | ```
|
15 | 30 | sudo docker run --rm -it -v <path on host, where the sources should be stored>:/build ev3dev-lang-java:jdk9-build
|
16 | 31 | ```
|
17 |
| -4. Let's fetch the OpenJDK sources: |
| 32 | +5. Let's fetch the OpenJDK sources: |
18 | 33 | ```
|
19 | 34 | ./fetch.sh
|
20 | 35 | ```
|
21 |
| -5. The OpenJDK source tree should be ready. Now you can start the cross-build itself: |
| 36 | +6. The OpenJDK source tree should be ready. Now you can start the cross-build itself: |
22 | 37 | ```
|
23 | 38 | ./build.sh
|
24 | 39 | ```
|
25 |
| -6. Create the zipped images: |
| 40 | +7. Create the zipped images: |
26 | 41 | ```
|
27 | 42 | ./zip.sh
|
28 | 43 | ```
|
29 |
| -7. If the build was successful, JDK9 packages were created in `/build/jre-ev3.zip` and `/build/jdk-ev3.zip`. |
| 44 | +8. If the build was successful, JDK9 packages were created in `/build/jre-ev3.zip`, `/build/jdk-ev3.zip` and `/build/jdk-pc.zip`. |
30 | 45 | If you have mounted `/build`, you can access the files from the host.
|
0 commit comments