1 |
<html> |
<html><head><title>Gavare's eXperimental Emulator: Configuration files</title> |
2 |
<head><title>GXemul documentation: Configuration files</title> |
<meta name="robots" content="noarchive,nofollow,noindex"></head> |
|
</head> |
|
3 |
<body bgcolor="#f8f8f8" text="#000000" link="#4040f0" vlink="#404040" alink="#ff0000"> |
<body bgcolor="#f8f8f8" text="#000000" link="#4040f0" vlink="#404040" alink="#ff0000"> |
4 |
<table border=0 width=100% bgcolor="#d0d0d0"><tr> |
<table border=0 width=100% bgcolor="#d0d0d0"><tr> |
5 |
<td width=100% align=center valign=center><table border=0 width=100%><tr> |
<td width=100% align=center valign=center><table border=0 width=100%><tr> |
6 |
<td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6"> |
<td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6"> |
7 |
<b>GXemul documentation:</b></font> |
<b>Gavare's eXperimental Emulator:</b></font><br> |
8 |
<font color="#000000" size="6"><b>Configuration files</b> |
<font color="#000000" size="6"><b>Configuration files</b> |
9 |
</font></td></tr></table></td></tr></table><p> |
</font></td></tr></table></td></tr></table><p> |
|
<!-- The first 10 lines are cut away by the homepage updating script. --> |
|
|
|
|
10 |
|
|
11 |
<!-- |
<!-- |
12 |
|
|
13 |
$Id: configfiles.html,v 1.6 2005/04/16 00:29:45 debug Exp $ |
$Id: configfiles.html,v 1.27 2006/09/07 11:44:42 debug Exp $ |
14 |
|
|
15 |
Copyright (C) 2003-2005 Anders Gavare. All rights reserved. |
Copyright (C) 2003-2006 Anders Gavare. All rights reserved. |
16 |
|
|
17 |
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
18 |
modification, are permitted provided that the following conditions are met: |
modification, are permitted provided that the following conditions are met: |
46 |
|
|
47 |
<p> |
<p> |
48 |
<ul> |
<ul> |
49 |
|
<li><a href="#intro">Introduction</a> |
50 |
<li><a href="#config">Configuration file syntax</a> |
<li><a href="#config">Configuration file syntax</a> |
51 |
<li><a href="#minimal">A minimal example</a> |
<li><a href="#minimal">A minimal example</a> |
52 |
</ul> |
</ul> |
55 |
|
|
56 |
|
|
57 |
<p><br> |
<p><br> |
58 |
|
<a name="intro"></a> |
59 |
|
<h3>Introduction:</h3> |
60 |
|
|
61 |
|
GXemul can be started by entering machine settings directly on the command |
62 |
|
line, or by reading a configuration file (a "configuration script"). |
63 |
|
|
64 |
|
<p>Configuration files in GXemul are useful/necessary for three reasons: |
65 |
|
|
66 |
|
<p><ol> |
67 |
|
<li>It can be difficult to remember long command lines with |
68 |
|
lots of options. |
69 |
|
<li>Some settings cannot be fully controlled on the command line. They can |
70 |
|
only be set using configuration files. |
71 |
|
<li>Complex setups of multiple machines, or complex network setups, |
72 |
|
are not supported on the command line. |
73 |
|
</ol> |
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
<p><br> |
83 |
<a name="config"></a> |
<a name="config"></a> |
84 |
<h3>Configuration file syntax:</h3> |
<h3>Configuration file syntax:</h3> |
85 |
|
|
90 |
<p> |
<p> |
91 |
<table border="0"><tr><td width="40"> </td><td> |
<table border="0"><tr><td width="40"> </td><td> |
92 |
<pre> |
<pre> |
93 |
<font color="#2020cf">!!gxemul <-- configuration files must start like this |
<font color="#2020cf">! This is an example configuration file for GXemul. |
|
! |
|
|
! This is an example configuration file for GXemul. |
|
94 |
! Anything following an exclamation mark (and also the exclamation |
! Anything following an exclamation mark (and also the exclamation |
95 |
! mark itself) is ignored. |
! mark itself) is ignored. |
96 |
! |
! |
97 |
! Each configuration file should contain one emul entry. Almost |
! Almost all settings are optional.</font> |
|
! everything else is optional.</font> |
|
98 |
|
|
99 |
<b>emul(</b> |
<b>name(<font color="#ff003f">"my test emul"</font>)</b> <font color="#2020cf">! Optional name of this emulation</font> |
|
<b>name(<font color="#ff003f">"my test emul"</font>)</b> <font color="#2020cf">! Optional name of this emulation</font> |
|
100 |
|
|
101 |
<font color="#2020cf">! This creates a network (ethernet):</font> |
<font color="#2020cf">! This creates an ethernet network:</font> |
102 |
<b>net(</b> |
<b>net(</b> |
103 |
<b>ipv4net(<font color="#ff003f">"10.2.0.0"</font>)</b> <font color="#2020cf">! The default is 10.0.0.0/8, but</font> |
<b>ipv4net(<font color="#ff003f">"10.2.0.0"</font>)</b> <font color="#2020cf">! The default is 10.0.0.0/8, but</font> |
104 |
<b>ipv4len(16)</b> <font color="#2020cf">! it can be overridden like this.</font> |
<b>ipv4len(16)</b> <font color="#2020cf">! it can be overridden like this.</font> |
105 |
<b>)</b> |
<font color="#2020cf">! local_port(12345)</font> |
106 |
|
<font color="#2020cf">! add_remote("localhost:12346")</font> |
107 |
|
<b>)</b> |
108 |
|
|
109 |
<font color="#2020cf">! This creates a machine:</font> |
<font color="#2020cf">! This creates a machine:</font> |
110 |
<b>machine(</b> |
<b>machine(</b> |
111 |
<b>name(<font color="#ff003f">"My test machine"</font>)</b> |
<b>name(<font color="#ff003f">"My test machine"</font>)</b> |
112 |
|
|
113 |
<font color="#2020cf">! serial_nr(123) ! Useful when emulating multiple machines</font> |
<font color="#2020cf">! serial_nr(123) ! Useful when emulating multiple machines</font> |
117 |
<b>type(<font color="#ff003f">"dec"</font>)</b> <font color="#2020cf">! This is actually not optional</font> |
<b>type(<font color="#ff003f">"dec"</font>)</b> <font color="#2020cf">! This is actually not optional</font> |
118 |
<b>subtype(<font color="#ff003f">"5000/200"</font>)</b> |
<b>subtype(<font color="#ff003f">"5000/200"</font>)</b> |
119 |
|
|
120 |
<b>cpu(R3000)</b> <font color="#2020cf">! Normally set implicitly to a reasonable</font> |
<b>cpu(<font color="#ff003f">"R3000"</font>)</b> <font color="#2020cf">! Normally set implicitly to a reasonable</font> |
121 |
<font color="#2020cf">! value, depending on <i>type</i> and <i>subtype</i></font> |
<font color="#2020cf">! value, depending on <i>type</i> and <i>subtype</i></font> |
122 |
|
|
123 |
<font color="#2020cf">! ncpus(4)</font> |
<font color="#2020cf">! ncpus(4)</font> |
140 |
<b>bootarg(<font color="#ff003f">"-a"</font>)</b> |
<b>bootarg(<font color="#ff003f">"-a"</font>)</b> |
141 |
|
|
142 |
<font color="#2020cf">! n_gfx_cards(2) ! for DECstation dual/tripple-head</font> |
<font color="#2020cf">! n_gfx_cards(2) ! for DECstation dual/tripple-head</font> |
143 |
<font color="#2020cf">! emulated_hz(10000000) ! for fixing the emulated clock speed</font> |
<font color="#2020cf">! emulated_hz(10000000) ! for setting the emulated clock speed (mostly fake)</font> |
144 |
|
|
145 |
<font color="#2020cf">! add_x11_display("otherbox:0") ! for dual/tripple-head etc</font> |
<font color="#2020cf">! add_x11_display("otherbox:0") ! for dual/tripple-head etc</font> |
146 |
<font color="#2020cf">! add_x11_display("thisbox:0")</font> |
<font color="#2020cf">! add_x11_display("thisbox:0")</font> |
163 |
<b>use_x11(yes)</b> |
<b>use_x11(yes)</b> |
164 |
<b>x11_scaledown(2)</b> |
<b>x11_scaledown(2)</b> |
165 |
|
|
|
<font color="#2020cf">! bintrans(disable)</font> |
|
|
<font color="#2020cf">! old_bintrans(enable)</font> |
|
|
<font color="#2020cf">! bintrans_size(24)</font> |
|
|
|
|
166 |
<font color="#2020cf">! slow_serial_interrupts_hack_for_linux(yes)</font> |
<font color="#2020cf">! slow_serial_interrupts_hack_for_linux(yes)</font> |
167 |
|
|
|
<font color="#2020cf">! debugger_on_badaddr(yes)</font> |
|
|
|
|
168 |
<font color="#2020cf">{ |
<font color="#2020cf">{ |
169 |
Long comments spanning multiple lines should be surrounded |
Long comments spanning multiple lines should be surrounded |
170 |
with tuborg parentheses. |
with tuborg parentheses. |
179 |
-p pc add a breakpoint (remember to use the '0x' prefix for hex!) |
-p pc add a breakpoint (remember to use the '0x' prefix for hex!) |
180 |
-r register dumps before every instruction |
-r register dumps before every instruction |
181 |
-t show function trace tree |
-t show function trace tree |
|
-y x set max_random_cycles_per_chunk to x (experimental) |
|
182 |
</i></b>--> |
</i></b>--> |
183 |
}</font> |
}</font> |
184 |
|
|
185 |
<b>)</b> |
<b>)</b> |
186 |
|
|
187 |
<font color="#2020cf">! Multiple machine are allowed.</font> |
<font color="#2020cf">! Multiple machine definitions are allowed.</font> |
188 |
<b>machine(</b> |
<b>machine(</b> |
189 |
<b>name(<font color="#ff003f">"another machine"</font>)</b> |
<b>name(<font color="#ff003f">"another machine"</font>)</b> |
190 |
<b>type(<font color="#ff003f">"hpcmips"</font>)</b> |
<b>type(<font color="#ff003f">"hpcmips"</font>)</b> |
191 |
<b>subtype(<font color="#ff003f">"be300"</font>)</b> |
<b>subtype(<font color="#ff003f">"be300"</font>)</b> |
192 |
|
|
193 |
<i>...</i> |
<i>...</i> |
|
<b>)</b> |
|
194 |
<b>)</b> |
<b>)</b> |
195 |
</pre> |
</pre> |
196 |
</td></tr></table> |
</td></tr></table> |
199 |
Starting the emulator with a configuration file is as simple as |
Starting the emulator with a configuration file is as simple as |
200 |
|
|
201 |
<pre> |
<pre> |
202 |
$ <b>./gxemul @myconfig</b> |
$ <b>gxemul @myconfig</b> |
203 |
</pre> |
</pre> |
204 |
|
|
205 |
if <b>myconfig</b> is the name of the configuration file. |
if <b>myconfig</b> is the name of the configuration file. |
209 |
|
|
210 |
|
|
211 |
|
|
212 |
|
|
213 |
|
|
214 |
<p><br> |
<p><br> |
215 |
<a name="minimal"></a> |
<a name="minimal"></a> |
216 |
<h3>A minimal example:</h3> |
<h3>A minimal example:</h3> |
217 |
|
|
218 |
Here is an example of what a minimal configuration file might look like: |
Here is an example of what a minimal configuration file might look like: |
219 |
|
|
220 |
<p> |
<p><table border="0"><tr><td width="40"> </td><td><pre> |
221 |
<table border="0"><tr><td width="40"> </td><td> |
<b>machine(</b> |
222 |
<pre> |
<b>subtype(<font color="#ff003f">"3max"</font>)</b> |
223 |
<font color="#2020cf">!!gxemul</font> |
<b>load(<font color="#ff003f">"netbsd-pmax-INSTALL-2.0"</font>)</b> |
|
|
|
|
<b>emul(</b> |
|
|
<b>machine(</b> |
|
|
<b>type(<font color="#ff003f">"dec"</font>)</b> |
|
|
<b>subtype(<font color="#ff003f">"3max"</font>)</b> |
|
|
<b>load(<font color="#ff003f">"netbsd-pmax-INSTALL-2.0"</font>)</b> |
|
|
<b>)</b> |
|
224 |
<b>)</b> |
<b>)</b> |
225 |
</pre> |
</pre> |
226 |
</td></tr></table> |
</td></tr></table> |
227 |
|
|
228 |
<p> |
<p>For most machine types, <tt>type</tt> is needed. If only |
229 |
For some machine types, specifying the <b>subtype</b> might not even be |
<tt>subtype</tt> is specified, and the name is unique (i.e. there is only |
230 |
necessary. Also, adding a <b>net</b> is quite useful, especially for |
one major type which has such a subtype), then the <tt>type</tt> can be |
231 |
|
omitted. Also, adding a <tt>net</tt> is quite useful, especially for |
232 |
netbooting kernels. |
netbooting kernels. |
233 |
|
|
234 |
|
|
235 |
|
|
236 |
|
|
237 |
|
|
238 |
|
|
239 |
|
|
240 |
|
|
241 |
|
|
242 |
</p> |
</p> |