On Wed, 2007-05-30 18:25:46 +0100, Maciej W. Rozycki <macro@linux-mips.org>
wrote:
> On Wed, 30 May 2007, Jan Rekorajski wrote:
> > Any chance to get LK201/401 keyboard and vsxxxaa mouse working with this?
>
> For the time being a solution is the patch below and then:
>
> CONFIG_INPUT=y
> CONFIG_INPUT_KEYBOARD=y
> CONFIG_KEYBOARD_LKKBD=y
> CONFIG_INPUT_MOUSE=y
> CONFIG_MOUSE_VSXXXAA=y
> CONFIG_SERIO=y
> CONFIG_SERIO_SERPORT=y
> CONFIG_VT=y
> CONFIG_VT_CONSOLE=y
> CONFIG_HW_CONSOLE=y
> CONFIG_VT_HW_CONSOLE_BINDING=y
>
> plus your framebuffer of choice. To activate the keyboard you have to run
> the following program:
>
> #include <fcntl.h>
> #include <sys/ioctl.h>
> #include <unistd.h>
>
> #define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
> #define SERIO_LKKBD 0x28
>
> int main(void)
> {
> int fd, ldisc = N_MOUSE, type = SERIO_LKKBD;
> char buf;
>
> fd = open("/dev/ttyS2", O_RDWR | O_NONBLOCK);
> ioctl(fd, TIOCSETD, &ldisc);
> ioctl(fd, SPIOCSTYPE, &type);
> read(fd, &buf, 1);
> close(fd);
>
> return 0;
> }
Another way would be to use the `inputattach' program, which is
shipped with the `joystick' package (sic) and also does line speed
setting etc. for you.
MfG, JBG
> I am looking into a solution that would make it automatic without the
> need of involving userland which just does not seem right here -- you do
> want to run your kernel with "init=/bin/bash" or suchlike and have your
> virtual terminal console usable. I will remove the old lk201 bits then.
IIRC the serial port needs to register a serio device, set correct
baud/cstopb/... settings and set VSXXXAA/LKKBD identity on the two
serio ports. I *hope* the rest happens automatically then. (Another
way would be to look into how the Sun guys get their keyboards
up'n'running...)
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481
Signature of: 23:53 <@jbglaw> So, ich kletter' jetzt mal ins Bett.
the second : 23:57 <@jever2> .oO( kletter ..., hat er noch Gitter vorm Bett,
wie früher meine Kinder?)
00:00 <@jbglaw> jever2: *patsch*
00:01 <@jever2> *aua*, wofür, Gedanken sind frei!
00:02 <@jbglaw> Nee, freie Gedanken, die sind seit 1984 doch aus!
00:03 <@jever2> 1984? ich bin erst seit 1985 verheiratet!
signature.asc
Description: Digital signature
|