Skip to contentSkip to conversation

keymap support for PVFB

PATCH New Kasai Takanori 1 participant 4 messages Jan 19, 2007

lore
Share & tools
lore
#0 lore raw

cover keymap support for PVFB

Hi All

Currently, Paravirtualized frame buffer is supporting only US keymap.

We made patches to support several keymaps for Paravirtualized frame buffer, which uses QEMU's keymap.

After QEMU is compiled, it is necessary to compile PVFB. Therefore, the compilation order was changed.

Keyboard layout of PVFB is specified with configuration file. When nothing is specified, it is en-us keyboard layout.

It is as follows. ---------------------------
keymap = "ja"
---------------------------

keyboard layout that can be selected is the same as QEMU. ・/tools/ioemu/keymaps/*

[1/3] keymap support for PVFB.
[2/3] build order change for keyboard selection of PVFB. [3/3] select keyboard layout for PVFB.

Best Regards,

--
Takanori Kasai

#1 lore raw

PATCH 1/3 keymap support for PVFB

Hi All,

This patch is keyboard support of PVFB.

Conversion to the scan code uses QEMU's function. Moreover, keyboard support for PVFB uses QEMU's keymaps. ・/tools/ioemu/keymaps/*
Keyboard layout of default is en-us.

Best Regards,

--
Takanori Kasai

# HG changeset patch
# User [email protected]
# Date 1169180428 -32400
# Node ID 7ba2de30a05b0c70082fa286a7d151a7f040668a # Parent 8e79d8d87ecd371c3b1881be1fcdccfcdcf50b22 keymap support for vncfb

tools/xenfb/Makefile +1 -1
diff -r 8e79d8d87ecd -r 7ba2de30a05b tools/xenfb/Makefile
@@ -1,7 +1,7 @@ XEN_ROOT=../..
 XEN_ROOT=../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-CFLAGS += -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_ROOT)/linux-2.6-xen-sparse/include
+CFLAGS += -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_ROOT)/linux-2.6-xen-sparse/include -I$(XEN_ROOT)/tools/ioemu
 LDFLAGS += -L$(XEN_LIBXC) -L$(XEN_XENSTORE)
 
 INSTALL         = install
tools/xenfb/vncfb.c +74 -142

264 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

PATCH 2/3 build order change for keyboard selection of PVFB

In reply to Kasai Takanori

Hi All,

This patch changes the compilation order. Because after QEMU is compiled, it is necessary to compile PVFB.

Best Regards,

--
Takanori Kasai

# HG changeset patch
# User [email protected]
# Date 1169180539 -32400
# Node ID 8724b8168ee367546621b417b41543e7602cbedc # Parent 7ba2de30a05b0c70082fa286a7d151a7f040668a compilation order change for keyboard selection of PVFB.

tools/Makefile +11 -1
diff -r 7ba2de30a05b -r 8724b8168ee3 tools/Makefile
@@ -19,8 +19,9 @@ SUBDIRS-y += libaio
 SUBDIRS-y += libaio
 SUBDIRS-y += blktap
 SUBDIRS-y += libfsimage
-SUBDIRS-$(XENFB_TOOLS) += xenfb
 SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
+
+POST_SUBDIRS-$(XENFB_TOOLS) += xenfb
 
 # These don't cross-compile
 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
@@ -34,6 +35,9 @@ all: check
 		$(MAKE) -C $$subdir $@; \
 	done
 	$(MAKE) ioemu
+	@set -e; for subdir in $(POST_SUBDIRS-y); do \
+		$(MAKE) -C $$subdir $@; \
+	done
 
 .PHONY: install
 install: check
@@ -41,6 +45,9 @@ install: check
 		$(MAKE) -C $$subdir $@; \
 	done
 	$(MAKE) ioemuinstall
+	@set -e; for subdir in $(POST_SUBDIRS-y); do \
+		$(MAKE) -C $$subdir $@; \
+	done
 	$(INSTALL_DIR) -p $(DESTDIR)/var/xen/dump
 	$(INSTALL_DIR) -p $(DESTDIR)/var/log/xen
 
@@ -50,6 +57,9 @@ clean: check_clean
 		$(MAKE) -C $$subdir $@; \
 	done
 	$(MAKE) ioemuclean
+	@set -e; for subdir in $(POST_SUBDIRS-y); do \
+		$(MAKE) -C $$subdir $@; \
+	done
 
 .PHONY: distclean
 distclean: clean

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw

PATCH 3/3 select keyboard layout for PVFB

In reply to Kasai Takanori

Hi All,

This patch sets keyboard layout of PVFB from configuration file.

It is as follows. ---------------------------
keymap = "ja"
---------------------------

When nothing is specified, it is not passed to xen-vncfb. Keyboard layout of default is en-us.

Best Regards,

--
Takanori Kasai

# HG changeset patch
# User [email protected]
# Date 1169180735 -32400
# Node ID 78696bfc0634e47e0ac0f198e410f0f28c6c5d1b # Parent 8724b8168ee367546621b417b41543e7602cbedc Select keyboard layout for PVFB

tools/python/xen/xend/server/vfbif.py +3 -1
diff -r 8724b8168ee3 -r 78696bfc0634 tools/python/xen/xend/server/vfbif.py
@@ -14,7 +14,7 @@ def spawn_detached(path, args, env):
         os.waitpid(p, 0)
         
 CONFIG_ENTRIES = ['type', 'vncdisplay', 'vnclisten', 'vncpasswd', 'vncunused',
-                  'display', 'xauthority']
+                  'display', 'xauthority', 'keymap' ]
 
 class VfbifController(DevController):
     """Virtual frame buffer controller. Handles all vfb devices for a domain.
@@ -68,6 +68,8 @@ class VfbifController(DevController):
             vnclisten = config.get("vnclisten",
                                    xen.xend.XendRoot.instance().get_vnclisten_address())
             args += [ "--listen", vnclisten ]
+            if config.has_key("keymap"):
+                args += ["-k", "%s" % config["keymap"]]
             spawn_detached(args[0], args + std_args, os.environ)
         elif t == "sdl":
             args = [xen.util.auxbin.pathTo("xen-sdlfb")]
tools/python/xen/xm/create.py +3 -0
diff -r 8724b8168ee3 -r 78696bfc0634 tools/python/xen/xm/create.py
@@ -589,6 +589,9 @@ def configure_vfbs(config_devs, vals):
                           'xauthority', 'type', 'vncpasswd' ]:
                 err("configuration option %s unknown to vfbs" % k)
             config.append([k,v])
+        for n in iter(dir(vals)):
+            if n == "keymap":
+               config.append(['keymap',vals.keymap])
         if not d.has_key("display") and os.environ.has_key("DISPLAY"):
             config.append(["display", os.environ['DISPLAY']])
         if not d.has_key("xauthority"):

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel