|
|
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><?php
7: $nono_ver = "";
8:
9: if ($_SERVER['argc'] > 1)
10: get_version($_SERVER['argv'][1]);
11:
12: function get_version($filename)
13: {
14: global $nono_ver;
15:
16: $fp = fopen($filename, "r");
17: if ($fp !== false) {
18: while (($buf = fgets($fp)) !== false) {
19: if (preg_match("/NONO_MAJOR_VER\s+\((\d+)\)/", $buf, $m)) {
20: $nono_major = $m[1];
21: }
22: if (preg_match("/NONO_MINOR_VER\s+\((\d+)\)/", $buf, $m)) {
23: $nono_minor = $m[1];
24: }
25: if (preg_match("/NONO_PATCH_VER\s+\((\d+)\)/", $buf, $m)) {
26: $nono_patch = $m[1];
27: }
28: if (preg_match("/NONO_DATE\s+\"([^\"]+)\"/", $buf, $m)) {
29: $nono_date = $m[1];
30: }
31: }
32: fclose($fp);
33:
34: $nono_ver = "${nono_major}.${nono_minor}.${nono_patch} (${nono_date})";
35: }
36: }
37: ?>
1.1.1.2 root 38: <?php require_once "common.php"; ?>
1.1 root 39: <body>
40: <h3>nono <?=$nono_ver?></h3>
41:
42: nono は NetBSD とかで動作する OMRON LUNA-I とかのエミュレータです。
1.1.1.4 root 43: <q>nono is OMRON LUNA-I emulator runs on NetBSD and etc.</q>
1.1 root 44: <hr>
1.1.1.4 root 45:
46: <h4>はじめに <q>Introduction</q></h4>
47: <div class="main">
48: nono は NetBSD とかで動作する OMRON LUNA-I とかのエミュレータです。
49: LUNA88K は実験的サポートです、まだ動きません。
50: <q>
51: nono is OMRON LUNA-I emulator runs on NetBSD and etc.
52: LUNA88K is still experimental support and it does not work yet.
53: </q>
54: </div>
55:
1.1 root 56: <h4>ビルド方法 <q>How to build</q></h4>
57: <div class="main">
1.1.1.5 ! root 58: ビルドには以下が必要です。
! 59: NetBSD(pkgsrc) なら wxWidgets は pkgsrc/x11/wxGTK30 (OPTIONS:gtk2 推奨) です。
! 60: <q>The followings are required for build.
! 61: If you use NetBSD(pkgsrc),
! 62: wxWidgets is pkgsrc/x11/wxGTK30 (OPTIONS:gtk2 is recommended).</q>
! 63:
1.1 root 64: <ul>
1.1.1.2 root 65: <li>make (BSD make, not GNU make)
1.1.1.4 root 66: <li>C/C++ compiler which supports -std=c++14.
67: <br>
68: (For gcc, 7.4 works but 5.5 doesn't work, at least.
69: For clang, 7.0 and 8.0 works at least.)
1.1.1.2 root 70: <li>wxWidgets >= 3.0
71: <li>gettext
1.1 root 72: </ul>
1.1.1.2 root 73:
1.1.1.5 ! root 74: <p>
! 75: (NetBSD 以外でのビルドはサポートしていませんが)
! 76: Ubuntu 18.04 ではたぶん以下のパッケージが必要です。
! 77: <q>You may need the following packages on Ubuntu 18.04
! 78: (though we won't support non-NetBSD platform).</q>
! 79: </p>
! 80: <dl>
! 81: <dd>
! 82: bmake
! 83: build-essential
! 84: gettext
! 85: libbsd-dev
! 86: libedit-dev
! 87: libkqueue-dev
! 88: libwxgtk3.0-dev
! 89: zlib1g-dev
! 90: </dl>
! 91:
1.1.1.2 root 92: <p>
93: アーカイブを展開したら以下のようにビルドします。
94: configure には環境変数 CC、CXX でコンパイラを指定することが出来ます。
95: また wx-config が標準的な名前で提供されていないために見付けられない場合には
96: 環境変数 WX_CONFIG にパスを指定することが出来ます。
97: <q>Extract the archive and build as following.
98: You can specify C/C++ compiler using environment variable CC and CXX
99: if configure cannot find standard name suitable compiler.
100: Also, you can specify wx-config path using environment variable WX_CONFIG
101: if configure cannot find wx-config.</q>
1.1 root 102: <blockquote class="cons"><pre>
103: % ./configure
104: % make depend
105: % make
1.1.1.2 root 106: % su
107: # make install
1.1 root 108: </pre></blockquote>
1.1.1.2 root 109:
110: <p>
111: 2つの実行ファイルがインストールされます。
112: <tt>nono</tt> が GUI 版実行ファイル、
113: <tt>nono-cli</tt> がコマンドライン版です。
114: <q>Two executables will be installed.
115: <tt>nono</tt> is GUI executable and <tt>nono-cli</tt> is
116: command line executable.</q>
1.1 root 117:
118: </div>
119:
120:
121: <h4>コマンドラインオプション <q>Command Line Option</q></h4>
122: <div class="main">
123: <dl>
124: <?php
125: function item($name, $desc)
126: {
127: if (!is_array($name)) {
128: $name = array($name);
129: }
130: foreach ($name as $n) {
131: print "<dt class=dt-indent><tt>{$n}</tt></dt>\n";
132: }
133: print "<dd>{$desc}</p></dd>\n";
134: }
135: function option_item($name, $desc)
136: {
137: item($name, $desc);
138: }
139:
140: option_item("-A <i>file</i>", <<<_EOM_
141: ホストの <tt><i>file</i></tt> をロードして実行します。
1.1.1.4 root 142: <tt><i>file</i></tt> が相対パスの場合カレントディレクトリからのパスになります。
1.1 root 143: ファイルが gzip 圧縮されていれば自動的に展開します。
144: (展開後の) ファイル形式は a.out (OMAGIC) か ELF で、
145: 実際にはブートローダとカーネル程度しか想定していません。
1.1.1.2 root 146: 設定ファイルの <tt>prom-image</tt> とともに指定されると
1.1 root 147: <tt>-A</tt> のほうが優先します。
1.1.1.2 root 148: <q>Loads and executes host's <tt><i>file</i></tt>.
1.1.1.4 root 149: If <tt><i>file</i></tt> is relative path,
150: it is path from the current directory.
1.1.1.2 root 151: If the file is gzip'd, it is automatically extracted.
152: The supported file format (after extracting) is a.out (OMAGIC) or ELF.
153: Actually, it only assumes bootloaders or kernels.
154: If this option is specified at the same time as
155: <tt>prom-image</tt> in configuration file,
156: this option preceeds.
157: </q>
1.1 root 158: _EOM_
159: );
160:
161: option_item("-c <i>vmdir</i>", <<<_EOM_
162: VM ディレクトリを指定します。省略するとカレントディレクトリとします。
1.1.1.2 root 163: <q>Specifies the VM directory. If omitted, the current directory is used.</q>
1.1 root 164: _EOM_
165: );
166:
167: option_item("-f", <<<_EOM_
168: 高速モードで起動します。
169: GUI なら起動後にもメニューから変更できますが、その初期値を変えるだけです。
1.1.1.2 root 170: <q>Boot as the fast mode.
171: You can change this mode on GUI menu after boot,
172: and the option only changes its initial state.
173: </q>
1.1 root 174: _EOM_
175: );
176:
177: option_item("--fontsize <i>height</i>", <<<_EOM_
178: GUI 版のみ。
179: 全サブウインドウの起動時のフォントサイズを指定します。
1.1.1.2 root 180: <tt><i>height</i></tt> には 12, 16
1.1 root 181: のいずれかを指定します。デフォルトは <tt>12</tt> です。
1.1.1.3 root 182: 起動後にメニューから変更できます。
1.1.1.2 root 183: <q>
184: GUI Only.
185: Specifies the initial fontsize on all sub windows.
186: <tt><i>height</i></tt> is one of 12 or 16.
1.1.1.3 root 187: The default value is <tt>12</tt>.
188: You can change this value on GUI menu after boot.
1.1.1.2 root 189: </q>
1.1 root 190: _EOM_
191: );
192:
193: option_item(array("-s <i>scale</i>",
194: "--scale <i>scale</i>"), <<<_EOM_
195: GUI 版のみ。
196: メインウィンドウの起動時のスケールを実数で指定します。
197: 起動後にもメニューからプリセットされた倍率には変更可能ですが、
198: 任意倍率は起動時のみ指定可能です
199: <span class=strike>(そのうちなんとかしたい)</span>。
200: デフォルトは 1.0 です。
1.1.1.2 root 201: <q>
202: GUI Only.
203: Specifies the initial main window scale in real number.
204: You can change this scale on GUI menu after boot,
205: but unlike this option, there are only a few preset choices
206: <span class=strike>(Should be improved in someday)</span>.
207: The default value is 1.0</q>
1.1 root 208: _EOM_
209: );
210:
211: option_item("--show-config", <<<_EOM_
212: 設定ファイルと <tt>-V</tt> オプションを読み込んだ結果を表示します。
1.1.1.2 root 213: <q>Shows the result of reading configuration file and
214: parsing <tt>-V</tt> options.</q>
1.1 root 215: _EOM_
216: );
217:
218: option_item("-v", <<<_EOM_
219: バージョンを表示します。
1.1.1.2 root 220: <q>Shows the version.</q>
1.1 root 221: _EOM_
222: );
223:
224: option_item("-V <i>name</i>=<i>value</i>", <<<_EOM_
1.1.1.3 root 225: 設定ファイルで指定した <tt><i>name</i>=<i>configvalue</i></tt> の代わりに
1.1.1.2 root 226: このオプションの <tt><i>name</i>=<i>value</i></tt> を適用します。
1.1.1.3 root 227: <q>Use this <i>name</i>=<i>value</i>
228: instead of <i>name</i>=<i>configvalue</i> specified in configuration file.
1.1.1.2 root 229: </q>
1.1 root 230: _EOM_
231: );
232: ?>
233: </dl>
234:
1.1.1.2 root 235: 以下開発用。<q>For developers:</q>
1.1 root 236: <dl>
237: <?php
238: // 項目間を空けない
239: function option_dev($name, $desc)
240: {
241: print "<dt class=dt-indent><tt>{$name}</tt></dt>\n";
242: print "<dd>{$desc}</dd>\n";
243: }
244:
1.1.1.3 root 245: option_dev("-b <i>hexaddr</i>[,<i>skipcount</i>]", <<<_EOM_
1.1 root 246: デバッガのブレークポイントを 16進数で指定します。
247: _EOM_
248: );
249:
250: option_dev("-C", <<<_EOM_
251: ログをコンソールにも出力します。
252: 通常はログウィンドウにだけ出力されます。
253: _EOM_
254: );
255:
256: option_dev("-d", <<<_EOM_
257: 起動時にデバッガプロンプトで停止します。
258: _EOM_
259: );
260:
261: option_dev("-D", <<<_EOM_
262: コンソールをデバッガとして使用します。
263: -d を指定しなくても起動時にプロンプトで停止します
264: <span class=strike>(そのうちなんとかしたい)</span>。
265: _EOM_
266: );
267:
268: option_dev("-L <i>name1</i>=<i>level1</i>[,<i>name2</i>=<i>level2</i>,...]",
269: <<<_EOM_
270: ログレベルを指定します。
271: カンマで区切って複数指定することも出来ます。
272: <tt>-Lhelp</tt> で name の一覧を表示します。
273: _EOM_
274: );
275:
276: option_dev("-M <i>name</i>[,<i>name2</i>,...]", <<<_EOM_
277: 起動時に表示するモニタウィンドウを指定します。
278: カンマで区切って複数指定することも出来ます。
1.1.1.3 root 279: <tt>-Mhelp</tt> で name の一覧を表示します。
1.1 root 280: _EOM_
281: );
282:
283:
284: ?>
285: </dl>
286: </div>
287:
288: <h4>設定 <q>Configuration</q></h4>
289: <div class="main">
290: VM の設定ファイルはその VM ディレクトリ内の nono.cfg です。
291: 書式は <tt>key = value</tt> 形式で1行1項目ずつです。
292: <tt>key</tt> と <tt>value</tt> の前後の空白は取り除かれます。
293: また空行と "<tt>#</tt>" で始まる行は無視します。
294: 知らないキーの行も無視します。
1.1.1.2 root 295: <q>VM configuration file is nono.cfg in the VM directory.
296: Its syntax is <tt>key = value</tt> format, one per line.
297: White spaces before and after <tt>key</tt> and <tt>value</tt> are ignored.
298: And, blank lines, lines beginning with "<tt>#</tt>", and
299: lines with unrecognized key are also ignored.
300: </q>
1.1 root 301: <p>
302: 設定項目は次の通りです。
1.1.1.2 root 303: <q>The configuration items are:</q>
1.1 root 304: <dl>
305: <?php
306: function config_item($name, $desc)
307: {
308: item($name, $desc);
309: }
310:
311: config_item("vmtype = <i>string</i>", <<<_EOM_
1.1.1.4 root 312: VM 種別を以下のいずれかから指定します。
313: 省略不可です。
314: <q>Specifies the VM type from the following.
315: This field is mandatory.
316: </q>
317: <table cellspacing=0 cellpadding=0>
318: <tr><td> <td><tt>luna</tt> <td>… LUNA-I
319: <tr><td><td><tt>luna88k</tt> <td>… LUNA88K (experimental)
320: </table>
1.1 root 321: _EOM_
322: );
323:
324: config_item("debugger-port = <i>integer</i>", <<<_EOM_
325: デバッガの TCP 待ち受けポート番号を指定します。
326: 0 なら待ち受けを行いません。
1.1.1.4 root 327: デフォルトは 0 です。
328: <q>Specifies the TCP port number that debugger listens.
329: If 0, it will not listen.
330: The default is 0.</q>
1.1 root 331: _EOM_
332: );
333:
334: config_item("ethernet-hostdriver = <i>string</i>", <<<_EOM_
335: イーサネットデバイスのホスト側ドライバを指定します。
336: <tt>none</tt>、<tt>tap</tt>、<tt>bpf</tt> が指定できます。
337: <tt>none</tt> ならホスト側とは一切通信を行いません。
338: <tt>tap</tt> か <tt>bpf</tt> かはホスト OS によってビルド時に決定します。
339: NetBSD なら <tt>tap</tt> です。
340: _EOM_
341: );
342:
343: config_item("ethernet-macaddr = <i>string</i>", <<<_EOM_
344: イーサネットデバイスの仮想マシン側の MAC アドレスを指定します。
345: <tt><i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i>:<i>XX</i></tt>
346: 形式で指定します。
347: <tt>auto</tt> なら自動的に決定します。
348: デフォルトは <tt>auto</tt> です。
349: _EOM_
350: );
351:
352: config_item("luna-dipsw1 = <i>string</i>", <<<_EOM_
353: 本体前面 DIPSW#1-1..#1-8 の内容を指定します。
354: "<tt>0</tt>" を DOWN、"<tt>1</tt>" を UP として、
355: これを8つ並べた形式で、前から順に #1..#8 に対応します。
1.1.1.4 root 356: <q>Specifies status of the front panel DIPSW#1-1..#1-8 using 8 digit.
1.1.1.2 root 357: "<tt>0</tt>" means DOWN and "<tt>1</tt>" means UP.
358: The first character corresponds to #1 and
1.1.1.3 root 359: the eighth character corresponds to #8.</q>
360: <p>
361: LUNA-I でのデフォルトは <tt>11110111</tt> です。
362: 各スイッチの内容は以下のリンクを参照してください。
363: <q>On LUNA-I, the default value is <tt>11110111</tt>.
1.1.1.4 root 364: See the following link about DIPSW.</q><br>
1.1.1.3 root 365: → <a href="https://wiki.netbsd.org/ports/luna68k/luna68k_info/"
366: >NetBSD/luna68k: Information</a>
1.1 root 367: <br>
1.1.1.4 root 368: LUNA88K でのデフォルトは <tt>11111111</tt> です。
369: 各スイッチの内容は以下のリンクを参照してください。
370: <q>On LUNA88K, the default value is <tt>11111111</tt>.
371: See the following link about DIPSW.</q><br>
372: → <a href="http://man.openbsd.org/boot_luna88k.8"
373: >OpenBSD manual pages: boot_luna88k(8)</a>
1.1 root 374: _EOM_
375: );
376:
377: config_item("luna-dipsw2 = <i>string</i>", <<<_EOM_
378: 本体前面 DIPSW#2-1..#2-8 の内容を指定します。
379: 書式は <tt>luna-dipsw1</tt> と同じです。
380: デフォルトは <tt>11111111</tt> です。
1.1.1.2 root 381: <q>Specifies status of the front panel DIPSW#2-1..#2-8.
382: The same syntax as <tt>luna-dipsw1</tt> is used.
383: The default value is <tt>11111111</tt>.</q>
1.1.1.3 root 384: <p>
1.1.1.4 root 385: NetBSD/luna68k のブートローダは、
386: DIPSW#2 が "<tt>11111111</tt>" なら自動的にカーネルをロードして実行し、
387: どれかでも "<tt>0</tt>" にするとプロンプトで停止するようです。
1.1 root 388: <span class=strike>(本当は #8 だけで制御するつもりだったんじゃないかという気がします)</span>
1.1.1.4 root 389: <q>NetBSD/luna68k bootloader will automatically load and execute the kernel,
390: if the DIPSW#2 is "<tt>11111111</tt>".
1.1.1.2 root 391: Otherwise, the bootloader will enter interactive mode.
392: <span class=strike>(I doubt that they actually wanted to switch with only #8)
393: </span>
394: </q>
1.1 root 395: _EOM_
396: );
397:
1.1.1.3 root 398: config_item("monitor-rate = <i>integer</i>", <<<_EOM_
399: テキスト系モニタウィンドウの更新頻度を Hz 単位で指定します。
400: 1 から 60 までの間で指定でき、デフォルトは 20Hz です。
401: 起動後にメニューからプリセットされた頻度には変更可能です。
402: <q>Specifies refresh rate of all text monitor windows in Hz.
403: It ranges from 1 to 60. The default is 20Hz.
404: You can change this value on GUI menu after boot,
405: but unlike this configuration value, there are only a few preset choices.
406: </q>
407: _EOM_
408: );
409:
1.1 root 410: config_item("mpu-clock = <i>value</i>", <<<_EOM_
411: MPU のクロック数を MHz 単位で指定します。
1.1.1.5 ! root 412: デフォルトは LUNA-I なら 20MHz、LUNA88K なら 25MHz です。
! 413: <q>Specifies the MPU clock in MHz.
! 414: The default value is 20MHz on LUNA-I, or 25MHz on LUNA88K.</q>
1.1 root 415: _EOM_
416: );
417:
418: /* luna には不要
419: config_item("mpu-has-fpu", ""); */
420:
1.1.1.2 root 421: config_item("prom-image = <i>path</i>", <<<_EOM_
1.1.1.4 root 422: LUNA-I/LUNA88K の外部 ROM イメージファイルのパスを指定します。
1.1.1.2 root 423: <i>path</i> がファイル名のみなら VM ディレクトリとその親ディレクトリからこのファイル名を検索します。
424: <i>path</i> が相対パスなら VM ディレクトリからの相対パスになります (現在のディレクトリからではありません)。
425: 空にすると内蔵 ROM を使用します。
426: デフォルトは空です。
1.1.1.4 root 427: <q>Specifies the LUNA-I/LUNA88K's external ROM image file path.
1.1.1.2 root 428: If the <i>path</i> does not have any path delimiters,
429: the VM directory and then its parent directory will be searched.
430: If the <i>path</i> is a relative path,
431: it will be path from the VM directory, not from the current
432: directory.
433: If the <i>path</i> is empty, internal emulated ROM will be used.
434: The default value is empty.</q>
1.1 root 435: <p>
1.1.1.2 root 436: 実機を持っていない場合はこの値を空に (= デフォルトのままに) しておくと、
1.1.1.4 root 437: nono 内蔵のなんちゃって下位互換 ROM で起動します(現状 LUNA-I のみ)。
1.1.1.2 root 438: <q>If you does not have the real LUNA machines,
439: you can boot with nono's internal downward compatible emulated ROM
1.1.1.4 root 440: if you set this field empty (or leave it as the default).
441: For now, it's only for LUNA-I.
442: </q>
1.1 root 443: <p>
1.1.1.4 root 444: LUNA-I 実機を持っている場合は
445: ROM ファイルを指定することで実機 ROM で起動できます。
1.1.1.2 root 446: ROM ファイルは実機の 0x41000000-0x4101ffff (128KB) を保存したものです。
1.1.1.3 root 447: 今のところ ROM は V4.22 (Thu Jul 27 11:45:42 1989) のみサポートしています。
448: それ以外については何も分かりません。
1.1.1.4 root 449: <q>If you have the real LUNA-I machine,
1.1.1.2 root 450: you can boot with the real ROM spcifying the ROM file path.
1.1.1.4 root 451: The ROM file is extracted from 0x41000000-0x4101ffff (128KB) of
452: the real LUNA-I machine.
1.1.1.3 root 453: For now, only V4.22 (Thu Jul 27 11:45:42 1989) is supported.
454: I have no idea about other ROMs.
455: </q>
1.1.1.4 root 456: <p>
457: LUNA88K 実機の場合は 0x41000000-0x4103ffff (256KB) を保存したものです。
458: ただし現状サポートしていません。
459: <q>
460: For LUNA88K,
461: the ROM file is extracted from 0x41000000-0x4103ffff (256KB).
462: However, it's not supported yet.
463: </q>
1.1.1.2 root 464: _EOM_
465: );
466:
1.1.1.3 root 467: config_item("ram-size = <i>integer</i>", <<<_EOM_
1.1.1.2 root 468: 搭載する RAM サイズを MB 単位で指定します。
1.1.1.5 ! root 469: デフォルトは LUNA-I は 16MB、LUNA88K は 64MB です。
! 470: まだたぶん変更できません。
! 471: <q>Specifies the RAM size in MB.
! 472: The default is 16MB on LUNA-I or 64MB on LUNA88K.
! 473: Not supported yet.</q>
1.1 root 474: _EOM_
475: );
476:
477: config_item("spc0-id<i>N</i>-image = <i>devtype</i>,<i>path</i>", <<<_EOM_
478: SCSI デバイスを指定します。<i>N</i> には 0 から 7 が入ります。
479: ID 7 は本体が使用しますので指定しないでください。
480: 値はデバイス種別 <i>devtype</i> とイメージパス <i>path</i>
481: を "<tt>,</tt>"(カンマ) で区切って並べた形式で、
482: 今の所デバイス種別 <i>devtype</i> には "<tt>hd</tt>"(ハードディスク) のみ指定可能です。
483: ディスクイメージパスが相対パスなら VM ディレクトリからの相対パスになります。
1.1.1.2 root 484: <q>
485: Specifies SCSI device. <i>N</i> is 0 to 7.
486: But don't specify ID 7 because the host uses it.
487: The value is in a form of device type <i>devtype</i> and
488: the image path <i>path</i> separated by "<tt>,</tt>"(comma).
489: For now, only "<tt>hd</tt>" (hard disk) can be specified for <i>devtype</i>.
490: If the <i>path</i> is relative path, it is from the VM directory.
491: </q>
492:
1.1 root 493: <p>
494: 例えば、nono.cfg と同じディレクトリに置いたディスクイメージ luna.img
495: を使う場合、
1.1.1.5 ! root 496: LUNA-I では通常 ID 6 をプライマリ HDD に割り当てるのでこんな感じになります。
1.1.1.2 root 497: <q>For example, if you use disk image luna.img placed in the same
498: directory as nono.cfg,
1.1.1.5 ! root 499: since LUNA-I usually assigns ID 6 to the primary HDD,
1.1.1.2 root 500: write as following:</q>
1.1 root 501: <blockquote><pre>
502: spc0-id6-image = hd,luna.img
503: </pre></blockquote>
504: _EOM_
505: );
506:
1.1.1.4 root 507: config_item("spc0-id<i>N</i>-seektime = <i>integer</i>", <<<_EOM_
508: 指定の SCSI HDD の平均シークタイムを msec 単位で指定します。
509: 現在のデフォルトは <tt>0</tt> です (S・S・D!! S・S・D!!)。
510: 16 程度を指定すると幾分往時に思いを馳せることが出来るかもしれませんが、
511: 今の所あまり安定していません。
512: <q>Specifies the average seek time of specified SCSI HDD in msec.
513: Currently, the default value is <tt>0</tt>
514: (This may be something like SSD :-).
515: If you specify about 16 or so, you can feel nostalgic,
516: but this feature is still unstable.
517: </q>
518: _EOM_
519: );
520:
1.1 root 521: config_item("spc0-id<i>N</i>-writeprotect = <i>integer</i>", <<<_EOM_
522: 指定の SCSI デバイスへの書き込みを無視するかどうか指定します。
523: <tt>0</tt> なら通常動作(書き込みを行う)です。
524: <tt>1</tt> なら書き込みコマンドは成功したように振る舞いますが実際には
525: ディスクイメージに一切書き戻しません。
526: fsck を気にせずカーネルのデバッグとかを行いたい場合にはどうぞ。
527: 何が起きるか意味が分からない人は指定しないでください。
528: デフォルトは <tt>0</tt> です。
1.1.1.2 root 529: <q>Specifies whether nono ignores writing to SCSI devices.
530: <tt>0</tt> means normal operation (writes to the devices).
531: If <tt>1</tt> is specified,
532: nono will not actually write back to the disk image
533: even though the write command is succeeded.
534: nono's SCSI devices acts as
535: write command is successfully done but it never writes back
536: to the actual disk image.
537: This is useful for kernel debugging because it does not require fsck
538: after the kernel hangs.
539: But don't use this flag if you don't understand this paragraph.
540: The default value is <tt>0</tt>.
541: </q>
1.1 root 542: _EOM_
543: );
544:
545:
546: ?>
547: </dl>
548: </div>
549:
550:
551: <h4>実行してみる <q>Try it</q></h4>
552: <div class="main">
1.1.1.2 root 553: つついさんが NetBSD/luna68k 9.0 の liveimage を用意してくださっています
554: (いつもありがとうございます)。
555: <q>Tsutsui-san has provided NetBSD/luna68k 9.0 liveimage for this
556: (Thanks as always).</q>
557: <br>
558: <ol>
559: <li>どこかに nono 用のディレクトリを用意し(例えば ~/nono/)、
1.1 root 560: その中に VM ディレクトリを用意します (例えば ~/nono/luna/)。
1.1.1.3 root 561: <q>Create a directory somewhere for nono (for example ~/nono/),
1.1.1.2 root 562: and create subdirectory for individual VMs in it (for example ~/nono/luna).</q>
1.1 root 563:
1.1.1.3 root 564: <li>以下のリンクからイメージファイルをダウンロードして展開し、
1.1.1.2 root 565: VM ディレクトリ ~/nono/luna/ に置きます。
1.1.1.3 root 566: <q>Download imagefile from the following link,
1.1.1.2 root 567: extract it and place it in the VM directory, ~/nono/luna.</q>
1.1.1.3 root 568: <blockquote>
569: <a href="http://teokurebsd.org/netbsd/liveimage/20200518-luna68k/"
570: >http://teokurebsd.org/netbsd/liveimage/20200518-luna68k/</a>
571: </blockquote>
1.1.1.2 root 572:
573: <li>同じく VM ディレクトリに設定ファイル nono.cfg を以下の内容で用意します。
574: <q>Create a configuration file nono.cfg in the same VM directory, ~/nono/luna,
575: with following contents:</q>
576: <blockquote class="file"><pre>
577: vmtype = luna
578: spc0-id6-image = hd,liveimage-luna68k-raw-20200518.img
579: </pre></blockquote>
580: <li><tt>nono -c ~/nono/luna</tt> で起動します
581: (VM ディレクトリに自動的に NVRAM.DAT が作られます)。
582: <q>Run as <tt>nono -c ~/nono/luna</tt>.
1.1.1.4 root 583: (NVRAM.DAT will be created automatically in the VM directory)</q>
1.1.1.2 root 584: <li>Emulated ROM Monitor が起動するので、
585: 初回は以下のように入力すると NetBSD が起動します。
586: <q>The emulated ROM Monitor will be executed.
587: Then, only for the first time,
588: entering the following can boot NetBSD.</q>
589: <blockquote class="file"><pre>
590: k
591: [Enter]
592: [Enter]
593: d
594: boot
595: g
596: x
597: </pre></blockquote>
598: この内容は NVRAM.DAT に記録されているので次回以降は直接 NetBSD が起動します。
599: <q>The information you have just entered is recorded in NVRAM,
600: so next time it boots NetBSD automatically.</q>
601: </ol>
602: <p>
603: <a href="https://twitter.com/tsutsuii/status/1262429647364427783"
604: >元ツイートはこちら<q>Original tweet</q></a>。
1.1 root 605: </div>
606:
607:
608: <h4>ネットワーク設定 <q>Setup network</q></h4>
609: <div class=main>
1.1.1.2 root 610: 設定ファイル nono.cfg に以下の行を追加します。
611: <q>Add the following line to configuration file, nono.cfg.</q>
1.1 root 612: <blockquote class="file"><pre>
613: ethernet-hostdriver = tap
614: </pre></blockquote>
1.1.1.2 root 615: 次に VM ディレクトリかその親ディレクトリに nono-ifup、nono-ifdown
616: というスクリプトを用意します。
1.1 root 617: nono は tap(4) をオープンし、
618: そのデバイス名を引数にこれらのスクリプトを呼びます。
1.1.1.2 root 619: <q>Then, prepare two scripts named nono-ifup and nono-ifdown
620: in the VM directory or its parent directory.
621: nono will open tap(4) and
622: invoke these scripts with the name of the device as an argument.</q>
1.1 root 623: <p>
1.1.1.5 ! root 624: 例えば、NetBSD ホストで、ホストの wm0 セグメントに nono のゲスト OS を接続する場合、
! 625: <q>For example, if you want to connect guest OS to host's wm0 segment
! 626: on NetBSD,</q>
! 627: <ol>
! 628: <li>デフォルトでは /dev/tap は一般ユーザからアクセスできないので、
! 629: chmod で適当にパーミッションを与えます。
! 630: 番号の付いていないほうの /dev/tap だけでいいです。
! 631: <q>By default, /dev/tap is only accessible to privileged user.
! 632: You need to chmod /dev/tap (without unit number) appropriately.</q>
! 633: sysinst 等で OS をアップグレードするとパーミッションが 600
! 634: に戻るのがハマりポイントです。
! 635:
! 636: <li>bridge(4) インタフェースを作成し、
! 637: ホストの外側のインタフェースをブリッジに追加しておきます。
! 638: <q>Create a bridge(4) interface, and
! 639: add your physical interface to the bridge.</q>
1.1 root 640: <blockquote class="cons"><pre>
1.1.1.5 ! root 641: # ifconfig bridge0 create
1.1 root 642: # brconfig bridge0 add wm0
643: </pre></blockquote>
1.1.1.5 ! root 644: 常用するなら設定ファイルに書いておきましょう。
! 645: <q>If you want to use this all the time,
! 646: you can put configuration file into /etc.</q>
! 647: <blockquote>
! 648: /etc/ifconfig.bridge0
! 649: <pre class=file>
! 650: create
! 651: up
! 652: !/sbin/brconfig $int add wm0
! 653: </pre>
! 654: <pre class=cons>
! 655: # /etc/rc.d/network restart
! 656: </pre>
! 657: </blockquote>
! 658:
! 659: <li>
! 660: 一般ユーザに戻って、
! 661: VM ディレクトリかその親ディレクトリに
! 662: 次のような 2つのスクリプトを用意します。
! 663: sudo の設定は別途行ってください。
! 664: <q>Return to non-privileged user, and
! 665: create following two scripts in the VM directory or its parent directory.
! 666: In addition, you need to set up sudo separately.</q>
1.1 root 667: <blockquote>
668: nono-ifup
669: <pre class=file>
670: #!/bin/sh
1.1.1.5 ! root 671: sudo /sbin/ifconfig $1 up
! 672: sudo /sbin/brconfig bridge0 add $1
1.1 root 673: </pre></blockquote>
674:
675: <blockquote>
1.1.1.5 ! root 676: nono-ifdown
1.1 root 677: <pre class=file>
678: #!/bin/sh
1.1.1.5 ! root 679: sudo /sbin/brconfig bridge0 delete $1
! 680: sudo /sbin/ifconfig $1 down
! 681: </pre></blockquote>
! 682:
! 683: <blockquote class="cons"><pre>
! 684: % chmod +x nono-ifup nono-ifdown
1.1 root 685: </pre></blockquote>
686:
1.1.1.5 ! root 687: <li>nono を起動し、
! 688: メニューの「モニタ > ホスト > ホストネットワーク」を開いて
! 689: NetDriver が None 以外 (この場合 BSD tap) になっていれば動いてるはずです。
! 690: <q>Run nono,
! 691: and open "Monitor > Host > Host Network" window from menu.
! 692: It's OK if you can see "NetDriver: BSD tap" (in this case).</q>
! 693:
! 694: </ol>
! 695:
1.1 root 696: </div>
697:
698:
1.1.1.2 root 699: <h4>変更履歴 <q>Changes</q></h4>
700: <div class="main">
701: See <a href="changes.html">changes.html</a>.
702: </div>
703:
704:
705: <h4>ライセンス <q>License</q></h4>
706: <div class="main">
707: See <a href="nono-license.txt">nono-license.txt</a>.
708: </div>
709:
710:
1.1.1.4 root 711: <h4>連絡先 <q>Contact us</q></h4>
712: <div class="main">
713: バグ報告などは以下にお願いします。日本語でおk。
714: <q>If you find any problems, please let me know.
715: You may write in English.</q><br>
716: <a href="https://github.com/isaki68k/nono-issue/issues"
717: >https://github.com/isaki68k/nono-issue/issues</a>
718: </div>
719:
720:
1.1.1.2 root 721: <h4>パッチの提供について <q>About contributes</q></h4>
722: <div class="main">
723: パッチを提供してくださる場合は以下に同意したものとします。
724: <q>If you provide a patch to nono, you must agree to the following conditions:
725: </q>
726: <ul>
727: <li>成果物が nono のライセンスに従って運用あるいは配布されること。
728: <q>All your work are operated or distributed under the nono license.</q>
729: <li>ライセンスが将来変わる可能性があること。
730: <q>The license may be changed in the future.</q>
731: <li>著作部分に関して著作者人格権を行使しないこと。
732: <q>Do not exercise your author's rights.</q>
733: </ul>
734: <ul>
735: </div>
736:
737:
738: <h4>Acknowledgements</h4>
739: <div class="main">
740: nono は以下の広告条項を含むソースコードを利用しています。
741: <q>nono uses source code with the following advertising clause.</q>
742: <blockquote>
743: This product includes software developed by Gordon Ross<br>
744: This product includes software developed by the University of California, Lawrence Berkeley Laboratory.<br>
745: </blockquote>
746: </div>
747:
1.1 root 748:
749: <hr>
1.1.1.2 root 750: nono project
1.1 root 751: </body>
752: </html>
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.