- Subject: [pbsd-mg2] Vadem CLIO
- From: Warner Losh <imp@village.org>
- To: pbsd-mg <pbsd-mg2@bronze.is.titech.ac.jp>
- Reply-To: pbsd-mg2@bronze.is.titech.ac.jp
- Date: Sat, 17 Jul 1999 02:46:18 -0600
- Message-Id: <199907170846.CAA59356@harmony.village.org>
- Delivered-To: takesi-pbsd-mg2-dist@bronze.is.titech.ac.jp
- Delivered-To: pbsd-mg2-dist@bronze.is.titech.ac.jp
- Delivered-To: pbsd-mg2@bronze.is.titech.ac.jp
ワーナーです。
私はVademのCLIOを立ち上げれましたが、root promptが最後のです。vrkiu.c
のkeytransをパッチします。パッチがですが、より汎用のコードがすろ、
でしょう。
I've managed to boot the Vadem CLIO to the root partition prompt. I
patched the keytrans table. Here are my changes. I think a more
generic way of doing this is desired.
Warner
ワーナー
Index: vrkiu.c
===================================================================
RCS file: /cvs/jproot//hpcmips/sys/arch/hpcmips/vr/vrkiu.c,v
retrieving revision 1.3
diff -u -r1.3 vrkiu.c
--- vrkiu.c 1999/07/04 14:08:17 1.3
+++ vrkiu.c 1999/07/17 08:26:47
@@ -52,6 +52,7 @@
/* XXX: This tranlation table may depend on each machine.
Should I build it in? */
+#ifdef STANDARD
static char keytrans[] = {
-1, 28, 25, 52, 21, 48, 44, 57, /* - enter p . y b z space */
-1, 53, 24, 51, 20, 47, 30, -1, /* - / o , t v a - */
@@ -66,6 +67,22 @@
-1, -1, 29, -1, 68, -1, 64, 60, /* - - ctrl - f10 - f6 f2 */
-1, -1, -1, 42, -1, 67, 63, 1, /* - - - shift - f9 f5 esc */
};
+#else
+static char keytrans[] = {
+ 42, 15, 41, 16, 1, 2, 104, -1, /* lsh tab ` q esc 1 WIN - */
+ 58, 44, 45, 30, 31, 17, 18, 3, /* ctrl z x a s w e 2 */
+ 56, 57, 46, 47, 32, 33, 19, 4, /* lalt sp c v d f r 3 */
+ 48, 49, 34, 35, 20, 21, 5, 6, /* b n g h t y 4 5 */
+ 50, 51, 36, 37, 22, 23, 7, 8, /* m , j k u i 6 7 */
+ 105, 29, 38, 24, 25, 9, 10, 11, /* Fn caps l o p 8 9 0 */
+ 26, 27, 102, 52, 53, 39, 12, 13, /* [ ] dar , / ; \- = */
+ 54, 103, 100, 102, 39, 28, 43, 14, /* rsh - - uar - ; ent \ del */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* - - - - - - - - */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* - - - - - - - - */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* - - - - - - - - */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* - - - - - - - - */
+};
+#endif
/* XXX: fill the field of funct. keys, ex. arrow, fnc, nfer... */
#define SCROLL 0x0001 /* stop output */
@@ -204,12 +221,12 @@
{ NONE, "", "", "" }, /* 97 0 */
{ NONE, "", "", "" }, /* 98 0 */
{ NONE, "", "", "" }, /* 99 0 */
- { NONE, "", "", "" }, /* 100 */
- { NONE, "", "", "" }, /* 101 */
- { NONE, "", "", "" }, /* 102 */
- { NONE, "", "", "" }, /* 103 */
- { NONE, "", "", "" }, /* 104 */
- { NONE, "", "", "" }, /* 105 */
+ { FUNC, "\033[A", "\033[A", "\033[A" }, /* 100 uar */
+ { FUNC, "\033[C", "\033[C", "\033[C" }, /* 101 lar */
+ { FUNC, "\033[B", "\033[B", "\033[B" }, /* 102 rar */
+ { FUNC, "\033[D", "\033[D", "\033[D" }, /* 103 dar */
+ { NONE, "", "", "" }, /* 104 win */
+ { NONE, "", "", "" }, /* 105 Fn */
{ NONE, "", "", "" }, /* 106 */
{ NONE, "", "", "" }, /* 107 */
{ NONE, "", "", "" }, /* 108 */
@@ -332,7 +349,10 @@
}
k ^= 1 << n;
m = n + i * 16;
- if (keytrans[m] < 0) continue;
+ if (keytrans[m] < 0) {
+ printf("UNKOWN SCAN 0x%02x\n", m);
+ continue;
+ }
/* XXX: scanbuf may overflow! */
process_key(sc, keytrans[m],