File tree Expand file tree Collapse file tree 5 files changed +91
-1
lines changed Expand file tree Collapse file tree 5 files changed +91
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ FROM ev3dev-lang-java:jdk-stretch
2
2
3
3
# copy build patches & scripts
4
4
COPY *.patch *.sh /opt/jdkcross/
5
- RUN chmod +x /opt/jdkcross/*.sh
5
+ COPY lejos/ /opt/jdkcross/lejos/
6
+ RUN chmod +x /opt/jdkcross/*.sh /opt/jdkcross/lejos/*.sh
6
7
7
8
# this directory should be mounted
8
9
VOLUME /build
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ BUILDDIR="/build"
8
8
JDKDIR=" /build/jdk"
9
9
# output images directory
10
10
IMAGEDIR=" /build/jdk/build/linux-arm-normal-client-release/images"
11
+ # lejos temp directory
12
+ LEJOSDIR=" /build/lejos"
11
13
12
14
# #
13
15
# # Version-specific configuration
@@ -45,6 +47,8 @@ IMAGEDIR="/build/jdk/build/linux-arm-normal-client-release/images"
45
47
# Download URL
46
48
# HOSTJDK_URL="https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz"
47
49
50
+ # leJOS JRI name
51
+ # LEJOS_NAME=openjdk9-jri
48
52
49
53
# OpenJDK 9
50
54
if [ " $JDKVER " -eq " 9" ]; then
@@ -55,6 +59,7 @@ if [ "$JDKVER" -eq "9" ]; then
55
59
HOSTJDK=" $BUILDDIR /jdk-9.0.4"
56
60
HOSTJDK_FILE=" $BUILDDIR /openjdk-9.0.4_linux-x64_bin.tar.gz"
57
61
HOSTJDK_URL=" https://download.java.net/java/GA/jdk9/9.0.4/binaries/openjdk-9.0.4_linux-x64_bin.tar.gz"
62
+ LEJOS_NAME=openjdk9-jri
58
63
59
64
# OpenJDK 10
60
65
elif [ " $JDKVER " -eq " 10" ]; then
@@ -65,6 +70,7 @@ elif [ "$JDKVER" -eq "10" ]; then
65
70
HOSTJDK=" $BUILDDIR /jdk-10"
66
71
HOSTJDK_FILE=" $BUILDDIR /openjdk-10_linux-x64_bin.tar.gz"
67
72
HOSTJDK_URL=" https://download.java.net/java/GA/jdk10/10/binaries/openjdk-10_linux-x64_bin.tar.gz"
73
+ LEJOS_NAME=openjdk10-jri
68
74
69
75
# invalid or unset version
70
76
else
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -e
3
+
4
+ cd " $( dirname ${BASH_SOURCE[0]} ) "
5
+ source ../config.sh
6
+ SCRIPTDIR=" $SCRIPTDIR /.."
7
+
8
+ # temp directory
9
+ rm -rf " $LEJOSDIR "
10
+ mkdir -p " $LEJOSDIR /deb" " $LEJOSDIR /root"
11
+
12
+ echo " copy in JRI"
13
+ cp -rf --preserve=links " $IMAGEDIR /jri-ev3" " $LEJOSDIR /jri"
14
+
15
+ echo " download DEB packages"
16
+ cd " $LEJOSDIR /deb"
17
+ apt-get download ` cat " $SCRIPTDIR /lejos/pkgs.txt" `
18
+
19
+ echo " extract them"
20
+ find . -type f -exec dpkg-deb -x {} ../root \;
21
+
22
+ echo " remove unnecessary stuff"
23
+ cd " $LEJOSDIR /root"
24
+ rm -rf ./bin ./sbin ./etc ./usr/bin ./usr/sbin ./usr/share
25
+
26
+ echo " move root to jri"
27
+ mv " $LEJOSDIR /root" " $LEJOSDIR /jri/sysroot"
28
+
29
+ echo " install dynamic linking wrappers"
30
+ cd " $LEJOSDIR /jri/bin"
31
+
32
+ for exe in ` ls` ; do
33
+ mv " $exe " " $exe .real"
34
+ ln -s " wrapper.sh" " $exe "
35
+ done
36
+
37
+ cp " $SCRIPTDIR /lejos/wrapper.sh" .
38
+
39
+ echo " cleanup"
40
+ rm -rf " $LEJOSDIR /deb"
41
+
42
+ echo " create archive"
43
+ cd " $LEJOSDIR "
44
+ mv " jri" " $LEJOS_NAME "
45
+ tar -cf - " $LEJOS_NAME " | pigz -9 > " $BUILDDIR /lejos-$LEJOS_NAME .tar.gz"
Original file line number Diff line number Diff line change
1
+ gcc-6-base:armel
2
+ libasound2-data
3
+ libasound2:armel
4
+ libavahi-client3:armel
5
+ libavahi-common-data:armel
6
+ libavahi-common3:armel
7
+ libc-bin:armel
8
+ libc6:armel
9
+ libcomerr2:armel
10
+ libcups2:armel
11
+ libdbus-1-3:armel
12
+ libffi6:armel
13
+ libgcc1:armel
14
+ libgmp10:armel
15
+ libgnutls30:armel
16
+ libgssapi-krb5-2:armel
17
+ libhogweed4:armel
18
+ libidn11:armel
19
+ libk5crypto3:armel
20
+ libkeyutils1:armel
21
+ libkrb5-3:armel
22
+ libkrb5support0:armel
23
+ libnettle6:armel
24
+ libp11-kit0:armel
25
+ libpng16-16:armel
26
+ libsystemd0:armel
27
+ libtasn1-6:armel
28
+ zlib1g:armel
29
+ libexpat1:armel
30
+ libfreetype6:armel
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ DIR=` dirname " $0 " `
3
+ DIR=` eval " cd \" $DIR \" && pwd" `
4
+ SYSDIR=" $DIR /../sysroot"
5
+ SYSDIR=` eval " cd \" $SYSDIR \" && pwd" `
6
+
7
+ export LD_LIBRARY_PATH=" $LD_LIBRARY_PATH :$SYSDIR /lib:$SYSDIR /lib/arm-linux-gnueabi:$SYSDIR /usr/lib:$SYSDIR /usr/lib/arm-linux-gnueabi:$SYSDIR /usr/lib/arm-linux-gnueabi/gconv"
8
+ exec " $SYSDIR /lib/ld-linux.so.3" " $DIR /$0 .real" " $@ "
You can’t perform that action at this time.
0 commit comments