|
|
1.1.1.2 root 1: <!--
2: nono
3: Copyright (C) 2020 nono project
4: Licensed under nono-license.txt
5: -->
1.1 root 6: <html><head>
7: <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8: <title>nono document</title>
9: <style type="text/css">
10: /* https://jfly.uni-koeln.de/colorset/ */
11:
12: :root {
13: --blue: rgb( 0, 90, 255);
14: --brown: rgb(128, 64, 0);
15: --green: rgb( 3, 175, 122);
16: --grey: rgb(132, 145, 158);
1.1.1.9 ! root 17: --light-pink: rgb(255, 202, 191);
1.1 root 18: --light-grey: rgb(200, 200, 203);
1.1.1.4 root 19:
20: --bg-grey: rgb(220, 220, 223);
1.1 root 21: }
22: body {
1.1.1.4 root 23: background-color: var(--bg-grey);
1.1 root 24: }
25: q {
26: color: var(--brown);
27: }
28: q:before {
29: content: "[";
30: }
31: q:after {
32: content: "]";
33: }
34: dt.dt-indent {
35: padding-left: 1ex;
36: }
37: .main {
38: margin-left: 1em;
39: }
40: .cons {
41: background-color: black;
42: color: white;
43: }
44: .file {
45: background-color: white;
46: color: black;
47: }
48: .strike {
49: color: var(--grey);
50: }
1.1.1.5 root 51: .strike > q {
52: color: var(--grey);
53: }
1.1 root 54: </style>
55: </head>
56: <body>
1.1.1.9 ! root 57: <h3>nono 0.2.0 (2021/06/20)</h3>
1.1 root 58:
1.1.1.9 ! root 59: nono は NetBSD とかで動作する OMRON LUNA-I や LUNA88K とかのエミュレータです。
! 60: <q>nono is OMRON LUNA-I and LUNA88K emulator runs on NetBSD and etc.</q>
! 61:
! 62: <hr>
! 63:
! 64: <h4>Index of this page:</h4>
1.1.1.8 root 65: <div class="main">
1.1.1.9 ! root 66: <a href="#migrate">ver 0.1.x から ver 0.2.0 への移行方法 <q>How to migrate from ver 0.1.x to ver 0.2.0</q></a><br>
1.1.1.8 root 67: <a href="#build">ビルド方法 <q>How to build</q></a><br>
68: <a href="#commandline">コマンドラインオプション <q>Command Line Option</q></a><br>
69: <a href="#configuration">設定 <q>Configuration</q></a><br>
70: <a href="#aboutvm">VM について <q>About VM</q></a><br>
71: <a href="#tryit">実行してみる <q>Try it</q></a><br>
1.1.1.9 ! root 72: <a href="#network">ネットワーク設定例 <q>Example of network setup</q></a><br>
1.1.1.8 root 73: <a href="#changes">変更履歴 <q>Changes</q></a><br>
74: <a href="#license">連絡先、ライセンス等 <q>Contact, License, etc</q></a><br>
75: </div>
1.1.1.4 root 76:
1.1.1.9 ! root 77: <a name="migrate"></a>
! 78: <h4>ver 0.1.x から ver 0.2.0 への移行方法 <q>How to migrate from ver 0.1.x to ver 0.2.0</q></h4>
1.1.1.4 root 79: <div class="main">
1.1.1.9 ! root 80: ver 0.1.x と ver 0.2.0 には2つの非互換があり、そのままでは以前と同じ動作はしません。
! 81: <q>There are two incompatibilities between ver 0.1.x and ver 0.2.0,
! 82: so it will not work the same as before.</q>
1.1.1.4 root 83:
1.1.1.9 ! root 84: <dl>
! 85: <dt>1. 設定ファイルのネットワーク関連項目の変更
! 86: <q>Configuration changes about network</q>
! 87: <dd>ver 0.1.x の以下の2つの設定項目は廃止になりました。
! 88: <q>These two items in 0.1.x have been removed.</q>
! 89: <br>
! 90: <blockquote style="background-color: var(--light-pink);"><pre>
! 91: ethernet-hostdriver = (default: none)
! 92: ethernet-hostdevice = (default: auto)
! 93: </pre></blockquote>
! 94: 代わりに次の5つが追加されています。
! 95: 設定方法は<a href="#configuration">このドキュメントの設定の章</a>を参照してください。
! 96: ホストドライバは以前はデフォルトでオフでしたがデフォルトでオン(auto)に変更になっています。
! 97: <q>Instead, the following five items have been added.
! 98: See <a href="#configuration">Configuration section in this document</a>
! 99: to setup.
! 100: The host driver used to be disabled by default before,
! 101: but now it is enabled(auto) by default.</q>
! 102: <blockquote style="background-color: white;"><pre>
! 103: hostnet-driver = (default: auto)
! 104: hostnet-afpacket-ifname = (default: auto)
! 105: hostnet-bpf-ifname = (defualt: auto)
! 106: hostnet-tap-devpath = (default: auto)
! 107: hostnet-fallback = (default: 0)
! 108: </pre></blockquote>
! 109: </dd>
! 110:
! 111: <dt>2. LUNA88K の NVRAM サポートについて <q>About NVRAM in LUNA88K</q>
! 112: <dd>
! 113: LUNA88K では本来 PROM が NVRAM の情報を元に起動先を決定しますが、
! 114: nono ver 0.1.x は NVRAM を (ファイルを作るだけで) 一切サポートしておらず、
! 115: OpenBSD/luna88k を起動するために起動先ファイル名を boot と決め打ちしていました。
! 116: ver 0.2.0 で NVRAM をサポートしたため、
! 117: 内蔵互換 ROM で起動するとまず NVRAM がチェックサム不正のため初期化されます。
! 118: 更に初期化された NVRAM の起動ファイル名は vmunix であるため、
! 119: そのままでは OpenBSD/luna88k を起動できません。
! 120: Emulated ROM Monitor が起動したら以下のように入力してください。
! 121: <q>On LUNA88K, originally PROM determines the boot target by referring NVRAM.
! 122: Since nono ver 0.1.x didn't support NVRAM (though it created NVRAM.DAT file),
! 123: it used hard-coded boot filename "boot" in order to boot OpenBSD/luna88k.
! 124: nono ver 0.2.0 supports NVRAM, so at first it initializes the NVRAM
! 125: due to checksum mismatch.
! 126: In addition, the boot filename in the initialized NVRAM is "vmunix",
! 127: so it cannot boot OpenBSD/luna88k.
! 128: To boot it, enter as following on Emulated ROM Monitor.</q>
! 129: <blockquote><pre>
! 130: nvram boot_filename boot[Enter]
! 131: y
! 132: b[Enter]
! 133: </pre></blockquote>
! 134: この内容は NVRAM.DAT に記録されるので次回以降は直接 OpenBSD が起動します。
! 135: <q>The information you have just entered is recorded in the NVRAM,
! 136: so next time it boots OpenBSD automatically.</q>
! 137: </div>
1.1.1.8 root 138:
139: <a name="build"></a>
1.1 root 140: <h4>ビルド方法 <q>How to build</q></h4>
141: <div class="main">
1.1.1.5 root 142: ビルドには以下が必要です。
1.1.1.7 root 143: NetBSD(pkgsrc) なら wxWidgets は pkgsrc/x11/wxGTK30 です
1.1.1.8 root 144: (OPTIONS:gtk3 で動作確認しています)。
1.1.1.5 root 145: <q>The followings are required for build.
146: If you use NetBSD(pkgsrc),
1.1.1.8 root 147: wxWidgets is pkgsrc/x11/wxGTK30 (OPTIONS:gtk3 is tested).</q>
1.1.1.5 root 148:
1.1 root 149: <ul>
1.1.1.2 root 150: <li>make (BSD make, not GNU make)
1.1.1.4 root 151: <li>C/C++ compiler which supports -std=c++14.
152: <br>
153: (For gcc, 7.4 works but 5.5 doesn't work, at least.
154: For clang, 7.0 and 8.0 works at least.)
1.1.1.2 root 155: <li>wxWidgets >= 3.0
156: <li>gettext
1.1 root 157: </ul>
1.1.1.2 root 158:
1.1.1.5 root 159: <p>
160: (NetBSD 以外でのビルドはサポートしていませんが)
161: Ubuntu 18.04 ではたぶん以下のパッケージが必要です。
162: <q>You may need the following packages on Ubuntu 18.04
163: (though we won't support non-NetBSD platform).</q>
164: </p>
1.1.1.8 root 165: <ul>
166: <li>
1.1.1.5 root 167: bmake
168: build-essential
169: gettext
170: libbsd-dev
171: libedit-dev
172: libkqueue-dev
173: libwxgtk3.0-dev
174: zlib1g-dev
1.1.1.8 root 175: </ul>
1.1.1.5 root 176:
1.1.1.2 root 177: <p>
1.1.1.9 ! root 178: nono のソースアーカイブを展開したら以下のようにビルドします。
1.1.1.2 root 179: configure には環境変数 CC、CXX でコンパイラを指定することが出来ます。
180: また wx-config が標準的な名前で提供されていないために見付けられない場合には
181: 環境変数 WX_CONFIG にパスを指定することが出来ます。
1.1.1.9 ! root 182: <q>Extract the nono's source archive and build as following.
1.1.1.2 root 183: You can specify C/C++ compiler using environment variable CC and CXX
184: if configure cannot find standard name suitable compiler.
185: Also, you can specify wx-config path using environment variable WX_CONFIG
186: if configure cannot find wx-config.</q>
1.1 root 187: <blockquote class="cons"><pre>
188: % ./configure
189: % make depend
190: % make
1.1.1.2 root 191: % su
192: # make install
1.1 root 193: </pre></blockquote>
1.1.1.2 root 194:
195: <p>
196: 2つの実行ファイルがインストールされます。
197: <tt>nono</tt> が GUI 版実行ファイル、
198: <tt>nono-cli</tt> がコマンドライン版です。
199: <q>Two executables will be installed.
1.1.1.8 root 200: <tt>nono</tt> is the GUI executable and <tt>nono-cli</tt> is
201: the command line executable.</q>
1.1 root 202:
203: </div>
204:
205:
1.1.1.8 root 206: <a name="commandline"></a>
1.1 root 207: <h4>コマンドラインオプション <q>Command Line Option</q></h4>
208: <div class="main">
209: <dl>
210: <dt class=dt-indent><tt>-A <i>file</i></tt></dt>
211: <dd>ホストの <tt><i>file</i></tt> をロードして実行します。
1.1.1.4 root 212: <tt><i>file</i></tt> が相対パスの場合カレントディレクトリからのパスになります。
1.1 root 213: ファイルが gzip 圧縮されていれば自動的に展開します。
214: (展開後の) ファイル形式は a.out (OMAGIC) か ELF で、
215: 実際にはブートローダとカーネル程度しか想定していません。
1.1.1.2 root 216: 設定ファイルの <tt>prom-image</tt> とともに指定されると
217: <tt>-A</tt> のほうが優先します。
218: <q>Loads and executes host's <tt><i>file</i></tt>.
1.1.1.4 root 219: If <tt><i>file</i></tt> is relative path,
220: it is path from the current directory.
1.1.1.2 root 221: If the file is gzip'd, it is automatically extracted.
222: The supported file format (after extracting) is a.out (OMAGIC) or ELF.
223: Actually, it only assumes bootloaders or kernels.
224: If this option is specified at the same time as
225: <tt>prom-image</tt> in configuration file,
226: this option preceeds.
227: </q></p></dd>
1.1.1.7 root 228: <dt class=dt-indent><tt>-c <i>vmpath</i></tt></dt>
229: <dd>VM ディレクトリ/設定ファイルを指定します。
230: <i>vmpath</i> がディレクトリならそのディレクトリの中の nono.cfg
231: を設定ファイルとします。
232: <i>vmpath</i> がファイルならそれを設定ファイルとします。
233: そしていずれの場合も
234: 設定ファイルがあるディレクトリを VM ディレクトリとします。
235: -c オプションを省略すると <i>vmpath</i> をカレントディレクトリとします。
236: <q>Specifies the VM directory/configuration file.
237: If <i>vmpath</i> is a directory,
238: make nono.cfg in that directory a configuration file.
239: Or if <i>vmpath</i> is a file,
240: make the specified file a configuration file.
241: And in both cases,
242: make the directory where that file is located a VM directory.
243: If <tt>-c</tt> option is omitted,
244: <i>vmpath</i> is considered as the current directory.
245: </q></p></dd>
1.1 root 246: <dt class=dt-indent><tt>-f</tt></dt>
247: <dd>高速モードで起動します。
1.1.1.2 root 248: GUI なら起動後にもメニューから変更できますが、その初期値を変えるだけです。
249: <q>Boot as the fast mode.
250: You can change this mode on GUI menu after boot,
251: and the option only changes its initial state.
252: </q></p></dd>
1.1 root 253: <dt class=dt-indent><tt>--fontsize <i>height</i></tt></dt>
254: <dd>GUI 版のみ。
255: 全サブウインドウの起動時のフォントサイズを指定します。
1.1.1.2 root 256: <tt><i>height</i></tt> には 12, 16
257: のいずれかを指定します。デフォルトは <tt>12</tt> です。
1.1.1.3 root 258: 起動後にメニューから変更できます。
1.1.1.2 root 259: <q>
260: GUI Only.
261: Specifies the initial fontsize on all sub windows.
262: <tt><i>height</i></tt> is one of 12 or 16.
1.1.1.3 root 263: The default value is <tt>12</tt>.
264: You can change this value on GUI menu after boot.
1.1.1.2 root 265: </q></p></dd>
1.1 root 266: <dt class=dt-indent><tt>-s <i>scale</i></tt></dt>
267: <dt class=dt-indent><tt>--scale <i>scale</i></tt></dt>
268: <dd>GUI 版のみ。
269: メインウィンドウの起動時のスケールを実数で指定します。
270: 起動後にもメニューからプリセットされた倍率には変更可能ですが、
271: 任意倍率は起動時のみ指定可能です
272: <span class=strike>(そのうちなんとかしたい)</span>。
1.1.1.2 root 273: デフォルトは 1.0 です。
274: <q>
275: GUI Only.
276: Specifies the initial main window scale in real number.
277: You can change this scale on GUI menu after boot,
278: but unlike this option, there are only a few preset choices
279: <span class=strike>(Should be improved in someday)</span>.
280: The default value is 1.0</q></p></dd>
1.1 root 281: <dt class=dt-indent><tt>--show-config</tt></dt>
1.1.1.2 root 282: <dd>設定ファイルと <tt>-V</tt> オプションを読み込んだ結果を表示します。
283: <q>Shows the result of reading configuration file and
284: parsing <tt>-V</tt> options.</q></p></dd>
1.1 root 285: <dt class=dt-indent><tt>-v</tt></dt>
1.1.1.2 root 286: <dd>バージョンを表示します。
287: <q>Shows the version.</q></p></dd>
1.1 root 288: <dt class=dt-indent><tt>-V <i>name</i>=<i>value</i></tt></dt>
1.1.1.3 root 289: <dd>設定ファイルで指定した <tt><i>name</i>=<i>configvalue</i></tt> の代わりに
1.1.1.2 root 290: このオプションの <tt><i>name</i>=<i>value</i></tt> を適用します。
1.1.1.3 root 291: <q>Use this <i>name</i>=<i>value</i>
292: instead of <i>name</i>=<i>configvalue</i> specified in configuration file.
1.1.1.2 root 293: </q></p></dd>
1.1 root 294: </dl>
295:
1.1.1.2 root 296: 以下開発用。<q>For developers:</q>
1.1 root 297: <dl>
1.1.1.3 root 298: <dt class=dt-indent><tt>-b <i>hexaddr</i>[,<i>skipcount</i>]</tt></dt>
1.1 root 299: <dd>デバッガのブレークポイントを 16進数で指定します。</dd>
300: <dt class=dt-indent><tt>-C</tt></dt>
301: <dd>ログをコンソールにも出力します。
302: 通常はログウィンドウにだけ出力されます。</dd>
303: <dt class=dt-indent><tt>-d</tt></dt>
304: <dd>起動時にデバッガプロンプトで停止します。</dd>
305: <dt class=dt-indent><tt>-D</tt></dt>
306: <dd>コンソールをデバッガとして使用します。
307: -d を指定しなくても起動時にプロンプトで停止します
308: <span class=strike>(そのうちなんとかしたい)</span>。</dd>
309: <dt class=dt-indent><tt>-L <i>name1</i>=<i>level1</i>[,<i>name2</i>=<i>level2</i>,...]</tt></dt>
310: <dd>ログレベルを指定します。
311: カンマで区切って複数指定することも出来ます。
312: <tt>-Lhelp</tt> で name の一覧を表示します。</dd>
313: <dt class=dt-indent><tt>-M <i>name</i>[,<i>name2</i>,...]</tt></dt>
314: <dd>起動時に表示するモニタウィンドウを指定します。
1.1.1.3 root 315: カンマで区切って複数指定することも出来ます。
316: <tt>-Mhelp</tt> で name の一覧を表示します。</dd>
1.1 root 317: </dl>
318: </div>
319:
1.1.1.8 root 320:
321: <a name="configuration"></a>
1.1 root 322: <h4>設定 <q>Configuration</q></h4>
323: <div class="main">
1.1.1.7 root 324: VM の設定ファイルはその VM ディレクトリ内の nono.cfg
325: (または -c で指定したファイル) です。
1.1 root 326: 書式は <tt>key = value</tt> 形式で1行1項目ずつです。
327: <tt>key</tt> と <tt>value</tt> の前後の空白は取り除かれます。
328: また空行と "<tt>#</tt>" で始まる行は無視します。
329: 知らないキーの行も無視します。
1.1.1.7 root 330: <q>VM configuration file is nono.cfg
331: (or the file specified by -c option) in the VM directory.
1.1.1.2 root 332: Its syntax is <tt>key = value</tt> format, one per line.
333: White spaces before and after <tt>key</tt> and <tt>value</tt> are ignored.
334: And, blank lines, lines beginning with "<tt>#</tt>", and
335: lines with unrecognized key are also ignored.
336: </q>
1.1 root 337: <p>
338: 設定項目は次の通りです。
1.1.1.2 root 339: <q>The configuration items are:</q>
1.1 root 340: <dl>
341: <dt class=dt-indent><tt>vmtype = <i>string</i></tt></dt>
1.1.1.4 root 342: <dd>VM 種別を以下のいずれかから指定します。
343: 省略不可です。
344: <q>Specifies the VM type from the following.
345: This field is mandatory.
346: </q>
347: <table cellspacing=0 cellpadding=0>
348: <tr><td> <td><tt>luna</tt> <td>… LUNA-I
1.1.1.9 ! root 349: <tr><td><td><tt>luna88k</tt> <td>… LUNA88K
1.1.1.4 root 350: </table></p></dd>
1.1.1.9 ! root 351: <dt class=dt-indent><tt>clock-sync = <i>value</i></tt></dt>
! 352: <dd>仮想マシン内の時刻の同期方法を指定します。
! 353: <tt>real</tt> なら実時間に同期、<tt>virtual</tt> なら仮想時間に同期します。
! 354: デフォルトは <tt>real</tt> です。
! 355: この機能は実験中のため将来予告なく仕様が変更になる可能性があります。
! 356: <q>Specify how to synchronize the time in virtual machine.
! 357: If <tt>real</tt>, synchronize with the real time;
! 358: if <tt>virtual</tt>, synchronize with the virtual time.
! 359: The default is <tt>real</tt>.
! 360: This feature is under experimentation and may be changed in the future
! 361: without notice.
! 362: </q></p></dd>
1.1 root 363: <dt class=dt-indent><tt>debugger-port = <i>integer</i></tt></dt>
364: <dd>デバッガの TCP 待ち受けポート番号を指定します。
365: 0 なら待ち受けを行いません。
1.1.1.4 root 366: デフォルトは 0 です。
367: <q>Specifies the TCP port number that debugger listens.
368: If 0, it will not listen.
369: The default is 0.</q></p></dd>
1.1.1.9 ! root 370: <dt class=dt-indent><tt>ethernet-macaddr = <i>string</i></tt></dt>
! 371: <dd>イーサネットデバイスの仮想マシン側の MAC アドレスを指定します。
! 372: <tt><i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i></tt>
! 373: 形式で指定します。
! 374: <tt>auto</tt> なら自動的に決定します。
! 375: デフォルトは <tt>auto</tt> です。</p></dd>
! 376: <dt class=dt-indent><tt>hostnet-driver = <i>string</i></tt></dt>
1.1 root 377: <dd>イーサネットデバイスのホスト側ドライバを指定します。
1.1.1.9 ! root 378: <tt>afpacket</tt>、<tt>bpf</tt>、<tt>tap</tt> のうち
! 379: ホスト OS がサポートしているものと <tt>auto</tt>、<tt>none</tt> が選択可能です。
! 380: <tt>afpacket</tt> は Linux の AF_PACKET ソケットを使用します。
! 381: <tt>bpf</tt> は bpf(4) デバイスを使用します。
! 382: <tt>tap</tt> は tap(4) インタフェースを使用します。
1.1 root 383: <tt>none</tt> ならホスト側とは一切通信を行いません。
1.1.1.9 ! root 384: <tt>auto</tt> ならホスト OS がサポートしているもののうち
! 385: <tt>tap</tt> → <tt>afpacket</tt> → <tt>bpf</tt> を順に試します。
! 386: デフォルトは <tt>auto</tt> です。
1.1.1.7 root 387: <q>Specifies the host driver of ethernet device.
1.1.1.9 ! root 388: <tt>afpacket</tt>, <tt>bpf</tt>, and <tt>tap</tt> can be specified
! 389: only if the host OS supports them.
! 390: <tt>auto</tt> and <tt>none</tt> can always be specified.
! 391: <tt>afpacket</tt> uses Linux's AF_PACKET socket,
! 392: <tt>bpf</tt> uses bpf(4) device,
! 393: and <tt>tap</tt> uses tap(4) interface.
! 394: <tt>none</tt> doesn't make any communication with the host.
! 395: If <tt>auto</tt> is specified,
! 396: it tries <tt>tap</tt>, <tt>afpacket</tt>, and <tt>bpf</tt> in that order
! 397: (if the host OS supports them).
! 398: The default is <tt>auto</tt>.</q></p></dd>
! 399: <dt class=dt-indent><tt>hostdriver-afpacket-ifname = <i>ifname</i></tt></dt>
! 400: <dd>ホストドライバが afpacket の時にバインドするインタフェースを1つ指定します。
! 401: <i>ifname</i> が <tt>auto</tt>
! 402: なら使用可能なインタフェースを1つ自動的に選択します。
! 403: デフォルトは <tt>auto</tt> です。
! 404: なお、このホストドライバではローカルホストとの通信は出来ません。
! 405: <q>Specify an interface name to bind to, when the host driver is afpacket.
! 406: If <tt>auto</tt> is specified as <i>ifname</i>,
! 407: it selects an usable interface automatically.
! 408: The default is <tt>auto</tt>.
! 409: Note that this host driver cannot communicate with the localhost.</q></p></dd>
! 410: <dt class=dt-indent><tt>hostdriver-bpf-ifname = <i>ifname</i></tt></dt>
! 411: <dd>ホストドライバが bpf の時にバインドするインタフェースを1つ指定します。
! 412: <i>ifname</i> が <tt>auto</tt>
! 413: なら使用可能なインタフェースを1つ自動的に選択します。
! 414: デフォルトは <tt>auto</tt> です。
! 415: なお、このホストドライバではローカルホストとの通信は出来ません。
! 416: <q>Specify an interface name to bind to, when the host driver is bpf.
! 417: If <tt>auto</tt> is specified as <i>ifname</i>,
! 418: it selects an usable interface automatically.
! 419: The default is <tt>auto</tt>.
! 420: Note that this host driver cannot communicate with the localhost.</q></p></dd>
! 421: <dt class=dt-indent><tt>hostdriver-tap-devpath = <i>path</i></tt></dt>
! 422: <dd>ホストドライバが tap の時に使用するデバイスを1つフルパスで指定します。
! 423: デフォルトは <tt>auto</tt> で、この場合は自動的にデバイスを選択します。
! 424: この時の探し方はホスト OS によって異なります。
! 425: Linux なら <tt>/dev/net/tun</tt> を指定したのと同じです。
1.1.1.7 root 426: OpenBSD なら <tt>/dev/tap0</tt> から <tt>/dev/tap9</tt> まで
427: 順番にオープンできるまで試します。
428: NetBSD (と FreeBSD) ならまず <tt>/dev/tap</tt> でクローニングを試み、
429: それが失敗すれば <tt>/dev/tap0</tt> から <tt>/dev/tap9</tt> までを
430: 順番にオープンできるまで試します。
1.1.1.9 ! root 431: いずれの場合も VM ディレクトリかその親ディレクトリに
! 432: <tt>nono-ifup</tt>, <tt>nono-ifdown</tt> という名前のシェルスクリプトが必要です。
! 433: 何もすることがない場合でも正常終了する空のシェルスクリプトを用意してください。
! 434: <q>
! 435: Specify a device pathname, when the host driver is tap.
! 436: The default is <tt>auto</tt>.
1.1.1.7 root 437: The behavior in this case depends on the host OS.
438: On Linux, it's the same as <tt>/dev/net/tun</tt>.
439: On OpenBSD, it will try from <tt>/dev/tap0</tt> to <tt>/dev/tap9</tt>
440: until successful.
441: On NetBSD (and FreeBSD), it will try cloning by <tt>/dev/tap</tt> first.
442: If that fails, then try from <tt>/dev/tap0</tt> to <tt>/dev/tap9</tt>
443: until successful.
1.1.1.9 ! root 444: In all cases, you need to prepare two shell script files which names are
! 445: <tt>nono-ifup</tt> and <tt>nono-ifdown</tt> in the VM directory or
! 446: its parent directory.
! 447: Even if you don't have anything to do in these scripts,
! 448: you need to prepare empty scripts that will terminate successfully.
1.1.1.7 root 449: </q></p></dd>
1.1.1.9 ! root 450: <dt class=dt-indent><tt>hostnet-fallback = <i>integer</i></tt></dt>
! 451: <dd><tt>hostnet-driver</tt> で指定したドライバが使用可能でなかった時、
! 452: 0 ならプロセスを終了します。
! 453: 1 なら none を選択して実行を継続します。
! 454: デフォルトは 0 です。
! 455: <q>Specify the behavior when the driver which is selected by
! 456: <tt>hostnet-driver</tt> is unusable;
! 457: terminate the process if 0,
! 458: or continue to run using the <tt>none</tt> driver if 1.
! 459: The default is 0.</q></p></dd>
1.1 root 460: <dt class=dt-indent><tt>luna-dipsw1 = <i>string</i></tt></dt>
461: <dd>本体前面 DIPSW#1-1..#1-8 の内容を指定します。
462: "<tt>0</tt>" を DOWN、"<tt>1</tt>" を UP として、
463: これを8つ並べた形式で、前から順に #1..#8 に対応します。
1.1.1.4 root 464: <q>Specifies status of the front panel DIPSW#1-1..#1-8 using 8 digit.
1.1.1.2 root 465: "<tt>0</tt>" means DOWN and "<tt>1</tt>" means UP.
466: The first character corresponds to #1 and
1.1.1.3 root 467: the eighth character corresponds to #8.</q>
468: <p>
469: LUNA-I でのデフォルトは <tt>11110111</tt> です。
470: 各スイッチの内容は以下のリンクを参照してください。
471: <q>On LUNA-I, the default value is <tt>11110111</tt>.
1.1.1.4 root 472: See the following link about DIPSW.</q><br>
1.1.1.3 root 473: → <a href="https://wiki.netbsd.org/ports/luna68k/luna68k_info/"
474: >NetBSD/luna68k: Information</a>
1.1 root 475: <br>
1.1.1.4 root 476: LUNA88K でのデフォルトは <tt>11111111</tt> です。
477: 各スイッチの内容は以下のリンクを参照してください。
478: <q>On LUNA88K, the default value is <tt>11111111</tt>.
479: See the following link about DIPSW.</q><br>
480: → <a href="http://man.openbsd.org/boot_luna88k.8"
481: >OpenBSD manual pages: boot_luna88k(8)</a></p></dd>
1.1 root 482: <dt class=dt-indent><tt>luna-dipsw2 = <i>string</i></tt></dt>
483: <dd>本体前面 DIPSW#2-1..#2-8 の内容を指定します。
484: 書式は <tt>luna-dipsw1</tt> と同じです。
485: デフォルトは <tt>11111111</tt> です。
1.1.1.2 root 486: <q>Specifies status of the front panel DIPSW#2-1..#2-8.
487: The same syntax as <tt>luna-dipsw1</tt> is used.
488: The default value is <tt>11111111</tt>.</q>
1.1.1.3 root 489: <p>
1.1.1.4 root 490: NetBSD/luna68k のブートローダは、
491: DIPSW#2 が "<tt>11111111</tt>" なら自動的にカーネルをロードして実行し、
492: どれかでも "<tt>0</tt>" にするとプロンプトで停止するようです。
1.1.1.2 root 493: <span class=strike>(本当は #8 だけで制御するつもりだったんじゃないかという気がします)</span>
1.1.1.4 root 494: <q>NetBSD/luna68k bootloader will automatically load and execute the kernel,
495: if the DIPSW#2 is "<tt>11111111</tt>".
1.1.1.2 root 496: Otherwise, the bootloader will enter interactive mode.
497: <span class=strike>(I doubt that they actually wanted to switch with only #8)
498: </span>
499: </q></p></dd>
1.1.1.3 root 500: <dt class=dt-indent><tt>monitor-rate = <i>integer</i></tt></dt>
501: <dd>テキスト系モニタウィンドウの更新頻度を Hz 単位で指定します。
502: 1 から 60 までの間で指定でき、デフォルトは 20Hz です。
503: 起動後にメニューからプリセットされた頻度には変更可能です。
504: <q>Specifies refresh rate of all text monitor windows in Hz.
505: It ranges from 1 to 60. The default is 20Hz.
506: You can change this value on GUI menu after boot,
507: but unlike this configuration value, there are only a few preset choices.
508: </q></p></dd>
1.1 root 509: <dt class=dt-indent><tt>mpu-clock = <i>value</i></tt></dt>
510: <dd>MPU のクロック数を MHz 単位で指定します。
1.1.1.5 root 511: デフォルトは LUNA-I なら 20MHz、LUNA88K なら 25MHz です。
512: <q>Specifies the MPU clock in MHz.
513: The default value is 20MHz on LUNA-I, or 25MHz on LUNA88K.</q></p></dd>
1.1.1.9 ! root 514: <dt class=dt-indent><tt>mpu-pseudo-stop = <i>integer</i></tt></dt>
! 515: <dd>m88100 にて疑似 STOP 状態を有効にするかどうかを指定します。
! 516: 0 なら無効(実機と同じ動作)、1 なら有効で、デフォルトは 1 です。
! 517: m88100 には、m68k の STOP 命令 (割り込みが上がるまで何もせず待つ)
! 518: に相当する命令がなく、
! 519: 大抵ビジーウェイトループで割り込みが上がるのを待つことになります。
! 520: これは実機では (消費電力を減らす手段がないという些細な問題以外には)
! 521: 何のデメリットもないのですが、
! 522: エミュレータで特に高速動作させている時には割り込みが上がるまで
! 523: (例えば人間がキーを入力するまで) ホスト CPU パワーを使い潰してビジーウェイトループを実行し続けることになり、ホスト CPU があっつあつになります。
! 524: それを防ぐための機能です。
! 525: 特徴的な命令列を検出して実現しているので、すべての状況で動作するわけではありません。</p></dd>
1.1.1.2 root 526: <dt class=dt-indent><tt>prom-image = <i>path</i></tt></dt>
1.1.1.4 root 527: <dd>LUNA-I/LUNA88K の外部 ROM イメージファイルのパスを指定します。
1.1.1.2 root 528: <i>path</i> がファイル名のみなら VM ディレクトリとその親ディレクトリからこのファイル名を検索します。
529: <i>path</i> が相対パスなら VM ディレクトリからの相対パスになります (現在のディレクトリからではありません)。
530: 空にすると内蔵 ROM を使用します。
531: デフォルトは空です。
1.1.1.4 root 532: <q>Specifies the LUNA-I/LUNA88K's external ROM image file path.
1.1.1.2 root 533: If the <i>path</i> does not have any path delimiters,
534: the VM directory and then its parent directory will be searched.
535: If the <i>path</i> is a relative path,
536: it will be path from the VM directory, not from the current
537: directory.
538: If the <i>path</i> is empty, internal emulated ROM will be used.
539: The default value is empty.</q>
1.1 root 540: <p>
1.1.1.2 root 541: 実機を持っていない場合はこの値を空に (= デフォルトのままに) しておくと、
1.1.1.9 ! root 542: nono 内蔵のなんちゃって下位互換 ROM で起動します。
1.1.1.2 root 543: <q>If you does not have the real LUNA machines,
544: you can boot with nono's internal downward compatible emulated ROM
1.1.1.4 root 545: if you set this field empty (or leave it as the default).
546: </q>
1.1 root 547: <p>
1.1.1.4 root 548: LUNA-I 実機を持っている場合は
549: ROM ファイルを指定することで実機 ROM で起動できます。
1.1.1.2 root 550: ROM ファイルは実機の 0x41000000-0x4101ffff (128KB) を保存したものです。
1.1.1.3 root 551: 今のところ ROM は V4.22 (Thu Jul 27 11:45:42 1989) のみサポートしています。
552: それ以外については何も分かりません。
1.1.1.4 root 553: <q>If you have the real LUNA-I machine,
1.1.1.2 root 554: you can boot with the real ROM spcifying the ROM file path.
1.1.1.4 root 555: The ROM file is extracted from 0x41000000-0x4101ffff (128KB) of
556: the real LUNA-I machine.
1.1.1.3 root 557: For now, only V4.22 (Thu Jul 27 11:45:42 1989) is supported.
558: I have no idea about other ROMs.
1.1.1.4 root 559: </q>
560: <p>
561: LUNA88K 実機の場合は 0x41000000-0x4103ffff (256KB) を保存したものです。
1.1.1.9 ! root 562: 今のところ ROM は version 1.20 のみサポートしています。
1.1.1.4 root 563: <q>
564: For LUNA88K,
565: the ROM file is extracted from 0x41000000-0x4103ffff (256KB).
1.1.1.9 ! root 566: For now, only version 1.20 is supported.
1.1.1.3 root 567: </q></p></dd>
568: <dt class=dt-indent><tt>ram-size = <i>integer</i></tt></dt>
1.1.1.2 root 569: <dd>搭載する RAM サイズを MB 単位で指定します。
1.1.1.7 root 570: LUNA-I のデフォルトは 16MB です。
571: 16MB 未満は 4MB 単位で、
572: 16MB 以上は 255MB まで 1MB 単位で指定できます
573: (ちなみに NetBSD/luna68k の起動には最低でも 8MB 必要です)。
574: LUNA88K のデフォルトは 64MB です。
575: 64MB 未満は 16MB 単位で、
576: 64MB 以上は暫定で 255MB まで 1MB 単位で指定できます。
1.1.1.5 root 577: <q>Specifies the RAM size in MB.
1.1.1.7 root 578: On LUNA-I, the default is 16MB.
579: If the size is less than 16MB, you can specify in 4MB unit.
580: If larger, you can specify up to 255MB in 1MB unit.
581: By the way, NetBSD/luna68k needs at least 8MB to boot.
582: On LUNA88K, the default is 64MB.
583: If the size is less than 64MB, you can specify in 16MB unit.
584: If larger, you can specify up to tentative 255MB in 1MB unit.
585: </q></p></dd>
1.1.1.8 root 586: <dt class=dt-indent><tt>show-statuspanel = <i>integer</i></tt></dt>
587: <dd>ステータスパネルを表示するかどうかを指定します。
588: 0 なら非表示、1 なら表示です。
589: 起動後はメニューから変更可能です。
590: <q>Specifies whether to display the status panel or not.
591: If 0, it is hidden; if 1, it is shown.
592: You can change it on GUI menu after boot.
593: </q></p></dd>
1.1 root 594: <dt class=dt-indent><tt>spc0-id<i>N</i>-image = <i>devtype</i>,<i>path</i></tt></dt>
595: <dd>SCSI デバイスを指定します。<i>N</i> には 0 から 7 が入ります。
596: ID 7 は本体が使用しますので指定しないでください。
597: 値はデバイス種別 <i>devtype</i> とイメージパス <i>path</i>
598: を "<tt>,</tt>"(カンマ) で区切って並べた形式で、
599: 今の所デバイス種別 <i>devtype</i> には "<tt>hd</tt>"(ハードディスク) のみ指定可能です。
600: ディスクイメージパスが相対パスなら VM ディレクトリからの相対パスになります。
1.1.1.2 root 601: <q>
602: Specifies SCSI device. <i>N</i> is 0 to 7.
603: But don't specify ID 7 because the host uses it.
604: The value is in a form of device type <i>devtype</i> and
605: the image path <i>path</i> separated by "<tt>,</tt>"(comma).
606: For now, only "<tt>hd</tt>" (hard disk) can be specified for <i>devtype</i>.
607: If the <i>path</i> is relative path, it is from the VM directory.
608: </q>
609:
1.1 root 610: <p>
611: 例えば、nono.cfg と同じディレクトリに置いたディスクイメージ luna.img
612: を使う場合、
1.1.1.7 root 613: LUNA では通常 ID 6 をプライマリ HDD に割り当てるのでこんな感じになります。
1.1.1.2 root 614: <q>For example, if you use disk image luna.img placed in the same
615: directory as nono.cfg,
1.1.1.7 root 616: since LUNA usually assigns ID 6 to the primary HDD,
1.1.1.2 root 617: write as following:</q>
1.1 root 618: <blockquote><pre>
619: spc0-id6-image = hd,luna.img
620: </pre></blockquote></p></dd>
1.1.1.4 root 621: <dt class=dt-indent><tt>spc0-id<i>N</i>-seektime = <i>integer</i></tt></dt>
622: <dd>指定の SCSI HDD の平均シークタイムを msec 単位で指定します。
623: 現在のデフォルトは <tt>0</tt> です (S・S・D!! S・S・D!!)。
624: 16 程度を指定すると幾分往時に思いを馳せることが出来るかもしれませんが、
625: 今の所あまり安定していません。
626: <q>Specifies the average seek time of specified SCSI HDD in msec.
627: Currently, the default value is <tt>0</tt>
628: (This may be something like SSD :-).
629: If you specify about 16 or so, you can feel nostalgic,
630: but this feature is still unstable.
631: </q></p></dd>
1.1 root 632: <dt class=dt-indent><tt>spc0-id<i>N</i>-writeprotect = <i>integer</i></tt></dt>
633: <dd>指定の SCSI デバイスへの書き込みを無視するかどうか指定します。
634: <tt>0</tt> なら通常動作(書き込みを行う)です。
635: <tt>1</tt> なら書き込みコマンドは成功したように振る舞いますが実際には
636: ディスクイメージに一切書き戻しません。
637: fsck を気にせずカーネルのデバッグとかを行いたい場合にはどうぞ。
638: 何が起きるか意味が分からない人は指定しないでください。
1.1.1.2 root 639: デフォルトは <tt>0</tt> です。
640: <q>Specifies whether nono ignores writing to SCSI devices.
641: <tt>0</tt> means normal operation (writes to the devices).
1.1.1.7 root 642: If <tt>1</tt> is specified,
1.1.1.2 root 643: nono will not actually write back to the disk image
644: even though the write command is succeeded.
645: nono's SCSI devices acts as
646: write command is successfully done but it never writes back
647: to the actual disk image.
648: This is useful for kernel debugging because it does not require fsck
649: after the kernel hangs.
650: But don't use this flag if you don't understand this paragraph.
651: The default value is <tt>0</tt>.
652: </q></p></dd>
1.1 root 653: </dl>
654: </div>
655:
656:
1.1.1.8 root 657: <a name="aboutvm"></a>
658: <h4>VM について <q>About VM</q></h4>
659: <h5>ステータスパネル <q>Status Panel</q></h5>
660: <div class="main">
661: ステータスパネル中央にあるパフォーマンスメータのアイコンは
662: 高速モードの状態を表示しています。
663: ダブルクリックすると高速/等速モードの指定を切り替えることができます。
664: <q>The performance meter's icon at the center of the status panel
665: shows the VM speed status.
666: You can switch full speed / syncronized mode by double-clicking on this icon.
667: </q>
668: <table>
669: <tr><td valign=top>
670: <image src="image/sp-ffmark0.png" style="padding:0.5ex; background-color:white">
671: <td valign=top>…
672: <td valign=top>
673: マークなしの場合、ユーザが等速モードを指定していて、等速モードで実行中です。
674: <q>When no icons are displayed,
675: the user has specified syncronized mode and
676: the VM is running in synchronized mode.</q>
677: <tr><td valign=top>
678: <image src="image/sp-ffmark1.png" style="padding:0.5ex; background-color:white">
679: <td valign=top>…
680: <td valign=top>
681: 三角2つの場合、ユーザが高速モードを指定していて、等速モードで実行中です。
682: キー入力中(後述)または VM がアイドル状態(m68k の STOP 命令)などで起きます。
1.1.1.9 ! root 683: 高速モード中はパーセントではなく何倍速で動作しているかを表します。
1.1.1.8 root 684: <q>When an icon (two triangles) is displayed,
685: the user has specified full speed mode and
686: the VM is running in synchronized mode.
1.1.1.9 ! root 687: This will happen during keystrokes (see below) or when the VM is idle
1.1.1.8 root 688: (STOP instruction on m68k).
689: </q>
690: <tr><td valign=top>
691: <image src="image/sp-ffmark2.png" style="padding:0.5ex; background-color:white">
692: <td valign=top>…
693: <td valign=top>
694: 三角3つの場合、ユーザが高速モードを指定していて、高速モードで実行中です。
695: <q>When an icon (three triangles) is displayed,
696: the user has specified full speed mode and
697: the VM is running in full speed mode.
698: </table>
699: </div>
700:
701: <h5>キー入力 <q>Key input</q></h5>
702: <div class="main">
703: LUNA では、キーボードがハードウェア側でキーリピートを行わず、
704: ソフトウェア(OS など)がキーリピートの処理を行います。
705: そのため、キーリピートを実装していない LUNA の PROM や
706: NetBSD/luna68k のブートローダではキーリピートは起きず、
707: キーリピートを実装している NetBSD/luna68k カーネルではキーリピートが起こせます。
1.1.1.9 ! root 708: キーリピートを起こす間隔をゲストのソフトウェアが測定しているということは、
1.1.1.8 root 709: VM が高速動作するとキーリピートもそれに合わせて発生することになり、
710: これをホスト側から防ぐ手段はありません。
711: そこで nono ではキー入力が発生している間
712: (キーが一つでも押されてからキーが全て離されるまでの間)、
713: 高速モードが指示されていても VM を一時的に等速モードに落として実行します。
714: 上記のアイコンがそれを区別しているのはこのためです。
715: そのため、何らかの理由でキーが入りっぱなしになった場合
716: (ALT + TAB やアクセラレータキーでメニューを開くと起きがちです)
717: 高速モードが抑制されたままということが起きえます。
718: その場合はソフトウェアキーボードからキー入力を解除するなどしてください。
719: <q>
720: On LUNA,
721: key repeat is done by software(OS), not by the keyboard hardware.
722: For this reason,
723: key repeat doesn't occur on LUNA's PROM or NetBSD/luna68k's bootloader
724: that don't implement it, and
725: key repeat occurs on NetBSD/luna68k kernel that implements it.
1.1.1.9 ! root 726: Since the timing of key repeat is measured by the guest software,
1.1.1.8 root 727: if the VM is running faster than the real,
728: the key repeat will occur faster, too.
729: The host application doesn't have the way to avoid it.
730: Therefore, nono will temporarily suppress the full speed mode
731: while any keys are pressed.
732: That is why the above-mentioned icon distinguishes them.
1.1.1.9 ! root 733: If keys continue to be pressed for some reasons,
1.1.1.8 root 734: the VM also continues to run syncronized mode.
735: In this case, you can resolve it by using the software keyboard window.
736: </q>
737: </div>
738:
739:
740: <a name="tryit"></a>
1.1 root 741: <h4>実行してみる <q>Try it</q></h4>
1.1.1.9 ! root 742: <h5>NetBSD/luna68k を実行してみる <q>Try NetBSD/luna68k</q></h5>
1.1 root 743: <div class="main">
1.1.1.9 ! root 744: つついさんが NetBSD/luna68k 9.2 の liveimage を用意されています。
! 745: <q>Tsutsui-san has provided a liveimage of NetBSD/luna68k 9.2.</q>
! 746: <dl>
! 747: <dd><a href="https://twitter.com/tsutsuii/status/1262429647364427783"
! 748: >https://twitter.com/tsutsuii/status/1262429647364427783</a><br>
! 749: <dd><a href="https://twitter.com/tsutsuii/status/1405206240913805313"
! 750: >https://twitter.com/tsutsuii/status/1405206240913805313</a><br>
! 751: </dl>
! 752: ここではこれを起動してみます。<q>Let's try it.</q>
1.1.1.2 root 753: <br>
754: <ol>
755: <li>どこかに nono 用のディレクトリを用意し(例えば ~/nono/)、
1.1 root 756: その中に VM ディレクトリを用意します (例えば ~/nono/luna/)。
1.1.1.3 root 757: <q>Create a directory somewhere for nono (for example ~/nono/),
1.1.1.9 ! root 758: and create subdirectories for individual VMs in it
! 759: (for example ~/nono/luna/).</q>
1.1 root 760:
1.1.1.3 root 761: <li>以下のリンクからイメージファイルをダウンロードして展開し、
1.1.1.2 root 762: VM ディレクトリ ~/nono/luna/ に置きます。
1.1.1.3 root 763: <q>Download imagefile from the following link,
1.1.1.8 root 764: extract it and place it in the VM directory, ~/nono/luna/.</q>
1.1.1.3 root 765: <blockquote>
1.1.1.9 ! root 766: <a href="http://teokurebsd.org/netbsd/liveimage/20210614-luna68k/"
! 767: >http://teokurebsd.org/netbsd/liveimage/20210614-luna68k/</a>
1.1.1.3 root 768: </blockquote>
1.1.1.2 root 769:
1.1.1.9 ! root 770: <li>以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/luna/
! 771: に作成します。
! 772: ここでは説明を簡単にするためネットワークなしにしていますが、
! 773: ネットワーク設定は必要に応じて行ってください。
1.1.1.8 root 774: <q>Create a configuration file nono.cfg in the VM directory, ~/nono/luna/,
1.1.1.9 ! root 775: with following contents.
! 776: By the way, to simplify the explanation, we assume there is no network here.
! 777: However, please configure the network if necessary.</q>
1.1.1.2 root 778: <blockquote class="file"><pre>
779: vmtype = luna
1.1.1.9 ! root 780: spc0-id6-image = hd,liveimage-luna68k-raw-20210614.img
! 781: hostnet-driver = none
1.1.1.2 root 782: </pre></blockquote>
1.1.1.9 ! root 783:
1.1.1.2 root 784: <li><tt>nono -c ~/nono/luna</tt> で起動します
785: (VM ディレクトリに自動的に NVRAM.DAT が作られます)。
786: <q>Run as <tt>nono -c ~/nono/luna</tt>.
1.1.1.4 root 787: (NVRAM.DAT will be created automatically in the VM directory)</q>
1.1.1.2 root 788: <li>Emulated ROM Monitor が起動するので、
789: 初回は以下のように入力すると NetBSD が起動します。
790: <q>The emulated ROM Monitor will be executed.
791: Then, only for the first time,
792: entering the following can boot NetBSD.</q>
1.1.1.9 ! root 793: <blockquote><pre>
! 794: k⏎
! 795: ⏎
! 796: ⏎
! 797: d⏎
! 798: boot⏎
! 799: g⏎
! 800: x⏎
! 801: </pre></blockquote>
! 802: 画面はこんな感じのはずです (太字が入力部分)。
! 803: <q>You will see a screen like this. The bold text indicates
! 804: the characters you need to enter.</q>
1.1.1.2 root 805: <blockquote class="file"><pre>
1.1.1.9 ! root 806: NONO 0.2.0 Emulated ROM Monitor for LUNA-I
! 807:
! 808: ** NVRAM Initialized.
! 809:
! 810: ><b>k⏎</b>
! 811: controller: dk ?<b>⏎</b>
! 812: drive unit: 0 ?<b>⏎</b>
! 813: partition : c ?<b>d⏎</b>
! 814: filename : vmunix ?<b>boot⏎</b>
! 815: ><b>g⏎</b>
! 816: Loaded. Entry point = $00700000
! 817: ><b>x⏎</b>
1.1.1.2 root 818: </pre></blockquote>
819: この内容は NVRAM.DAT に記録されているので次回以降は直接 NetBSD が起動します。
1.1.1.8 root 820: <q>The information you have just entered is recorded in the NVRAM,
1.1.1.2 root 821: so next time it boots NetBSD automatically.</q>
1.1.1.9 ! root 822: <li>初回起動時、
! 823: Updating fontconfig cache はあほみたいに時間がかかりますが、
! 824: nono がハングアップしてるわけではありません(>_<)。
! 825: また初回ログイン時めちゃくちゃ重たいですが、
! 826: これはバックグラウンドで makemandb が動くためで
! 827: nono のせいではありません(>_<)。
! 828: <q>At the first boot, you will see the console stops after printing
! 829: "Updating fontconfig cache".
! 830: This is because the infamous fontconfig takes very looooong time.
! 831: nono would not have hang-up.
! 832: In addition, after the first login, you will feel it's too heavy.
! 833: This is because the infamous makemandb(8) runs heavily in the background
! 834: for a looooong time.
! 835: It's very sad to me that these two accidents which are far from the ideal
! 836: are the first experiences of a newcomer.
! 837: </q>
! 838:
! 839: <li>終了する時は root
! 840: ユーザで “<tt>shutdown -p now</tt>” を実行してください。
! 841: LUNA はソフトウェアから電源オフでき、
! 842: VM の電源オフで nono も終了します。
! 843: <q>To quit, type “<tt>shutdown -p now</tt>” as the root user.
! 844: LUNA can be powered off by software,
! 845: and nono will terminate when the VM is powered off.</q>
1.1.1.2 root 846: </ol>
1.1 root 847: </div>
848:
1.1.1.9 ! root 849: <h5>OpenBSD/luna88k を実行してみる <q>Try OpenBSD/luna88k</q></h5>
! 850: <div class="main">
! 851: あおやまさんが OpenBSD/luna88k 6.9 の liveimage を用意されています。
! 852: <q>Aoyama-san has provided a liveimage of OpenBSD/luna88k 6.9.</q>
! 853: <dl>
! 854: <dd><a href="https://twitter.com/ao_kenji/status/1404784588015112192"
! 855: >https://twitter.com/ao_kenji/status/1404784588015112192</a>
! 856: </dl>
! 857: ここではこれを起動してみます。<q>Let's try it.</q>
! 858: <br>
! 859: <ol>
! 860: <li>どこかに nono 用のディレクトリを用意し(例えば ~/nono/)、
! 861: その中に VM ディレクトリを用意します (例えば ~/nono/luna88k/)。
! 862: <q>Create a directory somewhere for nono (for example ~/nono/),
! 863: and create subdirectories for individual VMs in it
! 864: (for example ~/nono/luna88k/).</q>
! 865:
! 866: <li>以下のリンクから liveimage-luna88k-raw-YYYYMMDD.img.gz
! 867: をダウンロードして展開し、
! 868: VM ディレクトリ ~/nono/luna88k/ に置きます。
! 869: <q>Download liveimage-luna88k-raw-YYYYMMDD.img.gz from the following link,
! 870: extract it and place it in the VM directory, ~/nono/luna88k/.</q>
! 871: <blockquote>
! 872: <a href="http://www.nk-home.net/~aoyama/liveimage/"
! 873: >http://www.nk-home.net/~aoyama/liveimage/</a>
! 874: </blockquote>
! 875:
! 876: <li>以下の内容の設定ファイル nono.cfg を VM ディレクトリ ~/nono/luna88k/
! 877: に作成します。
! 878: ここでは説明を簡単にするためネットワークなしにしていますが、
! 879: ネットワーク設定は必要に応じて行ってください。
! 880: <q>Create a configuration file nono.cfg in the VM directory, ~/nono/luna88k/,
! 881: with following contents.
! 882: By the way, to simplify the explanation, we assume there is no network here.
! 883: However, please configure the network if necessary.</q>
! 884: <blockquote class="file"><pre>
! 885: vmtype = luna88k
! 886: spc0-id6-image = hd,liveimage-luna88k-raw-20210614.img
! 887: hostnet-driver = none
! 888: </pre></blockquote>
! 889:
! 890: <li><tt>nono -c ~/nono/luna88k</tt> で起動します
! 891: (VM ディレクトリに自動的に NVRAM.DAT が作られます)。
! 892: <q>Run as <tt>nono -c ~/nono/luna88k</tt>.
! 893: (NVRAM.DAT will be created automatically in the VM directory)</q>
! 894: <li>Emulated ROM Monitor が起動するので、
! 895: 初回は以下のように入力すると OpenBSD が起動します。
! 896: <q>The emulated ROM Monitor will be executed.
! 897: Then, only for the first time,
! 898: entering the following can boot OpenBSD.</q>
! 899: <blockquote><pre>
! 900: nvram boot_filename boot⏎
! 901: y
! 902: b⏎
! 903: </pre></blockquote>
! 904: 画面はこんな感じのはずです (太字が入力部分)。
! 905: <q>You will see a screen like this. The bold text indicates
! 906: the characters you need to enter.</q>
! 907: <blockquote class="file"><pre>
! 908: NONO 0.2.0 Emulated ROM Monitor for LUNA88K
! 909:
! 910: ** NVRAM Initialized.
! 911:
! 912: N><b>nvram boot_filename boot⏎</b>
! 913: Update boot_filename : "vmunix" -> "boot" (Y/[N]):<b>y</b>
! 914: Updated
! 915: N><b>b⏎</b>
! 916: </pre></blockquote>
! 917: この内容は NVRAM.DAT に記録されているので次回以降は直接 OpenBSD が起動します。
! 918: <q>The information you have just entered is recorded in the NVRAM,
! 919: so next time it boots OpenBSD automatically.</q>
! 920:
! 921: <li>終了する時は root
! 922: ユーザで “<tt>shutdown -p now</tt>” を実行してください。
! 923: LUNA88K はソフトウェアから電源オフでき、
! 924: VM の電源オフで nono も終了します。
! 925: <q>To quit, type “<tt>shutdown -p now</tt>” as the root user.
! 926: LUNA88K can be powered off by software,
! 927: and nono will terminate when the VM is powered off.</q>
! 928: </ol>
! 929: </div>
! 930:
! 931:
1.1 root 932:
1.1.1.8 root 933: <a name="network"></a>
1.1.1.9 ! root 934: <h4>ネットワーク設定例 <q>Example of network setup</q></h4>
1.1 root 935: <div class=main>
1.1.1.9 ! root 936: wm0 を持つ NetBSD ホストに tap(4) デバイスを用いて
! 937: nono のゲスト OS を接続する場合の設定例です。
! 938: <ol>
! 939: <li>
! 940: 設定ファイル nono.cfg に以下の行を追加します
! 941: (と言いつつ NetBSD では書かなくてもデフォルトでこの動作になりますが)
! 942: <q>Add the following line to configuration file, nono.cfg.
! 943: (Although you don't need to write it since these are default behavior
! 944: on NetBSD)</q>
1.1 root 945: <blockquote class="file"><pre>
1.1.1.9 ! root 946: hostnet-driver = tap
! 947: hostnet-tap-devpath = auto
1.1 root 948: </pre></blockquote>
1.1.1.9 ! root 949:
1.1.1.5 root 950: <li>デフォルトでは /dev/tap は一般ユーザからアクセスできないので、
951: chmod で適当にパーミッションを与えます。
952: 番号の付いていないほうの /dev/tap だけでいいです。
953: sysinst 等で OS をアップグレードするとパーミッションが 600
954: に戻るのがハマりポイントです。
1.1.1.9 ! root 955: <q>By default, /dev/tap is only accessible to privileged user.
! 956: You need to chmod /dev/tap (without unit number) appropriately.
! 957: Note that upgrading using sysinst always reset the permission to 600.
! 958: </q>
1.1.1.5 root 959:
960: <li>bridge(4) インタフェースを作成し、
1.1.1.9 ! root 961: ホストの外部(物理)インタフェースをブリッジに追加しておきます。
1.1.1.5 root 962: <q>Create a bridge(4) interface, and
963: add your physical interface to the bridge.</q>
1.1 root 964: <blockquote class="cons"><pre>
1.1.1.5 root 965: # ifconfig bridge0 create
1.1 root 966: # brconfig bridge0 add wm0
967: </pre></blockquote>
1.1.1.9 ! root 968: 常用するなら /etc の設定ファイルに書いておきましょう。
! 969: <q>If you use it regularly,
1.1.1.5 root 970: you can put configuration file into /etc.</q>
971: <blockquote>
972: /etc/ifconfig.bridge0
973: <pre class=file>
974: create
975: up
976: !/sbin/brconfig $int add wm0
977: </pre>
978: <pre class=cons>
979: # /etc/rc.d/network restart
980: </pre>
981: </blockquote>
982:
983: <li>
984: 一般ユーザに戻って、
985: VM ディレクトリかその親ディレクトリに
986: 次のような 2つのスクリプトを用意します。
1.1.1.9 ! root 987: nono は tap(4) をオープンし、
! 988: そのデバイス名を引数にこれらのスクリプトを呼びます。
1.1.1.5 root 989: sudo の設定は別途行ってください。
990: <q>Return to non-privileged user, and
991: create following two scripts in the VM directory or its parent directory.
1.1.1.9 ! root 992: nono will open tap(4) and
! 993: invoke these scripts with the name of the device as an argument.
1.1.1.5 root 994: In addition, you need to set up sudo separately.</q>
1.1 root 995: <blockquote>
996: nono-ifup
997: <pre class=file>
998: #!/bin/sh
1.1.1.5 root 999: sudo /sbin/ifconfig $1 up
1000: sudo /sbin/brconfig bridge0 add $1
1.1 root 1001: </pre></blockquote>
1002:
1003: <blockquote>
1.1.1.5 root 1004: nono-ifdown
1.1 root 1005: <pre class=file>
1006: #!/bin/sh
1.1.1.5 root 1007: sudo /sbin/brconfig bridge0 delete $1
1008: sudo /sbin/ifconfig $1 down
1009: </pre></blockquote>
1010:
1011: <blockquote class="cons"><pre>
1012: % chmod +x nono-ifup nono-ifdown
1.1 root 1013: </pre></blockquote>
1014:
1.1.1.5 root 1015: <li>nono を起動し、
1016: メニューの「モニタ > ホスト > ホストネットワーク」を開いて
1.1.1.9 ! root 1017: HostNet Driver: tap になっていれば動いてるはずです。
1.1.1.5 root 1018: <q>Run nono,
1019: and open "Monitor > Host > Host Network" window from menu.
1.1.1.9 ! root 1020: It's OK if you can see "HostNet Driver: tap".</q>
1.1.1.5 root 1021:
1022: </ol>
1023:
1.1 root 1024: </div>
1025:
1026:
1.1.1.8 root 1027: <a name="changes"></a>
1.1.1.2 root 1028: <h4>変更履歴 <q>Changes</q></h4>
1029: <div class="main">
1030: See <a href="changes.html">changes.html</a>.
1031: </div>
1032:
1033:
1.1.1.8 root 1034: <a name="license"></a>
1.1.1.2 root 1035: <h4>ライセンス <q>License</q></h4>
1036: <div class="main">
1037: See <a href="nono-license.txt">nono-license.txt</a>.
1038: </div>
1039:
1040:
1.1.1.4 root 1041: <h4>連絡先 <q>Contact us</q></h4>
1042: <div class="main">
1043: バグ報告などは以下にお願いします。日本語でおk。
1044: <q>If you find any problems, please let me know.
1045: You may write in English.</q><br>
1046: <a href="https://github.com/isaki68k/nono-issue/issues"
1047: >https://github.com/isaki68k/nono-issue/issues</a>
1048: </div>
1049:
1050:
1.1.1.2 root 1051: <h4>パッチの提供について <q>About contributes</q></h4>
1052: <div class="main">
1053: パッチを提供してくださる場合は以下に同意したものとします。
1054: <q>If you provide a patch to nono, you must agree to the following conditions:
1055: </q>
1056: <ul>
1057: <li>成果物が nono のライセンスに従って運用あるいは配布されること。
1058: <q>All your work are operated or distributed under the nono license.</q>
1059: <li>ライセンスが将来変わる可能性があること。
1060: <q>The license may be changed in the future.</q>
1061: <li>著作部分に関して著作者人格権を行使しないこと。
1062: <q>Do not exercise your author's rights.</q>
1063: </ul>
1064: <ul>
1065: </div>
1066:
1067:
1068: <h4>Acknowledgements</h4>
1069: <div class="main">
1070: nono は以下の広告条項を含むソースコードを利用しています。
1071: <q>nono uses source code with the following advertising clause.</q>
1072: <blockquote>
1073: This product includes software developed by Gordon Ross<br>
1074: This product includes software developed by the University of California, Lawrence Berkeley Laboratory.<br>
1075: </blockquote>
1076: </div>
1077:
1.1 root 1078:
1079: <hr>
1.1.1.2 root 1080: nono project
1.1 root 1081: </body>
1082: </html>
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.