Linux 如何将键盘连接到tinyX服务器

Linux 如何将键盘连接到tinyX服务器,linux,arm,buildroot,Linux,Arm,Buildroot,在buildroot的帮助下,我已经为我的arm开发板编译了根文件系统。我的rootfs包含TinyX服务器和匹配框作为窗口管理器。然后我通过下面的脚本启动了x服务器 导出显示=:0 X-wr-keybd键盘-鼠标和(TinyX) 火柴盒会话& 我面临的问题是TinyX服务器中的键盘不工作。 TinyX服务器正在生成以下错误消息 “驱动程序Linux控制台键盘想要在[0,0]之外发布扫描代码57!” 对于所有按键按下并释放。 但鼠标工作正常 有谁能给我一些解决这个问题的建议吗?Env:QEMU-

在buildroot的帮助下,我已经为我的arm开发板编译了根文件系统。我的rootfs包含TinyX服务器和匹配框作为窗口管理器。然后我通过下面的脚本启动了x服务器

导出显示=:0

X-wr-keybd键盘-鼠标和(TinyX)

火柴盒会话&

我面临的问题是TinyX服务器中的键盘不工作。 TinyX服务器正在生成以下错误消息 “驱动程序Linux控制台键盘想要在[0,0]之外发布扫描代码57!” 对于所有按键按下并释放。 但鼠标工作正常


有谁能给我一些解决这个问题的建议吗?

Env:QEMU-QEMU-system-arm版本1.2.0,在Ubuntu 12.10主机上。 来宾:内核3.2.21

仿真板:ARMv7l Verstatile Express

使用Buildroot版本12.08构建的支持X的根文件系统等;TinyX服务器

与qemu一起运行:

/usr/bin/qemu-system-arm -M vexpress-a9 -kernel <kernel> -drive file=<rootfs-ext2-img>,if=sd -append "console=ttyAMA0,115200 root=/dev/mmcblk0 init=/myinit.sh" -serial stdio -net nic,model=lan9118 -net user
然后加载xterm等

我使用一个简单的脚本,如下所示:

# cat Xstart.sh 
#!/bin/ash
unset USERNAME LOGNAME

echo Setting up X server ..
# kill any stale instance
kill $(ps |grep Xfb|head -n1|awk '{print $1}') 2> /dev/null
export DISPLAY=:0

# How to determine 'mouse' dev?
# dmesg shows :
# input: AT Raw Set 2 keyboard as /devices/mb:kmi0/serio0/input/input0
# input: ImExPS/2 Generic Explorer Mouse as /devices/mb:kmi1/serio1/input/input1
# QEMU_ARM_BR / # ls /sys//devices/mb:kmi1/serio1/input/input1
# capabilities/ id/           name          properties    uniq
# device@       modalias      phys          subsystem@
# event1/       mouse0/       power/        uevent
# Can see the only 'event' file is 'event1', so we use it!

Xfbdev :0 -keybd evdev,,device=/dev/input/event0 -mouse evdev,,device=/dev/input/event1 &

sleep 1
echo "Running fluxbox & xterm .."
DISPLAY=:0 xterm 2> /dev/null &
DISPLAY=:0 fluxbox 2> /dev/null &

echo "### Please wait a bit for X to initialize & come up ... ###"
sleep 3
echo "Press [Enter] to use this console..."
read

# 
注意关于如何确定鼠标、键盘设备的提示:查找dmesg输出

# cat Xstart.sh 
#!/bin/ash
unset USERNAME LOGNAME

echo Setting up X server ..
# kill any stale instance
kill $(ps |grep Xfb|head -n1|awk '{print $1}') 2> /dev/null
export DISPLAY=:0

# How to determine 'mouse' dev?
# dmesg shows :
# input: AT Raw Set 2 keyboard as /devices/mb:kmi0/serio0/input/input0
# input: ImExPS/2 Generic Explorer Mouse as /devices/mb:kmi1/serio1/input/input1
# QEMU_ARM_BR / # ls /sys//devices/mb:kmi1/serio1/input/input1
# capabilities/ id/           name          properties    uniq
# device@       modalias      phys          subsystem@
# event1/       mouse0/       power/        uevent
# Can see the only 'event' file is 'event1', so we use it!

Xfbdev :0 -keybd evdev,,device=/dev/input/event0 -mouse evdev,,device=/dev/input/event1 &

sleep 1
echo "Running fluxbox & xterm .."
DISPLAY=:0 xterm 2> /dev/null &
DISPLAY=:0 fluxbox 2> /dev/null &

echo "### Please wait a bit for X to initialize & come up ... ###"
sleep 3
echo "Press [Enter] to use this console..."
read

#