/[gxemul]/trunk/doc/configfiles.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/doc/configfiles.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4 - (show annotations)
Mon Oct 8 16:18:00 2007 UTC (16 years, 5 months ago) by dpavlin
File MIME type: text/html
File size: 8023 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.707 2005/04/27 16:37:33 debug Exp $
20050408	Some minor updates to the wdc. Linux now doesn't complain
		anymore if a disk is non-present.
20050409	Various minor fixes (a bintrans bug, and some other things).
		The wdc seems to work with Playstation2 emulation, but there
		is a _long_ annoying delay when disks are detected.
		Fixing a really important bintrans bug (when devices and RAM
		are mixed within 4KB pages), which was triggered with
		NetBSD/playstation2 kernels.
20050410	Adding a dummy dev_ps2_ether (just so that NetBSD doesn't
		complain as much during bootup).
		Symbols starting with '$' are now ignored.
		Renaming dev_ps2_ohci.c to dev_ohci.c, etc.
20050411	Moving the bintrans-cache-isolation check from cpu_mips.c to
		cpu_mips_coproc.c. (I thought this would give a speedup, but
		it's not noticable.)
		Better playstation2 sbus interrupt code.
		Skip ahead many ticks if the count register is read manually.
		(This increases the speed of delay-loops that simply read
		the count register.)
20050412	Updates to the playstation2 timer/interrupt code.
		Some other minor updates.
20050413	NetBSD/cobalt runs from a disk image :-) including userland;
		updating the documentation on how to install NetBSD/cobalt
		using NetBSD/pmax (!).
		Some minor bintrans updates (no real speed improvement) and
		other minor updates (playstation2 now uses the -o options).
20050414	Adding a dummy x86 (and AMD64) mode.
20050415	Adding some (32-bit and 16-bit) x86 instructions.
		Adding some initial support for non-SCSI, non-IDE floppy
		images. (The x86 mode can boot from these, more or less.)
		Moving the devices/ and include/ directories to src/devices/
		and src/include/, respectively.
20050416	Continuing on the x86 stuff. (Adding pc_bios.c and some simple
		support for software interrupts in 16-bit mode.)
20050417	Ripping out most of the x86 instruction decoding stuff, trying
		to rewrite it in a cleaner way.
		Disabling some of the least working CPU families in the
		configure script (sparc, x86, alpha, hppa), so that they are
		not enabled by default.
20050418	Trying to fix the bug which caused problems when turning on
		and off bintrans interactively, by flushing the bintrans cache
		whenever bintrans is manually (re)enabled.
20050419	Adding the 'lswi' ppc instruction.
		Minor updates to the x86 instruction decoding.
20050420	Renaming x86 register name indices from R_xx to X86_R_xx (this
		makes building on Tru64 nicer).
20050422	Adding a check for duplicate MIPS TLB entries on tlbwr/tlbwi.
20050427	Adding screenshots to guestoses.html.
		Some minor fixes and testing for the next release.

==============  RELEASE 0.3.2  ==============


