1 From c184e95096881a13f29ebd7fc507fe305d3d8de5 Mon Sep 17 00:00:00 2001
2 From: Jan Nieuwenhuizen <janneke@gnu.org>
3 Date: Thu, 4 Oct 2018 22:03:31 +0200
4 Subject: [PATCH] build.sh: Update for mes 0.18.
7 build.sh | 92 +++++++++++++++++++++++++++++++++++++-----------------
9 2 files changed, 66 insertions(+), 32 deletions(-)
11 diff --git a/build.sh b/build.sh
12 index 335a7bb..19a0029 100755
16 # along with mescc-tools. If not, see <http://www.gnu.org/licenses/>.
19 -MES_SEED=${MES_SEED-../mescc-tools-seed/libs}
20 +MES_PREFIX=${MES_PREFIX-../mes}
21 +MES_SEED=${MES_SEED-../mes-seed}
22 MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
24 #########################################
25 @@ -32,15 +33,23 @@ MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed}
27 # Create proper debug segment
28 $MESCC_TOOLS_SEED/blood-elf\
29 + -f $MESCC_TOOLS_SEED/file_print.M1\
30 + -f $MESCC_TOOLS_SEED/match.M1\
31 + -f $MESCC_TOOLS_SEED/numerate_number.M1\
32 + -f $MESCC_TOOLS_SEED/string.M1\
33 -f $MESCC_TOOLS_SEED/blood-elf.M1\
34 -o blood-elf-blood-elf-footer.M1
38 $MESCC_TOOLS_SEED/M1 --LittleEndian --Architecture 1\
39 - -f $MES_SEED/x86.M1\
40 - -f $MES_SEED/crt1.M1\
41 - -f $MES_SEED/libc+tcc-mes.M1\
42 + -f $MES_PREFIX/lib/x86-mes/x86.M1\
43 + -f $MES_SEED/x86-mes/crt1.S\
44 + -f $MES_SEED/x86-mes/libc+tcc.S\
45 + -f $MESCC_TOOLS_SEED/file_print.M1\
46 + -f $MESCC_TOOLS_SEED/match.M1\
47 + -f $MESCC_TOOLS_SEED/numerate_number.M1\
48 + -f $MESCC_TOOLS_SEED/string.M1\
49 -f $MESCC_TOOLS_SEED/blood-elf.M1\
50 -f blood-elf-blood-elf-footer.M1\
52 @@ -49,7 +58,7 @@ $MESCC_TOOLS_SEED/hex2\
55 --BaseAddress 0x1000000\
56 - -f $MES_SEED/elf32-header.hex2\
57 + -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
61 @@ -65,9 +74,13 @@ $MESCC_TOOLS_SEED/hex2\
62 $MESCC_TOOLS_SEED/M1 \
65 - -f $MES_SEED/x86.M1\
66 - -f $MES_SEED/crt1.M1\
67 - -f $MES_SEED/libc+tcc-mes.M1\
68 + -f $MES_PREFIX/lib/x86-mes/x86.M1\
69 + -f $MES_SEED/x86-mes/crt1.S\
70 + -f $MES_SEED/x86-mes/libc+tcc.S\
71 + -f $MESCC_TOOLS_SEED/file_print.M1\
72 + -f $MESCC_TOOLS_SEED/match.M1\
73 + -f $MESCC_TOOLS_SEED/numerate_number.M1\
74 + -f $MESCC_TOOLS_SEED/string.M1\
75 -f $MESCC_TOOLS_SEED/M1.M1\
78 @@ -76,7 +89,7 @@ $MESCC_TOOLS_SEED/hex2 \
81 --BaseAddress 0x1000000\
82 - -f $MES_SEED/elf32-header.hex2\
83 + -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
87 @@ -92,9 +105,13 @@ $MESCC_TOOLS_SEED/hex2 \
91 - -f $MES_SEED/x86.M1\
92 - -f $MES_SEED/crt1.M1\
93 - -f $MES_SEED/libc+tcc-mes.M1\
94 + -f $MES_PREFIX/lib/x86-mes/x86.M1\
95 + -f $MES_SEED/x86-mes/crt1.S\
96 + -f $MES_SEED/x86-mes/libc+tcc.S\
97 + -f $MESCC_TOOLS_SEED/file_print.M1\
98 + -f $MESCC_TOOLS_SEED/match.M1\
99 + -f $MESCC_TOOLS_SEED/numerate_number.M1\
100 + -f $MESCC_TOOLS_SEED/string.M1\
101 -f $MESCC_TOOLS_SEED/hex2.M1\
104 @@ -103,10 +120,10 @@ $MESCC_TOOLS_SEED/hex2 \
107 --BaseAddress 0x1000000\
108 - -f $MES_SEED/elf32-header.hex2\
109 + -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
115 #########################
116 # Phase-1 Self-host #
117 @@ -123,18 +140,22 @@ $MESCC_TOOLS_SEED/hex2 \
121 - -f $MES_SEED/x86.M1\
122 - -f $MES_SEED/crt1.M1\
123 - -f $MES_SEED/libc+tcc-mes.M1\
124 + -f $MES_PREFIX/lib/x86-mes/x86.M1\
125 + -f $MES_SEED/x86-mes/crt1.S\
126 + -f $MES_SEED/x86-mes/libc+tcc.S\
127 + -f $MESCC_TOOLS_SEED/file_print.M1\
128 + -f $MESCC_TOOLS_SEED/match.M1\
129 + -f $MESCC_TOOLS_SEED/numerate_number.M1\
130 + -f $MESCC_TOOLS_SEED/string.M1\
131 -f $MESCC_TOOLS_SEED/blood-elf.M1\
132 -f blood-elf-blood-elf-footer.M1\
139 --BaseAddress 0x1000000\
140 - -f $MES_SEED/elf32-header.hex2\
141 + -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
145 @@ -150,18 +171,22 @@ $MESCC_TOOLS_SEED/hex2 \
149 - -f $MES_SEED/x86.M1\
150 - -f $MES_SEED/crt1.M1\
151 - -f $MES_SEED/libc+tcc-mes.M1\
152 + -f $MES_PREFIX/lib/x86-mes/x86.M1\
153 + -f $MES_SEED/x86-mes/crt1.S\
154 + -f $MES_SEED/x86-mes/libc+tcc.S\
155 + -f $MESCC_TOOLS_SEED/file_print.M1\
156 + -f $MESCC_TOOLS_SEED/match.M1\
157 + -f $MESCC_TOOLS_SEED/numerate_number.M1\
158 + -f $MESCC_TOOLS_SEED/string.M1\
159 -f $MESCC_TOOLS_SEED/M1.M1\
167 --BaseAddress 0x1000000\
168 - -f $MES_SEED/elf32-header.hex2\
169 + -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
173 @@ -177,18 +202,27 @@ $MESCC_TOOLS_SEED/hex2 \
177 - -f $MES_SEED/x86.M1\
178 - -f $MES_SEED/crt1.M1\
179 - -f $MES_SEED/libc+tcc-mes.M1\
180 + -f $MES_PREFIX/lib/x86-mes/x86.M1\
181 + -f $MES_SEED/x86-mes/crt1.S\
182 + -f $MES_SEED/x86-mes/libc+tcc.S\
183 + -f $MESCC_TOOLS_SEED/file_print.M1\
184 + -f $MESCC_TOOLS_SEED/match.M1\
185 + -f $MESCC_TOOLS_SEED/numerate_number.M1\
186 + -f $MESCC_TOOLS_SEED/string.M1\
187 -f $MESCC_TOOLS_SEED/hex2.M1\
195 --BaseAddress 0x1000000\
196 - -f $MES_SEED/elf32-header.hex2\
197 + -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\
203 +touch bin/exec_enable
204 +touch bin/get_machine
206 diff --git a/install.sh b/install.sh
207 index e4dccff..29e58d6 100644
213 mkdir -p "$PREFIX/bin"
214 -cp blood-elf "$PREFIX/bin/blood-elf"
215 -cp hex2 "$PREFIX/bin/hex2"
216 -cp M1 "$PREFIX/bin/M1"
217 +cp bin/blood-elf "$PREFIX/bin/blood-elf"
218 +cp bin/hex2 "$PREFIX/bin/hex2"
219 +cp bin/M1 "$PREFIX/bin/M1"