/[gxemul]/trunk/doc/guestoses.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

Annotation of /trunk/doc/guestoses.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12 - (hide annotations)
Mon Oct 8 16:18:38 2007 UTC (16 years, 5 months ago) by dpavlin
File MIME type: text/html
File size: 58733 byte(s)
++ trunk/HISTORY	(local)
$Id: HISTORY,v 1.905 2005/08/16 09:16:24 debug Exp $
20050628	Continuing the work on the ARM translation engine. end_of_page
		works. Experimenting with load/store translation caches
		(virtual -> physical -> host).
20050629	More ARM stuff (memory access translation cache, mostly). This
		might break a lot of stuff elsewhere, probably some MIPS-
		related translation things.
20050630	Many load/stores are now automatically generated and included
		into cpu_arm_instr.c; 1024 functions in total (!).
		Fixes based on feedback from Alec Voropay: only print 8 hex
		digits instead of 16 in some cases when emulating 32-bit
		machines; similar 8 vs 16 digit fix for breakpoint addresses;
		4Kc has 16 TLB entries, not 48; the MIPS config select1
		register is now printed with "reg ,0".
		Also changing many other occurances of 16 vs 8 digit output.
		Adding cache associativity fields to mips_cpu_types.h; updating
		some other cache fields; making the output of
		mips_cpu_dumpinfo() look nicer.
		Generalizing the bintrans stuff for device accesses to also
		work with the new translation system. (This might also break
		some MIPS things.)
		Adding multi-load/store instructions to the ARM disassembler
		and the translator, and some optimizations of various kinds.
20050701	Adding a simple dev_disk (it can read/write sectors from
		disk images).
20050712	Adding dev_ether (a simple ethernet send/receive device).
		Debugger command "ninstrs" for toggling show_nr_of_instructions
		during runtime.
		Removing the framebuffer logo.
20050713	Continuing on dev_ether.
		Adding a dummy cpu_alpha (again).
20050714	More work on cpu_alpha.
20050715	More work on cpu_alpha. Many instructions work, enough to run
		a simple framebuffer fill test (similar to the ARM test).
20050716	More Alpha stuff.
20050717	Minor updates (Alpha stuff).
20050718	Minor updates (Alpha stuff).
20050719	Generalizing some Alpha instructions.
20050720	More Alpha-related updates.
20050721	Continuing on cpu_alpha. Importing rpb.h from NetBSD/alpha.
20050722	Alpha-related updates: userland stuff (Hello World using
		write() compiled statically for FreeBSD/Alpha runs fine), and
		more instructions are now implemented.
20050723	Fixing ldq_u and stq_u.
		Adding more instructions (conditional moves, masks, extracts,
		shifts).
20050724	More FreeBSD/Alpha userland stuff, and adding some more
		instructions (inserts).
20050725	Continuing on the Alpha stuff. (Adding dummy ldt/stt.)
		Adding a -A command line option to turn off alignment checks
		in some cases (for translated code).
		Trying to remove the old bintrans code which updated the pc
		and nr_of_executed_instructions for every instruction.