1 <html>
2 <head><title>GXemul documentation: Configuration files</title>
3 </head>
4 <body bgcolor="#f8f8f8" text="#000000" link="#4040f0" vlink="#404040" alink="#ff0000">
5 <table border=0 width=100% bgcolor="#d0d0d0"><tr>
6 <td width=100% align=center valign=center><table border=0 width=100%><tr>
7 <td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6">
8 <b>GXemul documentation:</b></font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
9 <font color="#000000" size="6"><b>Configuration files</b>
10 </font></td></tr></table></td></tr></table><p>
11 <!-- The first 10 lines are cut away by the homepage updating script. -->
12
13
14 <!--
15
16 $Id: configfiles.html,v 1.6 2005/04/16 00:29:45 debug Exp $
17
18 Copyright (C) 2003-2005 Anders Gavare. All rights reserved.
19
20 Redistribution and use in source and binary forms, with or without
21 modification, are permitted provided that the following conditions are met:
22
23 1. Redistributions of source code must retain the above copyright
24 notice, this list of conditions and the following disclaimer.
25 2. Redistributions in binary form must reproduce the above copyright
26 notice, this list of conditions and the following disclaimer in the
27 documentation and/or other materials provided with the distribution.
28 3. The name of the author may not be used to endorse or promote products
29 derived from this software without specific prior written permission.
30
31 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
32 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
35 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
39 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
40 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
41 SUCH DAMAGE.
42
43 -->
44
45 <a href="./">Back to the index</a>
46
47 <p><br>
48 <h2>Configuration files</h2>
49
50 <p>
51 <ul>
52 <li><a href="#config">Configuration file syntax</a>
53 <li><a href="#minimal">A minimal example</a>
54 </ul>
55
56
57
58
59 <p><br>
60 <a name="config"></a>
61 <h3>Configuration file syntax:</h3>
62
63 Configuration files are simple text files. I don't have time to write
64 down a formal syntax right now, so I hope that conveying the syntax
65 through an example is good enough:
66
67 <p>
68 <table border="0"><tr><td width="40">&nbsp;</td><td>
69 <pre>
70 <font color="#2020cf">!!gxemul <-- configuration files must start like this
71 !
72 ! This is an example configuration file for GXemul.
73 ! Anything following an exclamation mark (and also the exclamation
74 ! mark itself) is ignored.
75 !
76 ! Each configuration file should contain one emul entry. Almost
77 ! everything else is optional.</font>
78
79 <b>emul(</b>
80 <b>name(<font color="#ff003f">"my test emul"</font>)</b> <font color="#2020cf">! Optional name of this emulation</font>
81
82 <font color="#2020cf">! This creates a network (ethernet):</font>
83 <b>net(</b>
84 <b>ipv4net(<font color="#ff003f">"10.2.0.0"</font>)</b> <font color="#2020cf">! The default is 10.0.0.0/8, but</font>
85 <b>ipv4len(16)</b> <font color="#2020cf">! it can be overridden like this.</font>
86 <b>)</b>
87
88 <font color="#2020cf">! This creates a machine:</font>
89 <b>machine(</b>
90 <b>name(<font color="#ff003f">"My test machine"</font>)</b>
91
92 <font color="#2020cf">! serial_nr(123) ! Useful when emulating multiple machines</font>
93 <font color="#2020cf"> ! on multiple hosts, and they need to have</font>
94 <font color="#2020cf"> ! unique MAC addresses, etc.</font>
95
96 <b>type(<font color="#ff003f">"dec"</font>)</b> <font color="#2020cf">! This is actually not optional</font>
97 <b>subtype(<font color="#ff003f">"5000/200"</font>)</b>
98
99 <b>cpu(R3000)</b> <font color="#2020cf">! Normally set implicitly to a reasonable</font>
100 <font color="#2020cf">! value, depending on <i>type</i> and <i>subtype</i></font>
101
102 <font color="#2020cf">! ncpus(4)</font>
103 <font color="#2020cf">! use_random_bootstrap_cpu(yes)</font>
104
105 <b>memory(128)</b> <font color="#2020cf">! 128 MB memory. This overrides</font>
106 <font color="#2020cf">! the default amount of memory for</font>
107 <font color="#2020cf">! this machine type.</font>
108
109 <font color="#2020cf">! random_mem_contents(yes)</font>
110
111 <font color="#2020cf">! prom_emulation(no)</font>
112
113 <font color="#2020cf">! byte_order(big) ! Normally set implicitly (because</font>
114 <font color="#2020cf">! of <i>type</i> and <i>subtype</i>, or decided</font>
115 <font color="#2020cf">! from the file loaded with <i>load</i></font>
116
117 <b>load(<font color="#ff003f">"netbsd-INSTALL"</font>)</b>
118 <b>bootname(<font color="#ff003f">"netbsd"</font>)</b>
119 <b>bootarg(<font color="#ff003f">"-a"</font>)</b>
120
121 <font color="#2020cf">! n_gfx_cards(2) ! for DECstation dual/tripple-head</font>
122 <font color="#2020cf">! emulated_hz(10000000) ! for fixing the emulated clock speed</font>
123
124 <font color="#2020cf">! add_x11_display("otherbox:0") ! for dual/tripple-head etc</font>
125 <font color="#2020cf">! add_x11_display("thisbox:0")</font>
126
127 <font color="#2020cf">{
128 Devices can be added like this:
129
130 device("8250 addr=0x18000800 addr_mult=4")
131
132 The name comes first, followed by optional parameters.
133 Remember to use 0x for hexadecimal values.
134 }</font>
135
136 <font color="#2020cf">! force_netboot(yes)</font>
137 <font color="#2020cf">! start_paused(yes)</font>
138
139 <b>disk(<font color="#ff003f">"nbsd.img"</font>)</b>
140 <b>disk(<font color="#ff003f">"6c:cdrom.iso"</font>)</b>
141
142 <b>use_x11(yes)</b>
143 <b>x11_scaledown(2)</b>
144
145 <font color="#2020cf">! bintrans(disable)</font>
146 <font color="#2020cf">! old_bintrans(enable)</font>
147 <font color="#2020cf">! bintrans_size(24)</font>
148
149 <font color="#2020cf">! slow_serial_interrupts_hack_for_linux(yes)</font>
150
151 <font color="#2020cf">! debugger_on_badaddr(yes)</font>
152
153 <font color="#2020cf">{
154 Long comments spanning multiple lines should be surrounded
155 with tuborg parentheses.
156
157 { Long comments can be nested. }
158 <!--
159 <b><i>... TODO ...
160 -i display each instruction as it is executed
161 -J disable some speed tricks
162 -m nr run at most nr instructions (on any cpu)
163 -N display nr of instructions/second average, at regular intervals
164 -p pc add a breakpoint (remember to use the '0x' prefix for hex!)
165 -r register dumps before every instruction
166 -t show function trace tree
167 -y x set max_random_cycles_per_chunk to x (experimental)
168 </i></b>-->
169 }</font>
170
171 <b>)</b>
172
173 <font color="#2020cf">! Multiple machine are allowed.</font>
174 <b>machine(</b>
175 <b>name(<font color="#ff003f">"another machine"</font>)</b>
176 <b>type(<font color="#ff003f">"hpcmips"</font>)</b>
177 <b>subtype(<font color="#ff003f">"be300"</font>)</b>
178
179 <i>...</i>
180 <b>)</b>
181 <b>)</b>
182 </pre>
183 </td></tr></table>
184
185 <p>
186 Starting the emulator with a configuration file is as simple as
187
188 <pre>
189 $ <b>./gxemul @myconfig</b>
190 </pre>
191
192 if <b>myconfig</b> is the name of the configuration file.
193
194
195
196
197
198
199 <p><br>
200 <a name="minimal"></a>
201 <h3>A minimal example:</h3>
202
203 Here is an example of what a minimal configuration file might look like:
204
205 <p>
206 <table border="0"><tr><td width="40">&nbsp;</td><td>
207 <pre>
208 <font color="#2020cf">!!gxemul</font>
209
210 <b>emul(</b>
211 <b>machine(</b>
212 <b>type(<font color="#ff003f">"dec"</font>)</b>
213 <b>subtype(<font color="#ff003f">"3max"</font>)</b>
214 <b>load(<font color="#ff003f">"netbsd-pmax-INSTALL-2.0"</font>)</b>
215 <b>)</b>
216 <b>)</b>
217 </pre>
218 </td></tr></table>
219
220 <p>
221 For some machine types, specifying the <b>subtype</b> might not even be
222 necessary. Also, adding a <b>net</b> is quite useful, especially for
223 netbooting kernels.
224
225
226
227
228
229 </p>
230
231 </body>
232 </html>

  ViewVC Help
Powered by ViewVC 1.1.26