Skip to content

Commit a2eead9

Browse files
committed
Add descriptive comments to the scripts
1 parent b668f33 commit a2eead9

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

build/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM debian:jessie
22

3+
# this is a customized version of ev3dev-jessie-cross image
4+
35
# setup repositories and install required packages
46
COPY apt.sources.list.debian /etc/apt/sources.list
57
RUN dpkg --add-architecture armel && \
@@ -48,14 +50,18 @@ RUN dpkg --add-architecture armel && \
4850
autotools-dev
4951

5052

51-
# copy build patches
53+
# copy build patches & scripts
5254
RUN mkdir /opt/jdkcross
5355
COPY *.patch *.sh /opt/jdkcross/
5456
RUN chmod +x /opt/jdkcross/*.sh
57+
58+
# download JDK >=8
5559
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
5660

61+
# this directory should be mounted
5762
VOLUME /build
5863

64+
# prepare nonroot user
5965
COPY compiler.sudoers /etc/sudoers.d/compiler
6066
RUN chmod 0440 /etc/sudoers.d/compiler && \
6167
adduser --disabled-password --gecos \"\" compiler && \

build/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22
cd /build/jdk9u
3+
4+
# refresh patched build system
35
bash ./common/autoconf/autogen.sh
6+
7+
# configure the build
48
bash ./configure --with-boot-jdk=/opt/jdkcross/jdk-9.0.1 \
59
--openjdk-target=arm-linux-gnueabi \
610
--with-abi-profile=arm-ev3 \
@@ -14,4 +18,24 @@ bash ./configure --with-boot-jdk=/opt/jdkcross/jdk-9.0.1 \
1418
NM="arm-linux-gnueabi-gcc-nm" \
1519
BUILD_AR="gcc-ar" \
1620
BUILD_NM="gcc-nm"
21+
22+
## Description ##
23+
# Use the downloaded JDK: --with-boot-jdk=/opt/jdkcross/jdk-9.0.1
24+
# Cross-compiling for ARM: --openjdk-target=arm-linux-gnueabi
25+
# Tune for ARM926EJ-S softfp: --with-abi-profile=arm-ev3
26+
# Disable GUI: --enable-headless-only
27+
# Help to find freetype: --with-freetype-lib=/usr/lib/arm-linux-gnueabi
28+
# --with-freetype-include=/usr/include
29+
# Build only the Client VM: --with-jvm-variants=client
30+
# Add extra build flags: --with-extra-cflags="-Wno-maybe-uninitialized -D__SOFTFP__"
31+
# - Fix the build on new GCC: -Wno-maybe-uninitialized
32+
# - Force softfloat runtime: -D__SOFTFP__
33+
# Fix the "internal" string: --with-version-string="9.0.1"
34+
# Fix for GCC and LTO objects: AR="arm-linux-gnueabi-gcc-ar"
35+
# NM="arm-linux-gnueabi-gcc-nm"
36+
# BUILD_AR="gcc-ar"
37+
# BUILD_NM="gcc-nm"
38+
39+
40+
# start building
1741
make clean images

build/fetch.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#!/usr/bin/env bash
2+
3+
# clone the root project
24
cd /build
35
hg clone http://hg.openjdk.java.net/jdk-updates/jdk9u/
46
cd jdk9u
7+
8+
# clone the rest of the tree
59
bash ./get_source.sh
10+
11+
# apply the EV3-specific patches
612
patch -p1 < /opt/jdkcross/ev3.patch
713
patch -p1 -d hotspot < /opt/jdkcross/float.patch
814

0 commit comments

Comments
 (0)