[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: USB Keyboard



Dave Matlock wrote:
> I am having issues getting a USB Keyboard to work with the devboard82.  I need to have the text appear on the console (com1).  I have enabled the following settings in xconfig:
> 
> Input Core Support
> Keyboard Support
> USB Full HID Support
> HID Input Layer Support
> 
> When I 'make kernel' I get the following:
> 
> make[2]: Leaving directory `/home/dave/axis/devboard_82/os/linux-2.4.20/arch/cris/boot/rescue'
> if [ ! -e /home/dave/axis/devboard_82/os/linux-2.4.20/arch/cris/cris.ld.tmp -o /home/dave/axis/devboard_82/os/linux-2.4.20/arch/cris/cris.ld -nt /home/dave/axis/devboard_82/os/linux-2.4.20/arch/cris/cris.ld.tmp ]; then sed -e s/@xxxxxxx.o \
>         --start-group \
>         kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o arch/cris/kernel/kernel.o arch/cris/mm/mm.o \
>          drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/mtd/mtdlink.o drivers/usb/usbdrv.o drivers/input/inputdrv.o arch/cris/drivers/drivers.o \
>         net/network.o \
>         /home/dave/axis/devboard_82/os/linux-2.4.20/arch/cris/lib/lib.a /home/dave/axis/devboard_82/os/linux-2.4.20/lib/lib.a /home/dave/axis/devboard_82/os/linux-2.4.20/arch/cris/lib/lib.a /usr/local/cris/lib/gcc-lib/cris/2.96/linux/libgcc.a \
>         --end-group \
>         -o vmlinux
> drivers/input/inputdrv.o: In function `emulate_raw':
> drivers/input/inputdrv.o(.text+0x7be): undefined reference to `handle_scancode'
> drivers/input/inputdrv.o(.text+0x7f8): undefined reference to `handle_scancode'
> drivers/input/inputdrv.o(.text+0x812): undefined reference to `handle_scancode'
> drivers/input/inputdrv.o(.text+0x822): undefined reference to `handle_scancode'
> drivers/input/inputdrv.o: In function `keybdev_event':
> drivers/input/inputdrv.o(.text+0x8ec): undefined reference to `keyboard_tasklet'
> drivers/input/inputdrv.o(.text+0x8f8): undefined reference to `keyboard_tasklet'
> drivers/input/inputdrv.o(.text+0x908): undefined reference to `keyboard_tasklet'
> drivers/input/inputdrv.o: In function `keybdev_init':
> drivers/input/inputdrv.o(.text.init+0x50): undefined reference to `kbd_ledfunc'
> make[1]: *** [vmlinux] Error 1
> make[1]: Leaving directory `/home/dave/axis/devboard_82/os/linux-2.4.20'
> make: *** [kernel] Error 2

The function handle_scancode lives in keyboard.c which is built only if 
CONFIG_PCI is enabled (check drivers/char/Makefile).  Adding it to the 
makefile will give you some more undefined references, due to pc_keyb.c 
not being built.  You can quickly see where this is heading.  Simply 
adding random files to drivers/char/Makefile will probably not produce a 
working system.

I would either either try and understand the input/keyboard/terminal 
layer to know what functions need to be intercepted 
(http://mhonarc.axis.se/dev-etrax/msg03342.html seemed to provide some 
pointers for that), or search the linux-usb-devel, linux-usb-users 
(www.linux-usb.org) archives.  I'm sure someone has connected a USB 
keyboard to an embedded device before.

I'm not sure I understand what you want to do with the data from the 
keyboard though.  Do you simply want to write it to a serial port, or as 
a means to logging onto the board?

-- 
Orjan Friberg
Axis Communications