-
Notifications
You must be signed in to change notification settings - Fork 6
/
README
128 lines (79 loc) · 3.68 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# openjdk for arm under development
1. Login to qemu arm linux
sudo chroot temp /bin/su - hchan
sudo chroot temp
2. Build linux-sgx(sdk):
Remove linux-sgx/sdk/cpprt/linux/libunwind/Makefile
最後根據 docker file
3. Build qemu
http://wiki.t-firefly.com/en/ROC-RK3399-PC/linux_build_ubuntu_rootfs.html
apt install sudo
visudo
加下面一行到最底
hchan ALL=(ALL) NOPASSWD: ALL
Then
http://logan.tw/posts/2018/02/18/build-qemu-user-static-from-source-code/
Finally
https://www.qemu.org/download/#source
sudo cp ~/qemu-user-static/bin/qemu-aarch64-static temp/usr/bin/
最後根據 docker file
under ~/
git clone https://github.com/jianyu-m/openjdk-arch-sgx/ && cd openjdk-arch-sgx && git checkout origin/hansen_test && cp -R ~/linux-sgx/build/linux/ hotspot/lib && mkdir hotspot/build/ && cd hotspot/build/ && sudo cmake ../ && sudo make -j && sudo make install && sudo make install && sudo cp libenclave.so /usr/lib/ && cd ~/openjdk-arch-sgx/ && ./configure && sudo make images
# Use javac and java to run environment test
javac command under openjdk-arch-sgx/ev_test:
~/openjdk-arch-sgx/build/linux-aarch64-normal-server-release/images/j2sdk-image/bin/javac -d . -cp ~/openjdk-arch-sgx/build/linux-aarch64-normal-server-release/images/j2sdk-image/jre/lib/rt.jar TestSuit.java
java command under openjdk-arch-sgx/ev_test:
~/openjdk-arch-sgx/build/linux-aarch64-normal-server-release/images/j2sdk-image/bin/java -ea TestSuit
For loop program needed bytecodes
0: aload_0
1: invokespecial #1 // Method java/lang/Object."<init>":()V
4: return
0: iconst_0
1: istore_1
2: getstatic #2 // Field java/lang/System.out:Ljava/io/PrintStream;
5: iload_1
6: invokestatic #3 // Method addTen:(I)I
9: invokevirtual #4 // Method java/io/PrintStream.println:(I)V
12: return
0: iconst_0
1: istore_1
2: iload_1
3: bipush 10
5: if_icmpge 18
8: iload_0
9: iconst_1
10: iadd
11: istore_0
12: iinc 1, 1
15: goto 2
18: iload_0
19: ireturn
README:
This file should be located at the top of the OpenJDK Mercurial root
repository. A full OpenJDK repository set (forest) should also include
the following 6 nested repositories:
"jdk", "hotspot", "langtools", "corba", "jaxws" and "jaxp".
The root repository can be obtained with something like:
hg clone http://hg.openjdk.java.net/jdk8/jdk8 openjdk8
You can run the get_source.sh script located in the root repository to get
the other needed repositories:
cd openjdk8 && sh ./get_source.sh
People unfamiliar with Mercurial should read the first few chapters of
the Mercurial book: http://hgbook.red-bean.com/read/
See http://openjdk.java.net/ for more information about OpenJDK.
Simple Build Instructions:
0. Get the necessary system software/packages installed on your system, see
http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html
1. If you don't have a jdk7u7 or newer jdk, download and install it from
http://java.sun.com/javase/downloads/index.jsp
Add the /bin directory of this installation to your PATH environment
variable.
2. Configure the build:
bash ./configure
3. Build the OpenJDK:
make all
The resulting JDK image should be found in build/*/images/j2sdk-image
where make is GNU make 3.81 or newer, /usr/bin/make on Linux usually
is 3.81 or newer. Note that on Solaris, GNU make is called "gmake".
Complete details are available in the file:
http://hg.openjdk.java.net/jdk8/jdk8/raw-file/tip/README-builds.html