20050726	Making another attempt att removing the pc/nr of instructions
		code. This time it worked, huge performance increase for
		artificial test code, but performance loss for real-world
		code :-( so I'm scrapping that code for now.
		Tiny performance increase on Alpha (by using ret instead of
		jmp, to play nice with the Alpha's branch prediction) for the
		old MIPS bintrans backend.
20050727	Various minor fixes and cleanups.
20050728	Switching from a 2-level virtual to host/physical translation
		system for ARM emulation, to a 1-level translation.
		Trying to switch from 2-level to 1-level for the MIPS bintrans
		system as well (Alpha only, so far), but there is at least one
		problem: caches and/or how they work with device mappings.
20050730	Doing the 2-level to 1-level conversion for the i386 backend.
		The cache/device bug is still there for R2K/3K :(
		Various other minor updates (Malta etc).
		The mc146818 clock now updates the UIP bit in a way which works
		better with Linux for at least sgimips and Malta emulation.
		Beginning the work on refactoring the dyntrans system.
20050731	Continuing the dyntrans refactoring.
		Fixing a small but serious host alignment bug in memory_rw.
		Adding support for big-endian load/stores to the i386 bintrans
		backend.
		Another minor i386 bintrans backend update: stores from the
		zero register are now one (or two) loads shorter.
		The slt and sltu instructions were incorrectly implemented for
		the i386 backend; only using them for 32-bit mode for now.
20050801	Continuing the dyntrans refactoring.
		Cleanup of the ns16550 serial controller (removing unnecessary
		code).
		Bugfix (memory corruption bug) in dev_gt, and a patch/hack from
		Alec Voropay for Linux/Malta.
20050802	More cleanup/refactoring of the dyntrans subsystem: adding
		phys_page pointers to the lookup tables, for quick jumps
		between translated pages.
		Better fix for the ns16550 device (but still no real FIFO
		functionality).
		Converting cpu_ppc to the new dyntrans system. This means that
		I will have to start from scratch with implementing each
		instruction, and figure out how to implement dual 64/32-bit
		modes etc.
		Removing the URISC CPU family, because it was useless.
20050803	When selecting a machine type, the main type can now be omitted
		if the subtype name is unique. (I.e. -E can be omitted.)
		Fixing a dyntrans/device update bug. (Writes to offset 0 of
		a device could sometimes go unnoticed.)
		Adding an experimental "instruction combination" hack for
		ARM for memset-like byte fill loops.
20050804	Minor progress on cpu_alpha and related things.
		Finally fixing the MIPS dmult/dmultu bugs.
		Fixing some minor TODOs.
20050805	Generalizing the 8259 PIC. It now also works with Cobalt
		and evbmips emulation, in addition to the x86 hack.
		Finally converting the ns16550 device to use devinit.
		Continuing the work on the dyntrans system. Thinking about
		how to add breakpoints.
20050806	More dyntrans updates. Breakpoints seem to work now.
20050807	Minor updates: cpu_alpha and related things; removing
		dev_malta (as it isn't used any more).
		Dyntrans: working on general "show trace tree" support.
		The trace tree stuff now works with both the old MIPS code and
		with newer dyntrans modes. :)
		Continuing on Alpha-related stuff (trying to get *BSD to boot
		a bit further, adding more instructions, etc).
20050808	Adding a dummy IA64 cpu family, and continuing the refactoring
		of the dyntrans system.
		Removing the regression test stuff, because it was more or
		less useless.
		Adding loadlinked/storeconditional type instructions to the
		Alpha emulation. (Needed for Linux/alpha. Not very well tested
		yet.)
20050809	The function call trace tree now prints a per-function nr of
		arguments. (Semi-meaningless, since that data isn't read yet
		from the ELFs; some hardcoded symbols such as memcpy() and
		strlen() work fine, though.)
		More dyntrans refactoring; taking out more of the things that
		are common to all cpu families.
20050810	Working on adding support for "dual mode" for PPC dyntrans
		(i.e. both 64-bit and 32-bit modes).
		(Re)adding some simple PPC instructions.
20050811	Adding a dummy M68K cpu family. The dyntrans system isn't ready
		for variable-length ISAs yet, so it's completely bogus so far.
		Re-adding more PPC instructions.
		Adding a hack to src/file.c which allows OpenBSD/mac68k a.out
		kernels to be loaded.
		Beginning to add PPC loads/stores. So far they only work in
		32-bit mode.
20050812	The configure file option "add_remote" now accepts symbolic
		host names, in addition to numeric IPv4 addresses.
		Re-adding more PPC instructions.
20050814	Continuing to port back more PPC instructions.
		Found and fixed the cache/device write-update bug for 32-bit
		MIPS bintrans. :-)
		Triggered a really weird and annoying bug in Compaq's C
		compiler; ccc sometimes outputs code which loads from an
		address _before_ checking whether the pointer was NULL or not.
		(I'm not sure how to handle this problem.)
20050815	Removing all of the old x86 instruction execution code; adding
		a new (dummy) dyntrans module for x86.
		Taking the first steps to extend the dyntrans system to support
		variable-length instructions.
		Slowly preparing for the next release.
20050816	Adding a dummy SPARC cpu module.
		Minor updates (documentation etc) for the release.

==============  RELEASE 0.3.5  ==============


1 dpavlin 12 <html><head><title>Gavare's eXperimental Emulator:&nbsp;&nbsp;&nbsp;Installing and running "guest OSes"</title>
2     <meta name="robots" content="noarchive,nofollow,noindex"></head>
3 dpavlin 4 <body bgcolor="#f8f8f8" text="#000000" link="#4040f0" vlink="#404040" alink="#ff0000">
4     <table border=0 width=100% bgcolor="#d0d0d0"><tr>
5     <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">
7 dpavlin 12 <b>Gavare's eXperimental Emulator:&nbsp;&nbsp;&nbsp;</b></font>
8 dpavlin 4 <font color="#000000" size="6"><b>Installing and running "guest OSes"</b>
9     </font></td></tr></table></td></tr></table><p>
10 dpavlin 2
11     <!--
12    
13 dpavlin 12 $Id: guestoses.html,v 1.87 2005/08/16 09:16:25 debug Exp $
14 dpavlin 2
15     Copyright (C) 2003-2005 Anders Gavare. All rights reserved.
16    
17     Redistribution and use in source and binary forms, with or without
18     modification, are permitted provided that the following conditions are met:
19    
20     1. Redistributions of source code must retain the above copyright
21     notice, this list of conditions and the following disclaimer.
22     2. Redistributions in binary form must reproduce the above copyright
23     notice, this list of conditions and the following disclaimer in the
24     documentation and/or other materials provided with the distribution.
25     3. The name of the author may not be used to endorse or promote products
26     derived from this software without specific prior written permission.
27    
28     THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
29     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31     ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
32     FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33     DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34     OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36     LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37     OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38     SUCH DAMAGE.
39    
40     -->
41    
42 dpavlin 12
43 dpavlin 2 <a href="./">Back to the index</a>
44    
45     <p><br>
46     <h2>Installing and running "guest OSes"</h2>
47    
48     <p>
49     <ul>
50     <li><a href="#generalnotes">General notes on running "guest OSes"</a>
51 dpavlin 10 <li><a href="#netbsdinstall">NetBSD/pmax</a>
52     <li><a href="#netbsdarcinstall">NetBSD/arc</a>
53     <li><a href="#netbsdhpcmipsinstall">NetBSD/hpcmips</a>
54     <li><a href="#netbsdcobaltinstall">NetBSD/cobalt</a>
55     <li><a href="#netbsdevbmipsinstall">NetBSD/evbmips</a>
56     <li><a href="#netbsdsgimips">NetBSD/sgimips</a>
57     <li><a href="#openbsdinstall">OpenBSD/pmax</a>
58     <li><a href="#openbsdarcinstall">OpenBSD/arc</a>
59     <li><a href="#ultrixinstall">Ultrix/RISC</a>
60     <li><a href="#sprite">Sprite for DECstation</a>
61     <li><a href="#declinux">Debian GNU/Linux for DECstation</a>
62     <li><a href="#declinuxredhat">Redhat Linux for DECstation</a>
63 dpavlin 2 </ul>
64    
65 dpavlin 10 <p>In addition to the "working" guest operating systems listed above,
66     you might find the following information interesting:
67     <ul>
68     <li><a href="#mach">Mach/PMAX</a>
69     <li><a href="#openbsdsgiinstall">OpenBSD/sgi</a>
70     </ul>
71 dpavlin 2
72    
73    
74    
75    
76 dpavlin 10
77 dpavlin 2 <p><br>
78     <a name="generalnotes"></a>
79     <h3>General notes on running "guest OSes":</h3>
80    
81     The emulator works well enough to run complete operating systems. These
82     are often refered to as "guest" operating systems.
83    
84     <p>
85     Although it is possible to let a guest OS access real hardware, such as
86     harddisks, it is much more flexible and attractive to simulate harddisks
87     using files residing in the host's filesystem. On Unix-like systems, files
88     may contain holes, which makes this really simple. To the guest operating
89     system, the harddisk image looks and acts like a real disk.
90    
91    
92    
93    
94    
95    
96    
97    
98     <p><br>
99     <a name="netbsdinstall"></a>
100 dpavlin 10 <h3>NetBSD/pmax:</h3>
101 dpavlin 2
102 dpavlin 4 <p>
103     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
104 dpavlin 6 <a href="20050317-example.png"><img src="20050317-example_small.png"></a>
105 dpavlin 4
106 dpavlin 10 <p>To install <a href="http://www.netbsd.org/Ports/pmax/">NetBSD/pmax</a>
107     onto a harddisk image in the emulator, follow these instructions:
108 dpavlin 2
109 dpavlin 10 <p><ol start="1">
110 dpavlin 2 <li>Create an empty harddisk image, which will be the root disk
111     that NetBSD installs itself onto:<pre>
112 dpavlin 12 <b>dd if=/dev/zero of=nbsd_pmax.img bs=1 count=512 seek=1900000000</b>
113 dpavlin 2
114     </pre>
115     </ol>
116 dpavlin 4
117 dpavlin 2 <p>
118     From this point, there are two separate ways to continue the installation.
119     You can either download a CD-ROM iso image (and let the installation
120     program copy files from the CD-ROM image to the harddisk image), or you
121     can install via ftp. For an installation from a CD-ROM image, follow these
122     steps:
123     <p>
124     <ol start="2">
125    
126     <li>Download a NetBSD CD-ROM iso image:<pre>
127     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/pmaxcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/pmaxcd.iso</a>
128     or
129 dpavlin 10 <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/pmaxcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/pmaxcd.iso</a>
130 dpavlin 2
131     </pre>
132     <li>Start the emulator like this:<pre>
133 dpavlin 12 <b>gxemul -e 3max -A -d nbsd_pmax.img -d bc:pmaxcd.iso</b>
134 dpavlin 2 </pre>
135 dpavlin 10 and proceed like you would do if you were installing NetBSD on a real
136 dpavlin 12 DECstation. Remember to choose <tt>vt100</tt> as your terminal
137     type, and not <tt>rcons</tt>.
138 dpavlin 2 </ol>
139     <p>
140     For an ftp install, substitute steps 2 and 3 above with these:
141     <p>
142     <ol start="2">
143    
144 dpavlin 10 <li>Download a NetBSD pmax INSTALL kernel:<pre>
145 dpavlin 2 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/pmax/binary/kernel/netbsd-INSTALL.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/pmax/binary/kernel/netbsd-INSTALL.gz</a>
146     or
147 dpavlin 10 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/pmax/binary/kernel/netbsd-INSTALL.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/pmax/binary/kernel/netbsd-INSTALL.gz</a>
148 dpavlin 2
149     </pre>
150     <li>Start the emulator like this:<pre>
151 dpavlin 12 <b>gxemul -e 3max -A -d nbsd_pmax.img -O netbsd-INSTALL.gz</b>
152 dpavlin 2 </pre>
153 dpavlin 10 and proceed like you would do if you were installing NetBSD on a real
154 dpavlin 12 DECstation. Remember to choose <tt>vt100</tt> as your terminal
155     type, and not <tt>rcons</tt>. Suitable networking parameters are as
156     follows:<pre>
157 dpavlin 2 Which device shall I use? [le0]: <b>le0</b>
158     ..
159     Your DNS domain: <b>mydomain.com</b>
160     Your host name: <b>foo</b>
161     Your IPv4 number: <b>10.0.0.1</b>
162     IPv4 Netmask [0xff000000]: <b>0xff000000</b>
163     IPv4 gateway: <b>10.0.0.254</b>
164     IPv4 name server: <b>10.0.0.254</b>
165     </pre>
166 dpavlin 10 (If using 10.0.0.254 as the nameserver fails, then try entering the
167     IP number of a real-world nameserver instead.)
168     </ol>
169 dpavlin 2
170 dpavlin 12 <p>If you want to use a graphical framebuffer during the install, you can
171     add <b><tt>-X -Y2</tt></b> to the command line, and choose <tt>rcons</tt>
172     instead of <tt>vt100</tt> when prompted with which terminal type to use.
173     (By just using <tt><b>-X</b></tt>, you will get a full-size framebuffer
174     window.)
175 dpavlin 2
176 dpavlin 12 <p>When the installation is finished, the following command should start
177 dpavlin 2 NetBSD from the harddisk image:<pre>
178 dpavlin 12 <b>gxemul -e 3max -d nbsd_pmax.img</b>
179 dpavlin 2 </pre>
180    
181 dpavlin 12 <p><font color="#ff0000">NOTE:</font> For some reason, NetBSD 2.0.2
182     doesn't work with X out-of-the-box on pmax. It seems that this has to do
183     with NetBSD switching console system to "WSCONS" somewhere between 1.6.2
184     and 2.0. For now, if you want X, then try NetBSD 1.6.2.
185 dpavlin 2
186 dpavlin 12 <p>With NetBSD/pmax 1.6.2, try the following to start with a framebuffer:<pre>
187     <b>gxemul -X -e 3max -d nbsd_pmax.img</b>
188 dpavlin 2 </pre>
189 dpavlin 12 and log in as <tt>root</tt> and type <tt>startx</tt> to start X windows.
190 dpavlin 2
191    
192    
193    
194    
195    
196    
197 dpavlin 12
198 dpavlin 2 <p><br>
199     <a name="netbsdarcinstall"></a>
200 dpavlin 10 <h3>NetBSD/arc:</h3>
201 dpavlin 2
202 dpavlin 10 It is possible to run <a
203     href="http://www.netbsd.org/Ports/arc/">NetBSD/arc</a>
204     on an emulated Acer PICA-61 in the emulator.
205 dpavlin 2
206     <p>
207 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
208     <a href="20041024-netbsd-arc-installed.gif"><img src="20041024-netbsd-arc-installed_small.gif"></a>
209    
210     <p>
211 dpavlin 2 To install NetBSD/arc from a CDROM image onto an emulated harddisk image,
212     follow these instructions:
213    
214     <p>
215     <ol start="1">
216     <li>Create an empty harddisk image, which will be the root disk
217     that NetBSD installs itself onto:<pre>
218 dpavlin 12 <b>dd if=/dev/zero of=nbsd_arc.img bs=1024 count=1 seek=900000</b>
219 dpavlin 2
220     </pre>
221 dpavlin 12 <li>Download a NetBSD/arc 1.6.2 CDROM image, and a generic NetBSD/arc
222     kernel:<pre>
223 dpavlin 2 <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/arccd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/1.6.2/arccd.iso</a>
224    
225 dpavlin 12 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/arc/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.6.2/arc/binary/kernel/netbsd-GENERIC.gz</a>
226 dpavlin 2 </pre>
227     <li>Start the emulator using this command line:<pre>
228 dpavlin 12 <b>gxemul -e pica -x -d nbsd_arc.img -d bc:arccd.iso \
229 dpavlin 6 -j arc/binary/kernel/netbsd.RAMDISK.gz</b>
230 dpavlin 2
231     </pre>
232 dpavlin 6 (Try removing <tt>-x</tt> if you have problems with the xterm.)
233     <p>
234 dpavlin 2 <li>From now on, you have to use your imagination, as there is no
235     automatic installation program for NetBSD/arc. Here are some tips
236 dpavlin 12 and hints on how you can proceed with the install:
237     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
238     <b>mount /dev/cd0a /mnt2
239     disklabel -i -I sd0</b> (for example 'a', '4.2BSD', '1c',
240     '700M', 'b', 'swap', '701M', '$', 'P', 'W', 'y', and 'Q')
241     <b>newfs /dev/sd0a
242     mount /dev/sd0a /mnt
243     cd /mnt
244     for a in /mnt2/arc/binary/sets/*.tgz; do echo $a; tar xzpf $a; done
245     cd dev; sh MAKEDEV all
246     cd ../etc; echo "rc_configured=YES" &gt;&gt; rc.conf
247     cat > /mnt/etc/fstab
248     /dev/sd0a / ffs rw 1 1
249     /dev/sd0b none swap sw 0 0
250     </b>(press ctrl-d)<b>
251     <b>cd /; umount /mnt; umount /mnt2
252     halt</b>
253     </pre></td></tr></table>
254 dpavlin 2 </ol>
255    
256 dpavlin 10 <p>You can now use the generic NetBSD/arc kernel to boot from the harddisk
257     image, using the following command:<pre>
258 dpavlin 12 <b>gxemul -e pica -x -d nbsd_arc.img netbsd-GENERIC.gz</b>
259 dpavlin 2
260     </pre>
261    
262 dpavlin 10 <p>When asked for "<tt>root device: </tt>", enter <b><tt>sd0</tt></b>.
263 dpavlin 2
264    
265    
266    
267    
268    
269    
270     <p><br>
271     <a name="netbsdhpcmipsinstall"></a>
272 dpavlin 10 <h3>NetBSD/hpcmips:</h3>
273 dpavlin 2
274 dpavlin 10 It is possible to install <a
275     href="http://www.netbsd.org/Ports/hpcmips/">NetBSD/hpcmips</a> onto a disk
276     image, on an an emulated MobilePro 770, 780, 800, or 880. The emulator
277     treats the different machine models as being almost identical; the most
278     important difference is regarding the framebuffer.
279 dpavlin 2
280 dpavlin 10 <p><table border="0">
281 dpavlin 2 <tr>
282     <td width="80">&nbsp;</td>
283     <td><u>Model:</u></td>
284     <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
285     <td><u>Framebuffer size/depth:</u></td>
286     <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
287     <td><u>Framebuffer address:</u></td>
288     </tr>
289     <tr>
290     <td></td>
291     <td>MobilePro 770 (<super>*2</super>)</td>
292     <td></td>
293     <td>640 x 240, 16 bits</td>
294     <td></td>
295     <td>0xa000000</td>
296     </tr>
297     <tr>
298     <td></td>
299     <td>MobilePro 780</td>
300     <td></td>
301     <td>640 x 240, 16 bits</td>
302     <td></td>
303     <td>0xa180100 (<super>*</super>)</td>
304     </tr>
305     <tr>
306     <td></td>
307     <td>MobilePro 800</td>
308     <td></td>
309     <td>800 x 600, 16 bits</td>
310     <td></td>
311     <td>0xa000000</td>
312     </tr>
313     <tr>
314     <td></td>
315     <td>MobilePro 880</td>
316     <td></td>
317     <td>800 x 600, 16 bits</td>
318     <td></td>
319     <td>0xa0ea600 (<super>*</super>)</td>
320     </tr>
321     </table>
322    
323     <p>
324     (<super>*</super>) = not aligned at a 4 KB boundary, so it will not work
325     efficiently with the current bintrans system. Using this mode will still
326     work, but each load and store will be emulated much more slowly than is
327     possible with an aligned framebuffer.
328    
329     <p>
330     (<super>*2</super>) = The MobilePro 770's cursor keys work differently
331     than the other models, for some reason. (This is a known bug.)
332    
333     <p>
334 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
335     <a href="20050427-netbsd-hpcmips-1.png"><img src="20050427-netbsd-hpcmips-1_small.png"></a>
336     &nbsp;&nbsp;&nbsp;
337     <a href="20050427-netbsd-hpcmips-2.png"><img src="20050427-netbsd-hpcmips-2_small.png"></a>
338    
339     <p>
340 dpavlin 2 These instructions show an example of how to install
341 dpavlin 12 NetBSD/hpcmips on an emulated MobilePro 770:
342 dpavlin 2
343     <p>
344     <ol start="1">
345     <li>Create an empty harddisk image, which will be the root disk
346     that you will install NetBSD/hpcmips onto:<pre>
347 dpavlin 12 <b>dd if=/dev/zero of=nbsd_hpcmips.img bs=1024 count=1 seek=1990000</b>
348 dpavlin 2
349     </pre>
350 dpavlin 12 <li>Download the NetBSD/hpcmips 2.0.2 ISO image, and a generic kernel:<pre>
351     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2</a>/<a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/hpcmipscd.iso">hpcmipscd.iso</a>
352 dpavlin 2
353 dpavlin 12 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/hpcmips/binary/kernel/">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/hpcmips/binary/kernel</a>/<a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/hpcmips/binary/kernel/netbsd-GENERIC.gz">netbsd-GENERIC.gz</a>
354    
355     </pre>
356 dpavlin 2 <p>
357     <li>Start the installation like this:<pre>
358 dpavlin 12 <b>gxemul -e mobilepro770 -X -A -d nbsd_hpcmips.img \
359 dpavlin 6 -d b:hpcmipscd.iso -j hpcmips/installation/netbsd.gz</b>
360 dpavlin 2
361     </pre>
362     and proceed like you would do if you were installing NetBSD on a real
363 dpavlin 12 MobilePro 770. (Install onto wd0, choose "Use entire disk" when
364 dpavlin 2 doing the MBR partitioning, and choose wd1d (not cd0c) as the
365     CDROM device to install from.)
366     </ol>
367    
368     <p>
369     If everything worked, NetBSD should now be installed on the disk image.
370 dpavlin 12 Use the following command line to boot the emulated hpcmips machine:<pre>
371     <b>gxemul -e mobilepro770 -X -d nbsd_hpcmips.img netbsd-GENERIC.gz</b>
372 dpavlin 2
373     </pre>
374    
375 dpavlin 12 <p>If you change your mind at this point regarding which machine type to
376     emulate, you might for example prefer a MobilePro 800, then you can change
377     that at any time. NetBSD/hpcmips is designed to be able to boot on many
378     types, without any need to change the kernel.
379 dpavlin 2
380 dpavlin 12 <p>When you have logged in as <tt>root</tt>, you can use <tt>startx</tt> to
381     start X Windows, but there is no mouse support yet so only keyboard input
382     is available. This makes it a bit akward to use X.
383 dpavlin 2
384 dpavlin 10
385 dpavlin 2
386    
387    
388    
389    
390    
391 dpavlin 4 <p><br>
392     <a name="netbsdcobaltinstall"></a>
393 dpavlin 10 <h3>NetBSD/cobalt:</h3>
394 dpavlin 4
395     <a href="http://www.netbsd.org/Ports/cobalt/">NetBSD/cobalt</a> is tricky
396     to install, because the Cobalt machines were designed for Linux, and not
397     very flexible. There is no INSTALL kernel for NetBSD/cobalt. One way to
398     install the NetBSD/cobalt distribution onto a disk image is to do it from
399     another (emulated) machine.
400    
401     <p>
402     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
403     <a href="20050413-netbsd-cobalt.png"><img src="20050413-netbsd-cobalt_small.png"></a>
404    
405     <p>
406     The following instructions will let you install NetBSD/cobalt onto a disk
407     image, from an emulated DECstation 3MAX machine:
408    
409     <p>
410     <ol>
411     <li>Create an empty harddisk image, which will be the disk image
412     that you will install NetBSD/cobalt onto:<pre>
413 dpavlin 12 <b>dd if=/dev/zero of=nbsd_cobalt.img bs=1024 count=1 seek=1999000</b>
414 dpavlin 4
415     </pre>
416 dpavlin 10 <li>Download the generic kernel for Cobalt and the 2.0.2 ISO image:<pre>
417 dpavlin 12 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/cobalt/binary/kernel/netbsd-GENERIC.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/cobalt/binary/kernel/netbsd-GENERIC.gz</a>
418     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/cobaltcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/cobaltcd.iso</a>
419 dpavlin 4
420 dpavlin 12 </pre>
421 dpavlin 4 <p>
422 dpavlin 10 <li>Install NetBSD/pmax 2.0.2 according to instructions
423     <a href="#netbsdinstall">further up on this page</a>.
424 dpavlin 6 <p>
425 dpavlin 4 <li>Start NetBSD/pmax like this:<pre>
426 dpavlin 12 <b>gxemul -e3max -A -d nbsd_pmax.img -d cobaltcd.iso -d nbsd_cobalt.img</b>
427 dpavlin 4
428     </pre>
429     <li>Log in as root (on the emulated 3MAX machine), and execute the
430 dpavlin 12 following commands: (adjust according to taste)
431     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
432     <b>newfs /dev/sd1c
433     mount /dev/cd0c /mnt
434     mkdir /mnt2; mount /dev/sd1c /mnt2
435     cd /mnt2; sh
436     for a in /mnt/cobalt/binary/sets/*.tgz; do echo $a; tar zxfp $a; done
437     exit
438     cd dev; sh ./MAKEDEV all; cd ../etc
439     echo rc_configured=YES &gt;&gt; rc.conf
440     echo "/dev/wd0d / ffs rw 1 1" > fstab
441     cd /; umount /mnt; umount /mnt2; halt</b>
442     </pre></td></tr></table>
443 dpavlin 4 </ol>
444    
445     <p>
446     You should now be able to boot NetBSD/cobalt like this:<pre>
447 dpavlin 12 <b>gxemul -M128 -E cobalt -d nbsd_cobalt.img netbsd-GENERIC.gz</b>
448 dpavlin 4 </pre>
449    
450     Note that the installation instructions above create a filesystem
451     <i>without</i> a disklabel, so there is only one ffs partition and no
452     swap. You will need to enter the following things when booting with the
453     generic kernel:<pre>
454     root device (default wd0a): <b>wd0d</b>
455     dump device (default wd0b): <b>none</b>
456     file system (default generic): <b>ffs</b>
457 dpavlin 6 init path (default /sbin/init): <i>(just press enter here)</i>
458 dpavlin 4 </pre>
459    
460    
461    
462    
463    
464    
465    
466 dpavlin 2 <p><br>
467 dpavlin 10 <a name="netbsdevbmipsinstall"></a>
468     <h3>NetBSD/evbmips:</h3>
469 dpavlin 2
470 dpavlin 10 <a href="http://www.netbsd.org/Ports/evbmips/">NetBSD/evbmips</a> can run
471     in GXemul on an emulated Malta evaluation board (with a 5Kc or 4Kc CPU).
472 dpavlin 2
473     <p>
474 dpavlin 10 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
475     <a href="20050622-netbsd-evbmips-malta.png"><img src="20050622-netbsd-evbmips-malta_small.png"></a>
476 dpavlin 2
477 dpavlin 10 <p>It is tricky to install, because there is (as far as I know) no INSTALL
478     kernel. One way to install the NetBSD/evbmips distribution onto a disk
479     image is to install the files is to do it using another (emulated)
480     machine.
481    
482 dpavlin 2 <p>
483 dpavlin 10 The following instructions will let you install NetBSD/evbmips onto a disk
484     image, from an emulated DECstation 3MAX machine:
485 dpavlin 2
486     <p>
487 dpavlin 10 <ol>
488 dpavlin 12 <li>Install NetBSD/pmax 2.0.2 according to instructions
489     <a href="#netbsdinstall">further up on this page</a>.
490     <p>
491 dpavlin 10 <li>Create an empty harddisk image, which will be the disk image
492     that you will install NetBSD onto:<pre>
493 dpavlin 12 <b>dd if=/dev/zero of=nbsd_malta.img bs=1024 count=1 seek=999000</b>
494 dpavlin 2
495 dpavlin 10 </pre>
496     <li>Download the generic kernel and the 2.0.2 ISO image:<pre>
497 dpavlin 12 <a href="ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/evbmips-mipsel/binary/kernel/netbsd-MALTA.gz">ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-2.0.2/evbmips-mipsel/binary/kernel/netbsd-MALTA.gz</a>
498     <a href="ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/evbmips-mipselcd.iso">ftp://ftp.netbsd.org/pub/NetBSD/iso/2.0.2/evbmips-mipselcd.iso</a>
499 dpavlin 10
500 dpavlin 12 </pre>
501 dpavlin 10 <p>
502     <li>Start NetBSD/pmax like this:<pre>
503 dpavlin 12 <b>gxemul -e 3max -A -d nbsd_pmax.img -d nbsd_malta.img -d evbmips-mipselcd.iso</b>
504 dpavlin 10
505 dpavlin 12 </pre>and execute the following commands as <tt>root</tt>:
506     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
507     <b>newfs /dev/sd1c
508     mount /dev/cd0c /mnt
509     mkdir /mnt2; mount /dev/sd1c /mnt2
510     cd /mnt2; sh
511     for a in /mnt/evbmips-mipsel/binary/sets/*.tgz; do echo $a; tar zxfp $a; done
512     exit
513     cd dev; sh ./MAKEDEV all; cd ../etc
514     echo rc_configured=YES >> rc.conf
515     echo "/dev/wd0c / ffs rw 1 1" > fstab
516     cd /; umount /mnt; umount /mnt2; halt</b>
517     </pre></td></tr></table>
518 dpavlin 10 </ol>
519    
520 dpavlin 12 <p>You should now be able to boot NetBSD/evbmips using this command:<pre>
521     <b>gxemul -e malta -d nbsd_malta.img netbsd-MALTA.gz</b>
522 dpavlin 10 </pre>
523    
524 dpavlin 12 <p>Note 1: NetBSD detects a very fast CPU although the emulation isn't
525     really that fast, so emulated delays are very slow. Even on a multi-GHz
526     host, you will need a lot of patience.
527 dpavlin 10
528     <p>Note 2: To select a 4Kc (MIPS32) CPU instead of the default 5Kc
529     (MIPS64) CPU, add <tt><b>-C 4Kc</b></tt> to the command line. With NetBSD
530 dpavlin 12 2.0.2, however, there will be little or no difference in functionality, as
531     NetBSD still runs in 32-bit mode on 64-bit MIPS CPUs. The only difference
532     it makes in practice is that GXemul's binary translation subsystem might
533     run a bit faster (because there are some optimizations for 32-bit
534     emulation that don't work with 64-bit emulation).
535 dpavlin 10
536     <p>Note 3: The installation instructions above create a filesystem
537     <i>without</i> a disklabel, so there is only one ffs partition and no
538     swap. You will need to enter the following things when booting with the
539     generic kernel:<pre>
540     root device (default wd0a): <b>wd0c</b>
541     dump device (default wd0b): <b>none</b>
542     file system (default generic): <b>ffs</b>
543     init path (default /sbin/init): <i>(just press enter here)</i>
544     </pre>
545    
546    
547    
548    
549    
550    
551    
552     <p><br>
553     <a name="netbsdsgimips"></a>
554     <h3>NetBSD/sgimips:</h3>
555    
556     <p>
557     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
558     <a href="20050626-netbsd-sgimips-netboot.png"><img src="20050626-netbsd-sgimips-netboot_small.png"></a>
559    
560     <p><a href="http://www.netbsd.org/Ports/sgimips/">NetBSD/sgimips</a> can run
561     in GXemul on an emulated O2 (SGI-IP32). However, GXemul does not yet
562     emulate the AHC PCI SCSI controller in the O2. (I have mailed Adaptec
563     several times, asking for documentation, but never received any reply.)
564 dpavlin 12 NetBSD can still run in the emulator, as long as it doesn't use SCSI.
565 dpavlin 10
566     <p>For a simple test with the 2.0.2 ramdisk (install) kernel, try
567     dowloading<pre>
568     <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz</a>
569    
570 dpavlin 12 </pre>and run&nbsp;&nbsp;<b><tt>gxemul -e o2 netbsd-INSTALL32_IP3x.gz</tt></b>.
571 dpavlin 10
572     <p>It is possible to set up an environment for netbooting the emulated SGI
573     machine off of another emulated machine. Performing this setup is quite
574     time consuming, but necessary:
575    
576     <p>
577     <ol>
578     <li>First of all, the "<tt>nfs server</tt>" machine must be set up.
579     This needs to have a 750 MB <tt>/tftpboot</tt> partition.
580 dpavlin 12 <a href="#netbsdinstall">Install NetBSD/pmax 2.0.2 from CDROM</a>.
581     (Don't forget to add the extra partition!)
582 dpavlin 10 <p>
583     <li>Configure the nfs server machine to act as an nfs server.
584     Start up the emulated DECstation:<pre>
585 dpavlin 12 <b>gxemul -e 3max -A -d nbsd_pmax.img</b>
586 dpavlin 10 </pre>and enter the following commands as <tt>root</tt>
587     inside the emulator:
588     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
589     <b>echo hostname=server &gt;&gt; /etc/rc.conf
590     echo ifconfig_le0=\"inet 10.0.0.2\" &gt;&gt; /etc/rc.conf
591     echo nameserver 10.0.0.254 &gt;&gt; /etc/resolv.conf
592     echo 10.0.0.254 &gt; /etc/mygate
593     echo /tftpboot -maproot=root 10.0.0.1 &gt; /etc/exports
594     echo rpcbind=YES &gt;&gt; /etc/rc.conf
595     echo nfs_server=YES &gt;&gt; /etc/rc.conf
596     echo mountd=YES &gt;&gt; /etc/rc.conf
597     echo bootparamd=YES &gt;&gt; /etc/rc.conf
598     printf "client root=10.0.0.2:/tftpboot \\\n swap=10.0.0.2:/tftpboot/swap\n" &gt; /etc/bootparams
599     echo "bootps dgram udp wait root /usr/sbin/bootpd bootpd -d 4 -h 10.0.0.2" &gt;&gt; /etc/inetd.conf
600     cat &gt;&gt; /etc/bootptab
601     client:\
602     :ht=ether:\
603     :ha=102030000010:\
604     :sm=255.0.0.0:\
605     :lg=10.0.0.254:\
606     :ip=10.0.0.1:\
607     :rp=/tftpboot:
608     </b>(press CTRL-D)
609     <b>echo "10:20:30:00:00:10 client" &gt; /etc/ethers
610     echo 10.0.0.1 client &gt; /etc/hosts
611     reboot</b>
612     </pre></td></tr></table>
613     <li>Start the DECstation emulation again, and download the
614     NetBSD/sgimips distribution sets:<br>(NOTE: This
615     takes quite some time, even if you have a fast network connection.)
616     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
617 dpavlin 12 <b>cd /tftpboot; ftp -i ftp.uk.netbsd.org</b>
618 dpavlin 10 (log in as anonymous...)
619     <b>cd /pub/NetBSD/NetBSD-2.0.2/sgimips/binary/sets
620     mget base.tgz comp.tgz etc.tgz games.tgz man.tgz misc.tgz text.tgz
621     quit
622 dpavlin 2 sh
623 dpavlin 12 for a in *.tgz; do echo $a; tar zxfp $a; rm -f $a; done
624 dpavlin 10 echo 10.0.0.2:/tftpboot / nfs rw 0 0 &gt; /tftpboot/etc/fstab
625     echo rc_configured=YES &gt;&gt; /tftpboot/etc/rc.conf
626     dd if=/dev/zero of=swap bs=1024 count=32768
627     halt</b>
628     </pre></td></tr></table>
629     <li>Download the NetBSD/sgimips GENERIC and INSTALL kernels:<pre>
630     <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-GENERIC32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-GENERIC32_IP3x.gz</a>
631     <a href="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz">ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-2.0.2/sgimips/binary/kernel/netbsd-INSTALL32_IP3x.gz</a>
632 dpavlin 2
633     </pre>
634 dpavlin 10 <li>Create a configuration file called <tt>config_client</tt>:
635     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
636     <font color="#2020cf">!!gxemul
637     !
638     ! Configuration file for running NetBSD/sgimips diskless with
639     ! a NetBSD/pmax machine as the nfs server.</font>
640 dpavlin 2
641 dpavlin 10 <b>emul(
642     net(
643 dpavlin 12 add_remote("localhost:12444") </b>! the server<b>
644 dpavlin 10 local_port(12445) </b>! the client<b>
645     )
646 dpavlin 2
647 dpavlin 10 machine(
648     name("client machine")
649     serial_nr(1)
650 dpavlin 2
651 dpavlin 10 type("sgi")
652     subtype("o2")
653 dpavlin 2
654 dpavlin 10 load("netbsd-INSTALL32_IP3x.gz")</b>
655     ! load("netbsd-GENERIC32_IP3x.gz")<b>
656     )
657     )</b>
658     </pre></td></tr></table>
659     ... and another configuration file for the server,
660     <tt>config_server</tt>:
661     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
662     <font color="#2020cf">!!gxemul</font>
663     <b>emul(
664     net(
665     local_port(12444) </b>! the server<b>
666 dpavlin 12 add_remote("localhost:12445") </b>! the client<b>
667 dpavlin 10 )
668 dpavlin 2
669 dpavlin 10 machine(
670     name("nfs server")
671     serial_nr(2)
672 dpavlin 2
673 dpavlin 10 type("dec")
674     subtype("5000/200")
675 dpavlin 2
676 dpavlin 10 disk("nbsd_pmax.img")
677     )
678     )</b>
679     </pre></td></tr></table>
680     <li>Boot the "<tt>nfs server</tt>" and the NetBSD/sgimips
681     "<tt>client machine</tt>" as two separate emulator instances:<pre>
682     in one xterm:
683 dpavlin 12 <b>gxemul @config_server</b>
684 dpavlin 2
685 dpavlin 10 and then, in another xterm:
686 dpavlin 12 <b>gxemul @config_client</b>
687 dpavlin 10
688     </pre>
689     <li>In the NetBSD/sgimips window, choose "<tt>x: Exit Install System</tt>"
690     in the installer's main menu, and then type:<pre>
691     <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254</b>
692     <b>mount -v 10.0.0.2:/tftpboot /mnt</b>
693     <b>cd /mnt/dev; ./MAKEDEV all; cd /; umount /mnt</b>
694     <b>halt</b>
695 dpavlin 12 </pre>Then, once the client machine has halted, log in as <tt>root</tt>
696     on the server machine and type <tt><b>reboot</b></tt>.
697 dpavlin 10 <p>
698     <li>Once everything has been set up correctly, change
699     <tt>netbsd-INSTALL32_IP3x.gz</tt> in <tt>config_client</tt> to
700     <tt>netbsd-GENERIC32_IP3x.gz</tt> (the GENERIC kernel).
701     </ol>
702    
703     <p>You might want to log in as <tt>root</tt> on the server machine, and
704     run <tt>tcpdump -lnvv</tt> or similar, to see that what the client machine
705     actually does on the network.
706    
707     <p>It should now be possible to boot NetBSD/sgimips using the NetBSD/pmax
708 dpavlin 12 nfs server, using the following commands: (NOTE! Execute these two
709     commands in separate xterms!)<pre>
710     <b>gxemul @config_server</b>
711     <b>gxemul @config_client</b>
712 dpavlin 10 </pre>
713    
714 dpavlin 12 <p>When asked for "<tt>root device:</tt>" etc. on the client machine, enter
715 dpavlin 10 the following values:<pre>
716     root device: <b>mec0</b>
717     dump device: <b>(leave blank)</b>
718     file system (default generic): <b>(leave blank)</b>
719     ..
720     init path (default /sbin/init): <b>(leave blank)</b>
721     Enter pathname of shell or RETURN for /bin/sh: <b>(leave blank)</b>
722     Terminal type? [unknown] <b>xterm</b>
723     ..
724     # <b>exit</b> (to leave the single-user shell)
725     </pre>
726    
727     <p>Note: Netbooting like this is very slow, so you need a lot of patience.
728     For example, when NetBSD says "<tt>nfs_boot: trying DHCP/BOOTP</tt>",
729     there will be a long pause, even on a very fast host machine. The reason
730     for this is mostly because the emulator doesn't deal with timing issues
731     very well, but also because NetBSD tries IPv6 first, before falling back
732     to IPv4.
733    
734    
735    
736    
737    
738    
739    
740 dpavlin 2 <p><br>
741     <a name="openbsdinstall"></a>
742 dpavlin 10 <h3>OpenBSD/pmax:</h3>
743 dpavlin 2
744 dpavlin 10 Installing <a href="http://www.openbsd.org/pmax.html">OpenBSD/pmax</a> is
745     a bit harder than installing NetBSD/pmax. You should first read the <a
746     href="#netbsdinstall">section above</a> on how to install NetBSD/pmax,
747 dpavlin 2 before continuing here. If you have never installed OpenBSD on any
748 dpavlin 10 architecture, then you need a great deal of patience to do this. If, on
749     the other hand you are used to installing OpenBSD, then this should be no
750     problem for you.
751 dpavlin 2
752     <p>
753 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
754     <a href="20040710-openbsd-pmax.png"><img src="20040710-openbsd-pmax_small.png"></a>
755     &nbsp;&nbsp;&nbsp;
756     <a href="openbsd-pmax-20040710.png"><img src="openbsd-pmax-20040710_small.png"></a>
757    
758     <p>
759 dpavlin 2 OpenBSD/pmax died at release 2.8 of OpenBSD, so you should be
760     aware of the fact that this will not give you an up-to-date OpenBSD
761     system.
762    
763     <p>
764     Following these instructions <i>might</i> work. If not, then use
765     common sense and imagination to modify them as you see fit.
766    
767     <p>
768     <ol>
769     <li>Create an empty harddisk image, which will be the root disk
770     that OpenBSD installs itself onto:<pre>
771 dpavlin 12 <b>dd if=/dev/zero of=obsd_pmax.img bs=1 count=512 seek=900000000</b>
772 dpavlin 2
773     </pre>
774     <li>Download the entire pmax directory from the ftp server: (approx. 99 MB)<pre>
775 dpavlin 12 <b>wget -r <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/">ftp://ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/</a></b>
776 dpavlin 2
777     </pre>
778    
779 dpavlin 12 <li>Execute the following commands:
780     <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
781     <b>mv ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax/simpleroot28.fs.gz .
782     gunzip simpleroot28.fs.gz
783     chmod +w simpleroot28.fs</b> &lt;--- make sure
784     </pre></td></tr></table>
785 dpavlin 2 <li>You now need to make an ISO image of the entire directory you downloaded.
786 dpavlin 10 (I recommend using <tt>mkisofs</tt> for that purpose. If you don't
787 dpavlin 6 already have <tt>mkisofs</tt> installed on your system, you need
788 dpavlin 10 to install it in order to do this.)<pre>
789 dpavlin 12 <b>mkisofs -o openbsd_pmax_2.8.iso ftp.se.openbsd.org/pub/OpenBSD/2.8/pmax</b>
790 dpavlin 2
791     </pre>
792     <li>Start the emulator with all three (!) disk images:<pre>
793 dpavlin 12 <b>gxemul -e 3max -A -M64 -d obsd_pmax.img -d b:simpleroot28.fs -j bsd -d c:openbsd_pmax_2.8.iso</b>
794 dpavlin 2
795     </pre>
796 dpavlin 12 (If you add <tt>-X</tt>, you will run with the graphical
797 dpavlin 6 framebuffer. This is <i>REALLY</i> slow because the console has to
798     scroll a lot during the install. I don't recommend it.)
799 dpavlin 2 <p>
800     <li>Go on with the installation as you would do if you were installing on a real machine.
801     If you are not used to the OpenBSD installer, then this will most likely
802     be a very uncomfortable experience. Some important things to keep in mind are:
803     <ul>
804     <li>rz0 is the rootdisk you wish to install onto.
805     <li>rz1 is the simpleroot image.
806     <li>rz2 is the CDROM containing the "install sets".
807     <li>When asked for the "<b>root device?</b>", enter <b>rz1</b>.
808     <li>At "<b>Enter pathname of shell or RETURN for sh:</b>", press enter.
809     <li>At the # prompt, do the following:<pre>
810 dpavlin 12 <b>fsck /dev/rz1a</b> (and mark the filesystem as clean)
811     <b>mount /dev/rz1a /</b>
812     <b>mount -t kernfs kern kern</b>
813     <b>./install</b>
814 dpavlin 2
815     </pre>
816     and proceed with the install. Good luck. :-)
817     <li>Answer "<b>y</b>" when asked if you wish to configure the network.
818     (See the section about installing NetBSD/pmax for suitable
819     network settings.)
820     <li>Install from "<b>c</b>" (cdrom), choose "<b>rz2</b>" as the cdrom device, and "<b>/</b>" as
821     the directory containing the install sets.
822     </ul>
823     <p>
824 dpavlin 10 <li>For some unknown reason, the install script does not set the root
825     password! The first time you boot up OpenBSD after the install, you
826     need to go into single user mode and run <b>passwd root</b> to set
827     the root password, or you will not be able to log in at all!<pre>
828 dpavlin 12 <b>gxemul -e 3max -A -d obsd_pmax.img -d 2c:openbsd_pmax_2.8.iso -j bsd -o '-s'</b>
829 dpavlin 2 </pre>
830     While you are at it, you might want to extract the X11 install sets
831     as well, as the installer seems to ignore them too. (Perhaps due to a bug
832     in the installer, perhaps because of the way I used mkisofs.)
833     <p>
834     Execute the following commands in the emulator:
835 dpavlin 12 <p><table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
836     <b>fsck /dev/rz0a
837     mount /
838     passwd root
839 dpavlin 2
840 dpavlin 12 cd /; mount -t cd9660 /dev/rz2c /mnt; sh
841     for a in /mnt/[xX]*; do tar zxvf $a; done
842     ln -s /usr/X11R6/bin/Xcfbpmax /usr/X11R6/bin/X
843     ln -s /dev/fb0 /dev/mouse
844     echo /usr/X11R6/lib &gt;&gt; /etc/ld.so.conf
845     ldconfig
846 dpavlin 2
847 dpavlin 12 sync
848     halt</b>
849     </pre></td></tr></table>
850 dpavlin 2 </ol>
851    
852     <p>
853     NOTE: It is also possible to install via ftp instead of using a CDROM image.
854     This is not much less awkward, you still need the simpleroot filesystem
855     image, and you still have to manually add the X11 install sets and set the
856     root password, and so on.
857    
858     <p>
859     Once you have completed the installation procedure, the following command
860     will let you boot from the new rootdisk image:
861     <pre>
862 dpavlin 12 <b>gxemul -e 3max -X -M64 -o '-aN' -d obsd_pmax.img -j bsd</b>
863 dpavlin 2 </pre>
864    
865     <p>
866 dpavlin 6 (Normally, you would be asked about which root device to use (<tt>rz0</tt>),
867     but using <b><tt>-o '-aN'</tt></b> supresses that.)
868 dpavlin 2
869     <p>
870     When asked for which terminal type to use, when logging in as root,
871 dpavlin 6 enter <b><tt>rcons</tt></b> if you are using the graphical framebuffer,
872     <b><tt>vt100</tt></b> for text-mode.
873     <br>Use <b><tt>startx</tt></b> to start X windows.
874 dpavlin 2
875    
876    
877    
878    
879    
880 dpavlin 10
881 dpavlin 2 <p><br>
882     <a name="openbsdarcinstall"></a>
883 dpavlin 10 <h3>OpenBSD/arc:</h3>
884 dpavlin 2
885     It is possible to run OpenBSD/arc on an emulated Acer PICA-61 in the
886     emulator.
887    
888     <p>
889 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
890     <a href="20041024-openbsd-arc-installed.gif"><img src="20041024-openbsd-arc-installed_small.gif"></a>
891    
892     <p>
893 dpavlin 2 (You should be aware of the fact that OpenBSD for the ARC platform died at
894     release 2.3, so this will not give you an up-to-date OpenBSD system.
895     See
896     <a href="http://www.openbsd.org/arc.html">http://www.openbsd.org/arc.html</a>
897     for more information.)
898    
899     <p>
900     To install OpenBSD/arc onto an emulated harddisk image, follow these
901     instructions:
902    
903     <p>
904     <ol>
905     <li>Create an empty harddisk image, which will be the root disk
906     that OpenBSD installs itself onto:<pre>
907 dpavlin 12 <b>dd if=/dev/zero of=obsd_arc.img bs=1024 count=1 seek=700000</b>
908 dpavlin 2
909     </pre>
910     <li>Download the entire arc directory from the ftp server: (approx. 75 MB)<pre>
911 dpavlin 12 <b>wget -np -l 0 -r <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/">ftp://ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/</a></b>
912 dpavlin 2
913     </pre>
914    
915     <li>You now need to make an ISO image of the entire directory you downloaded.
916 dpavlin 10 (I recommend using <tt>mkisofs</tt> for that purpose. If you don't
917 dpavlin 6 already have <tt>mkisofs</tt> installed on your system, you need
918 dpavlin 10 to install it in order to do this.)<pre>
919 dpavlin 12 <b>mkisofs -o openbsd_arc_2.3.iso ftp.se.openbsd.org/pub/OpenBSD/</b>
920 dpavlin 2
921     </pre>
922     <li>Start the emulator using this command line:<pre>
923 dpavlin 12 <b>gxemul -e pica -X -A -d obsd_arc.img -d b:openbsd_arc_2.3.iso -j 2.3/arc/bsd.rd</b>
924 dpavlin 2
925     </pre>
926     and proceed like you would do if you were installing OpenBSD
927     on a real Acer PICA-61. (Answer 'no' when asked if you want to
928     configure networking, and then install from CD-ROM.)
929     </ol>
930    
931     <p>
932     Once the install has finished, the following command should let you
933     boot from the harddisk image:
934     <p>
935     <pre>
936 dpavlin 12 <b>gxemul -X -e pica -d obsd_arc.img ftp.se.openbsd.org/pub/OpenBSD/2.3/arc/bsd</b>
937 dpavlin 2
938     </pre>
939    
940    
941    
942    
943    
944    
945    
946     <p><br>
947     <a name="ultrixinstall"></a>
948 dpavlin 10 <h3>Ultrix/RISC:</h3>
949 dpavlin 2
950 dpavlin 4 Ultrix 4.x can run in GXemul on an emulated DECstation 5000/200.
951 dpavlin 10 (Ultrix was the native OS for these machines, but NetBSD/pmax is
952     also usable.)
953 dpavlin 2
954 dpavlin 4 <p>
955     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
956     <a href="20040504-ultrix45-boot1.png"><img src="20040504-ultrix45-boot1_small.gif"></a>
957     &nbsp;&nbsp;&nbsp;
958     <a href="ultrix4.5-20040706.png"><img src="ultrix4.5-20040706_small.gif"></a>
959    
960     <p>
961     The following instructions should let you install Ultrix onto a disk image:
962    
963 dpavlin 2 <ol>
964     <li>Create an empty harddisk image, which will be the root disk
965     that Ultrix installs itself onto:<pre>
966 dpavlin 12 <b>dd if=/dev/zero of=rootdisk.img bs=1024 count=1 seek=800000</b>
967 dpavlin 2
968     </pre>
969 dpavlin 6 <li>Place your Ultrix installation media in your CDROM drive.
970     (On FreeBSD and similar systems, it is called <tt>/dev/cd0c</tt>.
971     Replace that with the name of your CDROM drive, or the name of a
972     .iso image file.) Then, start the emulator like this:<pre>
973 dpavlin 12 <b>gxemul -X -A -M64 -e 3max -d rootdisk.img -d bc:/dev/cd0c -j vmunix</b>
974 dpavlin 2
975     </pre>
976     <li>Once the first stage of the installation is done (restoring the root
977     filesystem), you need to restart the emulator, booting from the
978     new rootdisk, to continue the installation process.
979 dpavlin 6 This is done by removing the bootflag ('<tt>b</tt>') from the second
980 dpavlin 2 diskimage argument:<pre>
981 dpavlin 12 <b>gxemul -X -A -M64 -e 3max -d rootdisk.img -d c:/dev/cd0c -j vmunix</b>
982 dpavlin 2
983     </pre>
984     </ol>
985    
986     <p>
987     When the installation is completed, the following command should start
988     Ultrix from the harddisk image:<pre>
989 dpavlin 12 <b>gxemul -X -A -M64 -e 3max -j vmunix -d rootdisk.img</b>
990 dpavlin 2 </pre>
991    
992 dpavlin 10 <p>Ultrix mostly seems to work with dynamic binary translation (which can
993     be disabled by the <b><tt>-B</tt></b> command line option). If you have a
994     very fast host machine, and use bintrans, you might experience a weird
995     timer related bug, which makes it impossible to logon to the system. It is
996     triggered when the emulation goes faster than any real DECstation machine
997     was capable of running. A temporary workaround is to add
998     <b><tt>-I33000000</tt></b> to fix the emulated clock speed to 33 million
999     instructions per emulated second. (When using <tt><b>-CR4400</b></tt>,
1000     <b><tt>-I16000000</tt></b> should be used instead.)
1001 dpavlin 2
1002     <p>
1003 dpavlin 6 You can experiment with adding <b><tt>-Z2</tt></b> (for emulating a
1004     dual-headed workstation) or even <b><tt>-Z3</tt></b> (tripple-headed), and
1005     also the <b><tt>-Y2</tt></b> option for scaling down the framebuffer
1006     windows by a factor 2x2.
1007     There is also a <b><tt>-z</tt></b> option for supplying names of X11
1008     displays to use. The following example starts Ultrix on an emulated
1009     tripple-headed workstation, on three different displays (<tt>remote1:0.0</tt>,
1010     <tt>localhost:0.0</tt>, and <tt>remote2:0.0</tt>), using no scaledown:<pre>
1011 dpavlin 12 <b>gxemul -M64 -N -e 3max -jgenvmunix -d rootdisk.img \
1012 dpavlin 6 -XZ3 -z remote1:0.0 -z localhost:0.0 -z remote2:0.0</b>
1013 dpavlin 2 </pre>
1014    
1015     <p>
1016 dpavlin 6 The photo below shows a single Ultrix session running tripple-headed in
1017     GXemul on an Alpha 21164PC, with displays on a Sun Ultra1 (to the left),
1018     on the Alpha itself (in the middle), and on an HP700/RX X-terminal (8-bit
1019     color depth, running off the Alpha) to the right.
1020    
1021     <p>
1022     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1023     <a href="20041209-ultrix-tripplehead.jpg"><img src="20041209-ultrix-tripplehead_small.jpg"></a>
1024    
1025     <p>
1026 dpavlin 2 The X11 displays may differ in bit depth and endianness. Unfortunately,
1027     there is no way yet to set the scaledown factor on a per-window basis, so
1028     the scaledown factor affects all windows.
1029    
1030     <p>
1031 dpavlin 6 (If you didn't use <tt><b>-Z<i>n</i></b></tt> during the installation, and
1032     compiled your own <tt>/vmunix</tt>, then it will not contain support for
1033     multiple graphics cards. To overcome this problem, use the generic kernel,
1034     <tt><b>-j genvmunix</b></tt>, whenever you are running the emulator with a
1035     different setup than the one you used when Ultrix was installed.)
1036 dpavlin 2
1037 dpavlin 4 <p>
1038     A note for the historically interested: OSF/1 for MIPS was quite similar
1039     to Ultrix, so that is possible to run as well. If you are unsuccessful
1040     in installing Ultrix or OSF/1 directly in the emulator, you can always
1041     install it on your real machine onto a real SCSI disk, and then copy the
1042 dpavlin 6 contents of that SCSI disk into a file (using <b><tt>dd(1)</tt></b>), and use
1043 dpavlin 4 that file as a disk image file in the emulator.
1044 dpavlin 2
1045    
1046    
1047    
1048    
1049    
1050     <p><br>
1051     <a name="sprite"></a>
1052 dpavlin 10 <h3>Sprite for DECstation:</h3>
1053 dpavlin 2
1054     Sprite was a research operating system at the University of Berkeley.
1055     The Unix Heritage Society (TUHS, <a href="http://www.tuhs.org">www.tuhs.org</a>)
1056     has made available a copy of a Sprite harddisk image for a DECstation 5000/200.
1057     If you want to find out more about Sprite in general, read
1058     <a href="http://www.cs.berkeley.edu/projects/sprite/retrospective.html">
1059     http://www.cs.berkeley.edu/projects/sprite/retrospective.html</a>.
1060    
1061     <p>
1062 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1063     <a href="20040711-sprite-1.png"><img src="20040711-sprite-1_small.png"></a>
1064     &nbsp;&nbsp;&nbsp;
1065     <a href="sprite-20040711.png"><img src="sprite-20040711_small.png"></a>
1066    
1067     <p>
1068 dpavlin 2 The following instructions should let you run Sprite in the emulator:
1069    
1070     <p>
1071     <ol>
1072 dpavlin 10 <li>Download the Sprite harddisk image:<pre>
1073     <a href="ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/ds5000.bt">ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/ds5000.bt</a>
1074 dpavlin 2 83973120 bytes, MD5 = ec84eeeb20fe77b758370d5e312e4a5e
1075    
1076     </pre>
1077     <li>Start the emulator with the following command line:<pre>
1078 dpavlin 12 <b>gxemul -X -e 3max -M128 -d ds5000.bt -j vmsprite -o ''</b>
1079 dpavlin 2
1080     </pre>
1081     </ol>
1082    
1083     <p>
1084     The first time you boot up with the disk image, you will be asked a number
1085     of questions regarding network settings. If you feel like entering correct
1086     values, then you should use the following:
1087     <p>
1088    
1089     <pre>
1090 dpavlin 10 Your machine's Ethernet address: 10:20:30:00:00:10
1091 dpavlin 2 Your machine's IP: 10.0.0.1
1092     Subnet mask: 0xff000000
1093     Gateway's Ethernet address: 60:50:40:30:20:10
1094     Gateway's IP: 10.0.0.254
1095     </pre>
1096    
1097     <p>
1098 dpavlin 10 Unfortunately, at the end of <a href="ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/boot.txt">ftp://ftp.es.embnet.org/pub/misc/TUHS/other_os/Sprite/boot.txt</a>,
1099     the following sad statement can be found:
1100 dpavlin 2 <pre>
1101     The bootable Sprite image is meant to be a demonstration of Sprite, not
1102     a robust Sprite system. There are several missing things, such as
1103     floating point and network support.
1104     </pre>
1105    
1106 dpavlin 10 <p>Once you are logged in as root, running <b><tt>xinit</tt></b> will
1107     start the X11 environment.
1108 dpavlin 2
1109    
1110    
1111    
1112    
1113 dpavlin 10
1114 dpavlin 2 <p><br>
1115     <a name="declinux"></a>
1116 dpavlin 10 <h3>Debian GNU/Linux for DECstation:</h3>
1117 dpavlin 2
1118 dpavlin 4 <font color="#ef0000">NOTE: This is experimental, and <i>extremely</i>
1119 dpavlin 2 unstable. During my tests, even pressing the wrong key during the install
1120 dpavlin 10 (for example the wrong cursor key) can cause a kernel Oops. My success
1121 dpavlin 12 rate is probably around 50%.</font>
1122 dpavlin 10
1123 dpavlin 12 <p><font color="#ef0000">I <i>think</i> this has to do with interrupts
1124     from the serial controller. Hopefully using the <tt><b>-U</b></tt> command
1125     line option will reduce the risk for such crashes. (I haven't had time to
1126     come up with a clean solution to this yet; it feels like a buffer overflow
1127     in Linux' serial driver for the 5000/200, but it is also likely that it is
1128     a bug in GXemul.)</font>
1129 dpavlin 2
1130 dpavlin 12 <p><font color="#ef0000">Everything runs extremely slow. Even if you have
1131     a very fast host machine, an install attempt can still take several hours!
1132     </font>
1133 dpavlin 10
1134 dpavlin 2 <p>
1135 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1136     <a href="20041212-debian_1.png"><img src="20041212-debian_1_small.gif"></a>
1137     &nbsp;&nbsp;&nbsp;
1138     <a href="20041212-debian_2.png"><img src="20041212-debian_2_small.gif"></a>
1139     &nbsp;&nbsp;&nbsp;
1140     <a href="20041213-debian_3.png"><img src="20041213-debian_3_small.gif"></a>
1141     &nbsp;&nbsp;&nbsp;
1142     <a href="20041213-debian_4.png"><img src="20041213-debian_4_small.gif"></a>
1143    
1144     <p>
1145 dpavlin 2 The following steps should let you install Debian GNU/Linux for DECstation
1146     onto a harddisk image:
1147    
1148     <p>
1149     <ol>
1150     <li>Create an empty harddisk image, which will be the root disk
1151     that Debian installs itself onto:<pre>
1152 dpavlin 12 <b>dd if=/dev/zero of=debian.img bs=1024 count=1 seek=3000000</b>
1153 dpavlin 2
1154     </pre>
1155     <li>Download an install kernel:<pre>
1156 dpavlin 12 <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/r3k-kn02/boot.img">http://ftp.egr.msu.edu/debian/dists/stable/main/</a>
1157     <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/r3k-kn02/boot.img">installer-mipsel/current/images/r3k-kn02/boot.img</a>
1158 dpavlin 2
1159     </pre>
1160     <p>
1161     <li>For a text-mode installation, start the emulator like this:<pre>
1162 dpavlin 12 <b>gxemul -e 3max -U -M64 -o 'console=ttyS3' -d debian.img -O boot.img</b>
1163 dpavlin 2
1164     </pre>
1165 dpavlin 10 (If you want to, you can try <b><tt>-X</tt></b> instead of
1166     <b><tt>-o 'console=ttyS3'</tt></b> on the command line. This will
1167     cause Linux to use the graphical framebuffer. Unfortunately, Linux
1168     does not seem to have a driver for the DZ11 keyboard controller yet,
1169     so you cannot interact with the system. You will see the penguin in
1170     the upper lefthand corner while booting, and nicely rendered Unicode
1171     characters, but that's about it.)
1172     <p>
1173     You need to enter some values during the installation procedure, for
1174     example network settings. The following should work:<pre>
1175     DHCP: No, choose "<b>Configure network manually</b>"
1176     IP address: <b>10.0.0.1</b>
1177     Netmask: <b>255.0.0.0</b>
1178     Gateway: <b>10.0.0.254</b>
1179     Name server addresses: <b>10.0.0.254</b>
1180 dpavlin 2 </pre>
1181     <li>Once the first phase of the install has finished, the following command
1182     should let you boot into Debian, and perform post-install
1183     configuration:<pre>
1184 dpavlin 12 <b>gxemul -e 3max -U -M64 -o 'console=ttyS3' -d debian.img</b>
1185 dpavlin 2
1186 dpavlin 10 </pre>Note: All these steps take a lot of time, so you will have plenty
1187     of time to drink lots of cups of coffee.
1188     <p>
1189     <li>It seems that there's a problem with getting a login prompt on serial
1190     console (at least when I've done test installs), so when the
1191     installation is finished and you're supposed to get a login prompt,
1192     you need to press CTRL-C and type <b><tt>quit</tt></b>, and then:
1193     download a normal kernel (<i>not</i> a RAMDISK kernel):<pre>
1194 dpavlin 12 <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02">http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/</a>
1195     <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02">current/images/cdrom/vmlinux-2.4.27-r3k-kn02</a>
1196 dpavlin 2
1197 dpavlin 10 </pre>and boot Debian using the following command line:<pre>
1198 dpavlin 12 <b>gxemul -e 3max -U -M64 -o \
1199 dpavlin 2 'console=ttyS3 root=/dev/sda1 rw init=/bin/sh' \
1200     -d debian.img vmlinux-2.4.27-r3k-kn02</b>
1201    
1202     </pre>
1203     You'll enter single-user mode. You need to add a line to
1204     /etc/inittab, to enable logins via serial console.<pre>
1205     sh-2.05b# <b>echo 'T3:23:respawn:/sbin/getty -L ttyS3 9600 vt100' >> /etc/inittab</b>
1206     sh-2.05b# <b>echo 'ttyS3' >> /etc/securetty</b>
1207     sh-2.05b# <b>sync; umount /</b>
1208 dpavlin 10 sh-2.05b# <b>halt</b>
1209 dpavlin 2 </pre>
1210     </ol>
1211    
1212     <p>
1213     The system should now be ready for everyday use.
1214    
1215     <p>
1216     Use this command to boot from the completely installed disk image:<pre>
1217 dpavlin 12 <b>gxemul -e 3max -U -M64 -o 'console=ttyS3' -d debian.img</b>
1218 dpavlin 2
1219     </pre>
1220    
1221     <p>
1222     [&nbsp;<font color="#ff0000">UPDATE 2005-01-19:</font>&nbsp;
1223     Kaj-Michael Lang noticed that the current CVS-version of
1224     <a href="http://www.linux-mips.org/">linux-mips</a> has
1225     support for keyboards now, on DECstation 5000/200, so it is
1226     possible to run Debian GNU/Linux with framebuffer/keyboard.
1227 dpavlin 6 (Add <b><tt>-X</tt></b> (or <b><tt>-XY2</tt></b>) and remove the
1228     <b><tt>console=ttyS3</tt></b> option.) He has made a kernel available here:
1229 dpavlin 12 <a href="http://home.tal.org/~milang/o2/kernels/">http://home.tal.org/~milang/o2/kernels</a>/<a href="http://home.tal.org/~milang/o2/kernels/vmlinux-2.4.29-rc2-r3k-mipsel-decstation">vmlinux-2.4.29-rc2-r3k-mipsel-decstation</a>
1230 dpavlin 2 It has other problems (ethernet doesn't seem to work, for
1231     example), but at least it doesn't Oops that often.&nbsp;]
1232    
1233    
1234    
1235    
1236    
1237    
1238     <p><br>
1239     <a name="declinuxredhat"></a>
1240 dpavlin 10 <h3>Redhat Linux for DECstation:</h3>
1241 dpavlin 2
1242     <font color="#ff0000">NOTE: This is experimental, and <i>extremely</i>
1243 dpavlin 6 unstable. Read the note about <b><tt>-U</tt></b> in the section on how to
1244     install Debian.
1245 dpavlin 2 </font>
1246    
1247 dpavlin 4 <p>
1248     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1249     <a href="20041129-redhat_mips.png"><img src="20041129-redhat_mips_small.png"></a>
1250 dpavlin 2
1251     <p>
1252     The following steps should let you run Redhat Linux for DECstation in GXemul:
1253    
1254     <p>
1255     <ol>
1256     <li>Download a kernel. This is a Debian kernel, but it works fine:<pre>
1257 dpavlin 12 <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02">http://ftp.egr.msu.edu/debian/dists/stable/main/</a>
1258     <a href="http://ftp.egr.msu.edu/debian/dists/stable/main/installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02">installer-mipsel/current/images/cdrom/vmlinux-2.4.27-r3k-kn02</a>
1259 dpavlin 2
1260     </pre>
1261     <li>Download a root filesystem tree:<pre>
1262     <a href="ftp://ftp.uni-wuppertal.de/pub/linux/mips/mipsel-linux/root/mipsel-root-20011216.tgz">ftp://ftp.uni-wuppertal.de/pub/linux/mips/</a>
1263     <a href="ftp://ftp.uni-wuppertal.de/pub/linux/mips/mipsel-linux/root/mipsel-root-20011216.tgz">mipsel-linux/root/mipsel-root-20011216.tgz</a>
1264     19486676 bytes, md5 = 5bcb725c90209479cd7ead8ad0c4a414
1265    
1266     </pre>
1267     <li>This is the tricky part: Create an ext2 filesystem image called redhat.img using
1268     the filesystem tree you just downloaded. The disk image should have a MS-DOS
1269     partition table (!), and then one or more ext2 partitions.
1270     (Use loopback mount, or similar. This is probably easiest to do on a Linux host.)
1271     However, in order to actually boot the system you need to modify /etc/fstab.
1272     Change<pre>
1273     /dev/root / nfs defaults 1 1
1274     #/dev/sdc1 / ext2 defaults 1 1
1275     none /proc proc defaults 0 0
1276     none /dev/pts devpts mode=0622 0 0
1277    
1278     </pre>to<pre>
1279     #/dev/root / nfs defaults 1 1
1280     /dev/sda1 / ext2 defaults 1 1
1281     none /proc proc defaults 0 0
1282     none /dev/pts devpts mode=0622 0 0
1283    
1284     </pre>(Note sda1 instead of sdc1.)
1285     <p>
1286     <li>To boot Linux, start the emulator like this:<pre>
1287 dpavlin 12 <b>gxemul -e 3max -U -M128 -o \
1288 dpavlin 2 "console=ttyS3 root=/dev/sda1 ro" -d redhat.img vmlinux-2.4.27-r3k-kn02</b>
1289    
1290     </pre>
1291     </ol>
1292    
1293     <p>
1294     If you need to boot into single user mode, try the following:<pre>
1295 dpavlin 12 <b>gxemul -e 3max -U -o "console=ttyS3 root=/dev/sda1 rw init=/bin/sh" \
1296 dpavlin 2 -d redhat.img vmlinux-2.4.27-r3k-kn02</b>
1297    
1298     </pre>
1299    
1300 dpavlin 10 <p>Redhat Linux on DECstation in R3000 mode should work fine with dynamic
1301     binary translation, but if things are buggy, it can be disabled by
1302     using the <b><tt>-B</tt></b> command line option.
1303 dpavlin 2
1304     <p>
1305     NOTE: You can add <b>-X</b> and remove <b>console=ttyS3</b> from the command
1306     line, if you want to use a graphical framebuffer. Unfortunately, Linux
1307     doesn't have support for keyboards on DECstation 5000/200 yet, so you cannot
1308     actually interact with the sytem. :-(
1309    
1310     <p>
1311     [&nbsp;<font color="#ff0000">UPDATE 2005-01-22:</font>&nbsp;
1312     Read the 2005-01-19 update in the Debian section above, and then, if
1313     you do not need ethernet support, try Kaj-Michael Lang's kernel compiled
1314     from <a href="http://www.linux-mips.org/">linux-mips</a>' CVS.
1315     <a href="http://home.tal.org/~milang/o2/patches/vmlinux-2.4.29-rc2-r3k-mipsel-decstation">
1316     http://home.tal.org/~milang/o2/patches/vmlinux-2.4.29-rc2-r3k-mipsel-decstation</a>
1317     It should work with framebuffer/keyboard.&nbsp;]
1318    
1319    
1320    
1321    
1322    
1323    
1324     <p><br>
1325 dpavlin 10 <hr>
1326    
1327    
1328    
1329    
1330    
1331    
1332    
1333     <p><br>
1334 dpavlin 2 <a name="mach"></a>
1335 dpavlin 10 <h3>Mach/PMAX:</h3>
1336 dpavlin 2
1337     Read the following link if you want to know more about Mach in general:
1338     <a href="http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html">
1339     http://www-2.cs.cmu.edu/afs/cs/project/mach/public/www/mach.html</a>
1340    
1341     <p>
1342     <font color="#ff0000">NOTE: Mach for DECstation requires some files
1343     (called 'startup' and 'emulator') which I haven't been able to find
1344     on the web. Without these, Mach will not get very far. These
1345     installation instructions are preliminary.
1346     </font>
1347    
1348     <p>
1349 dpavlin 4 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1350     <a href="20041018-mach_pmax.png"><img src="20041018-mach_pmax_small.png"></a>
1351    
1352     <p>
1353 dpavlin 2 The following steps should let you experiment with running Mach
1354     for DECstation in the emulator:
1355    
1356     <p>
1357     <ol>
1358     <li>Compile gxemul with cache emulation: (<b>NOTE: --enable-caches</b>)<pre>
1359 dpavlin 12 <b>./configure --enable-caches; make</b>
1360 dpavlin 2
1361     </pre>
1362     <li>Download the pmax binary distribution for Mach 3.0:<pre>
1363 dpavlin 12 <a href="http://lost-contact.mit.edu/afs/athena/user/d/a/daveg/Info/Links/Mach/src/release/pmax.tar.Z">http://lost-contact.mit.edu/afs/athena/user/d/a/</a>
1364     <a href="http://lost-contact.mit.edu/afs/athena/user/d/a/daveg/Info/Links/Mach/src/release/pmax.tar.Z">daveg/Info/Links/Mach/src/release/pmax.tar.Z</a>
1365 dpavlin 2 7263343 bytes, md5 = f9d76c240a6e169921a1df99ad560cc0
1366    
1367     </pre>
1368     <li>Extract the Mach kernel:<pre>
1369 dpavlin 12 <b>tar xfvz pmax.tar.Z pmax_mach/special/mach.boot.MK83.STD+ANY</b>
1370 dpavlin 2
1371     </pre>
1372     <li>Create an empty disk image:<pre>
1373 dpavlin 12 <b>dd if=/dev/zero of=disk.img bs=1 count=512 seek=400000000</b>
1374 dpavlin 2
1375     </pre>
1376     <li>Load the contents of pmax.tar.Z onto the disk image. This is
1377     complicated, and should be described in more detail some time.
1378     For now, use your imagination. (For example using OpenBSD/pmax:
1379     <i>disklabel -E rz1; newfs -O /dev/rz1a;
1380     mount /dev/rz1a /mnt; cd /mnt; download pmax.tar.Z using ftp;
1381     tar xzvf pmax.tar.Z; mv pmax_mach/* .; rmdir pmax_mach;
1382     mkdir mach_servers;
1383     cd mach_servers;
1384     cp ../etc/mach_init .;
1385     cp ../tests/test_service startup;
1386     dd if=/dev/zero of=paging_file bs=65536 count=400;
1387     cd /; sync; umount /mnt</i>)
1388     <p>
1389     <li>Start the emulator with the following command:<pre>
1390 dpavlin 12 <b>gxemul -e 3max -X -d disk.img \
1391 dpavlin 2 pmax_mach/special/mach.boot.MK83.STD+ANY</b>
1392    
1393     </pre>
1394     </ol>
1395    
1396    
1397    
1398    
1399    
1400    
1401    
1402 dpavlin 10 <p><br>
1403     <a name="openbsdsgiinstall"></a>
1404     <h3>OpenBSD/sgi:</h3>
1405 dpavlin 2
1406 dpavlin 10 <a href="http://www.openbsd.org/sgi.html">OpenBSD/sgi</a>
1407     can (almost) run in GXemul on an emulated O2 (SGI-IP32) with root on nfs.
1408    
1409     <p>
1410     &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1411     <a href="20050617-openbsd-sgi.png"><img src="20050617-openbsd-sgi_small.png"></a>
1412    
1413     <p><font color="#ff0000">NOTE: I haven't succeeded all the way with
1414     this yet, and this shows/triggers many bugs in the emulator, but some of
1415     it works.</font>
1416    
1417     <p>GXemul does not yet emulate the AHC PCI SCSI controller in the O2. (I have
1418     mailed Adaptec several times, asking for documentation, but never received
1419 dpavlin 12 any reply.) OpenBSD/sgi can still run in the emulator, as long as it doesn't
1420     use SCSI. For a simple test with the ramdisk (install) kernel, try dowloading<pre>
1421 dpavlin 10 <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd</a>
1422    
1423 dpavlin 12 </pre>and run <b><tt>gxemul -e o2 bsd.rd</tt></b>.
1424 dpavlin 10
1425     <p>It might also be possible to netboot. Another emulated machine must
1426     then be used as the nfs root server, and the emulated O2 machine must boot
1427 dpavlin 12 as a <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=diskless&amp;manpath=OpenBSD+Current&amp;format=html">diskless</a>
1428 dpavlin 10 client. Performing this setup is quite time consuming, but necessary:
1429    
1430     <p>
1431     <ol>
1432     <li>First of all, the "<tt>nfs server</tt>" machine must be set up.
1433     This needs to have a 800 MB <tt>/tftpboot</tt> partition.
1434 dpavlin 12 <a href="#netbsdinstall">Install NetBSD/pmax 2.0.2 from CDROM</a>.
1435     (Don't forget to add the extra partition!)
1436 dpavlin 10 <p>
1437     <li>Configure the nfs server machine to act as an nfs server.
1438     Start up the emulated DECstation:<pre>
1439 dpavlin 12 <b>gxemul -e 3max -A -d nbsd_pmax.img</b>
1440 dpavlin 10 </pre>and enter the following commands as <tt>root</tt>
1441     inside the emulator:
1442     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1443     <b>echo hostname=server &gt;&gt; /etc/rc.conf
1444     echo ifconfig_le0=\"inet 10.0.0.2\" &gt;&gt; /etc/rc.conf
1445     echo nameserver 10.0.0.254 &gt;&gt; /etc/resolv.conf
1446     echo 10.0.0.254 &gt; /etc/mygate
1447     echo /tftpboot -maproot=root 10.0.0.1 &gt; /etc/exports
1448     echo rpcbind=YES &gt;&gt; /etc/rc.conf
1449     echo nfs_server=YES &gt;&gt; /etc/rc.conf
1450     echo mountd=YES &gt;&gt; /etc/rc.conf
1451     echo bootparamd=YES &gt;&gt; /etc/rc.conf
1452     printf "client root=10.0.0.2:/tftpboot \\\n swap=10.0.0.2:/tftpboot/swap\n" &gt; /etc/bootparams
1453     echo "10:20:30:00:00:10 client" &gt; /etc/ethers
1454     echo 10.0.0.1 client &gt; /etc/hosts
1455     reboot</b>
1456     </pre></td></tr></table>
1457 dpavlin 12 <li>Start the DECstation emulation again, and enter the following
1458     commands to download the OpenBSD/sgi distribution:<br>(NOTE: This
1459 dpavlin 10 takes quite some time, even if you have a fast network connection.)
1460     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1461     <b>cd /tftpboot; ftp -i ftp.se.openbsd.org</b>
1462     (log in as anonymous...)
1463     <b>cd pub/OpenBSD/3.7/sgi
1464 dpavlin 12 mget b*tgz c* e* g* m*
1465 dpavlin 10 quit
1466     sh
1467     for a in *.tgz; do echo $a; tar zxfp $a; done
1468     echo 10.0.0.2:/tftpboot / nfs rw 0 0 &gt; /tftpboot/etc/fstab
1469 dpavlin 12 rm *.tgz
1470 dpavlin 10 dd if=/dev/zero of=swap bs=1024 count=32768
1471     halt</b>
1472     </pre></td></tr></table>
1473     <li>Download the OpenBSD/sgi GENERIC and RAMDISK kernels:<pre>
1474     <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd</a>
1475     MD5 (bsd) = f16eaf3dcbd51876db7c25f70e6d8a08
1476     <a href="ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd">ftp://ftp.se.openbsd.org/pub/OpenBSD/3.7/sgi/bsd.rd</a>
1477     MD5 (bsd.rd) = 4843e6139d8dd04b03d5f0e33e9a4f7b
1478    
1479     </pre>
1480     <li>Create a configuration file called <tt>config_client</tt>:
1481     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1482     <font color="#2020cf">!!gxemul
1483     !
1484     ! Configuration file for running OpenBSD/sgi diskless with
1485     ! a NetBSD/pmax machine as the nfs server.
1486     !
1487     ! This config file is for the client.</font>
1488    
1489     <b>emul(
1490     net(
1491 dpavlin 12 add_remote("localhost:12444") </b>! the server<b>
1492 dpavlin 10 local_port(12445) </b>! the client<b>
1493     )
1494    
1495     machine(
1496     name("client machine")
1497     serial_nr(1)
1498    
1499     type("sgi")
1500     subtype("o2")
1501    
1502     </b>! load("bsd")<b>
1503     load("bsd.rd")
1504     )
1505     )</b>
1506     </pre></td></tr></table>
1507     ... and another configuration file for the server,
1508     <tt>config_server</tt>:
1509     <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1510     <font color="#2020cf">!!gxemul</font>
1511     <b>emul(
1512     net(
1513     local_port(12444) </b>! the server<b>
1514 dpavlin 12 add_remote("localhost:12445") </b>! the client<b>
1515 dpavlin 10 )
1516    
1517     machine(
1518     name("nfs server")
1519     serial_nr(2)
1520    
1521     type("dec")
1522     subtype("5000/200")
1523    
1524     disk("nbsd_pmax.img")
1525     )
1526     )</b>
1527     </pre></td></tr></table>
1528     <li>Boot the "<tt>nfs server</tt>" and the OpenBSD/sgi
1529     "<tt>client machine</tt>" as two separate emulator instances:<pre>
1530     in one xterm:
1531 dpavlin 12 <b>gxemul @config_server</b>
1532 dpavlin 10
1533     and then, in another xterm:
1534 dpavlin 12 <b>gxemul @config_client</b>
1535 dpavlin 10
1536     </pre>
1537 dpavlin 12 <li>In the OpenBSD/sgi window, choose "<tt>s</tt>" (for Shell), and type:
1538 dpavlin 10 <table border="0"><tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td><pre>
1539     <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254
1540     mount -v 10.0.0.2:/tftpboot /mnt
1541     cd /mnt/dev; ./MAKEDEV all; cd /; umount /mnt
1542     halt</b>
1543     </pre></td></tr></table>
1544 dpavlin 12 You might want to log in as <tt>root</tt> on the server machine, and
1545     run <tt>tcpdump -lnvv</tt> or similar, to see that what the client
1546     machine actually does on the network. The <tt>MAKEDEV</tt> script
1547     takes almost forever, so be patient.
1548 dpavlin 10 </ol>
1549    
1550    
1551     <p><font color="#ff0000">NOTE: Everything up to this point should work.
1552     However, the next step (in gray) doesn't actually work:</font>
1553    
1554     <p><font color="#888888">Once everything has been set up correctly, change
1555     <tt>bsd.rd</tt> in <tt>config_client</tt> to just <tt>bsd</tt> (the GENERIC
1556     kernel). It should now be possible to boot OpenBSD/sgi using the NetBSD/pmax
1557     nfs server. (When asked for "<tt>root device :</tt>" on the OpenBSD machine,
1558     enter <tt><b>mec0</b></tt>.)</font>
1559    
1560     <p><font color="#ff0000">But it doesn't work. Probably because GXemul's
1561     implementation of the mec (ethernet card used in the O2) is too much of
1562     a quick hack. For now, use the <tt>bsd.rd</tt> kernel, and (at every
1563     boot) type:</font><pre>
1564     <b>s</b> (for Shell)
1565     <b>ifconfig mec0 10.0.0.1; route add default 10.0.0.254</b>
1566     <b>mount -v 10.0.0.2:/tftpboot /mnt</b>
1567     <b>cd /mnt; usr/sbin/chroot .</b>
1568     <b>sh etc/rc</b>
1569     </pre>
1570    
1571     <p><font color="#ff0000">This will not cause OpenBSD to be booted
1572     normally, but at least a few basic things will work.
1573     By the way, the emulator performs so poorly, that you will have time to
1574     fetch several cups of coffee for each of the steps above.</font>
1575    
1576    
1577    
1578    
1579    
1580    
1581    
1582    
1583 dpavlin 2 </p>
1584    
1585     </body>
1586     </html>

  ViewVC Help
Powered by ViewVC 1.1.26