Re: kbd-chooser for DECstation machines
Moin!
Thiemo Seufer wrote:
> Martin Schulze wrote:
> [snip]
> > > We could simply declare no preferred keyboard for the mipsel
> > > architecture (beware, there's __mips__ for both mips and mipsel, and
> > > __MIPSEL__ for only mipsel). This would require the dialog to be
> > > displayed, though, for the user to be able to select the keyboard
> > > type. Since it is of medium priority and only high priority dialogs
> > > are displayed, this may not be sufficient.
> >
> > Changing this for DECstation machines should fixed with the attached patch.
> Content-Description: Change kbd default type on DECstation boxes
> > --- orig/kbd-chooser-1.02/dec-kbd.c 2004-04-01 23:42:22.000000000 +0200
> > +++ kbd-chooser-1.02/dec-kbd.c 2004-09-30 21:26:04.000000000 +0200
> > @@ -28,5 +28,14 @@ kbd_t *dec_kbd_get (kbd_t *keyboards, co
> > k->next = keyboards;
> > keyboards = k;
> >
> > +#if defined(__mipsel___)
>
> Does this really work? __mipsel__ is not a predefined gcc macro, neither
> with two nor with three trailing underscores (__MIPSEL__ would be).
Honestly, I don't know and I went with __MIPSEL__ first, but __mipsel___
is used already in at-kbd.c and usb-kbd.c, so I guess that it works.
On the other hand, looking at the code, I just came to the conclusion
that it doesn't work indeed, which is why AT keybards can be selected
at all. Thanks for the hint. So __mipsel__ should be changed to
__MIPSEL__ (first patch)
> > + // /proc must be mounted by this point
> > + // assert (check_dir ("/proc") == 1);
> > +
> > + if (check_dir ("/proc")) {
> > + if ((grep ("/proc/cpuinfo","DECstation ") == 0))
>
> This doesn't match "DECsystem" and a host of other machines detected by
> archdetect. It's probably better to (re-)use the archdetect values
> like "mipsel/r4k-kn04" instead. Archdetect is always available in the
> d-i initrd.
Good. A second shot is the patch against dec-kbd.c which is also attached,
but it may not be needed anymore if AT and USB will be ruled out by the
correct define check.
Regards,
Joey
--
Life is a lot easier when you have someone to share it with. -- Sean Perry
Please always Cc to me when replying to me on the lists.
diff -u -p orig/kbd-chooser-1.02/at-kbd.c kbd-chooser-1.02/at-kbd.c
--- orig/kbd-chooser-1.02/at-kbd.c 2004-05-17 22:50:03.000000000 +0200
+++ kbd-chooser-1.02/at-kbd.c 2004-10-01 09:04:08.000000000 +0200
@@ -33,7 +33,7 @@ kbd_t *at_kbd_get (kbd_t *keyboards, con
(strstr(subarch, "chrp") == NULL))
return keyboards;
#endif
-#if defined(__mipsel__)
+#if defined(__MIPSEL__)
// DECstations do not have AT keyboards
if (strstr(subarch, "r3k-kn02") || strstr(subarch,"r4k-kn04"))
return keyboards;
Common subdirectories: orig/kbd-chooser-1.02/debian and kbd-chooser-1.02/debian
diff -u -p orig/kbd-chooser-1.02/usb-kbd.c kbd-chooser-1.02/usb-kbd.c
--- orig/kbd-chooser-1.02/usb-kbd.c 2004-05-17 22:50:03.000000000 +0200
+++ kbd-chooser-1.02/usb-kbd.c 2004-10-01 09:04:15.000000000 +0200
@@ -135,7 +135,7 @@ static void usb_parse_proc (kbd_t *keybo
kbd_t *usb_kbd_get (kbd_t *keyboards, const char *subarch)
{
-#if defined(__mipsel__)
+#if defined(__MIPSEL__)
// DECstations do not have USB keyboards
if (strstr(subarch, "r3k-kn02") || strstr(subarch,"r4k-kn04"))
return keyboards;
diff -u -p orig/kbd-chooser-1.02/dec-kbd.c kbd-chooser-1.02/dec-kbd.c
--- orig/kbd-chooser-1.02/dec-kbd.c 2004-04-01 23:42:22.000000000 +0200
+++ kbd-chooser-1.02/dec-kbd.c 2004-10-01 09:04:45.000000000 +0200
@@ -28,5 +28,9 @@ kbd_t *dec_kbd_get (kbd_t *keyboards, co
k->next = keyboards;
keyboards = k;
+#if defined(__mipsel___)
+ if (strstr(subarch, "r3k-kn02") || strstr(subarch,"r4k-kn04"))
+ k->present = TRUE;
+#endif
return keyboards;
}
Reply to: