10 |
|
|
11 |
<!-- |
<!-- |
12 |
|
|
13 |
$Id: configfiles.html,v 1.25 2006/06/22 13:22:40 debug Exp $ |
$Id: configfiles.html,v 1.27 2006/09/07 11:44:42 debug Exp $ |
14 |
|
|
15 |
Copyright (C) 2003-2006 Anders Gavare. All rights reserved. |
Copyright (C) 2003-2006 Anders Gavare. All rights reserved. |
16 |
|
|
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> |
|
<li><a href="#multihost">Network across multiple hosts</a> |
|
52 |
</ul> |
</ul> |
53 |
|
|
54 |
|
|
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 |
|
|
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> |
236 |
|
|
237 |
|
|
238 |
|
|
|
<p><br> |
|
|
<a name="multihost"></a> |
|
|
<h3>Network across multiple hosts:</h3> |
|
|
|
|
|
<p>It is possible to add multiple <tt>machine</tt> entries into one |
|
|
configuration file. This will cause the emulator to try to run all those |
|
|
machines simultaneously. An alternative (and better) solution for doing |
|
|
this, which gives higher reliability (stability) and performance, is to |
|
|
have one configuration file per emulated machine. |
|
|
|
|
|
<p><table border="0" width="100%"><tr><td width="40"> </td> |
|
|
<td><pre> |
|
|
<font color="#2020cf">! Configuration file for a |
|
|
! "client" machine, netbooting |
|
|
! of another machine.</font> |
|
|
|
|
|
<b>net(</b> |
|
|
<b>local_port(15000)</b> |
|
|
<b>add_remote(<font color="#ff003f">"localhost:15001"</font>)</b> |
|
|
<b>)</b> |
|
|
<b>machine(</b> |
|
|
<b>name(<font color="#ff003f">"client machine"</font>)</b> |
|
|
<b>serial_nr(1)</b> <font color="#2020cf">! 10.0.0.1</font> |
|
|
|
|
|
<b>type(<font color="#ff003f">"sgi"</font>)</b> |
|
|
<b>subtype(<font color="#ff003f">"o2"</font>)</b> |
|
|
<b>load(<font color="#ff003f">"netbsd-GENERIC32_IP3x.gz"</font>)</b> |
|
|
<b>)</b> |
|
|
</pre></td><td width="20"> </td><td><pre> |
|
|
<font color="#2020cf">! Configuration file for the |
|
|
! "server" machine.</font> |
|
|
|
|
|
<b>net(</b> |
|
|
<b>local_port(15001)</b> |
|
|
<b>add_remote(<font color="#ff003f">"localhost:15000"</font>)</b> |
|
|
<b>)</b> |
|
|
<b>machine(</b> |
|
|
<b>name(<font color="#ff003f">"nfs server"</font>)</b> |
|
|
<b>serial_nr(2)</b> <font color="#2020cf">! 10.0.0.2</font> |
|
|
|
|
|
<b>type(<font color="#ff003f">"dec"</font>)</b> |
|
|
<b>subtype(<font color="#ff003f">"3max"</font>)</b> |
|
|
<b>disk(<font color="#ff003f">"nbsd_pmax.img"</font>)</b> |
|
|
<b>)</b> |
|
|
</pre></td><td width="20"> </td></tr></table> |
|
|
|
|
|
<p>This example creates a network using the default settings (10.0.0.0/8), |
|
|
but it also allows the network to be connected to other emulator |
|
|
instances. <tt>local_port(15000)</tt> means that anything coming in to |
|
|
UDP port 15000 on the host is added to the network. All ethernet packets |
|
|
on the network are also sent out to all other connected machines (those |
|
|
added with <tt>add_remote()</tt>). |
|
|
|
|
|
<p>As you can see in the example, this is a configuration file for |
|
|
netbooting a NetBSD/sgimips diskless machine, with a NetBSD/pmax machine |
|
|
acting as the nfs server. Note that the nfs server has ports 15000 and |
|
|
15001 reversed! |
|
|
|
|
|
<p>"<tt>localhost</tt>" can be changed to the Internet hostname of a |
|
|
remote machine, to run the simulation across a physical network. |
|
|
|
|
|
<p><font color="#ff0000"><b>NOTE:</b> There is no error checking or |
|
|
security checking of any kind. All UDP packets arriving at the input port |
|
|
are added to the emulated ethernet. This is not very good of course; use |
|
|
this feature at your own risk.</font> |
|
|
|
|
239 |
|
|
240 |
|
|
241 |
|
|