From abd60a84c2d943b84336d1835e9d71f408321735 Mon Sep 17 00:00:00 2001 From: Oliver Pinter Date: Sat, 1 Nov 2014 19:51:56 +0100 Subject: [PATCH 1/2] HBSD: allow to specify custom keymap to kbdmux Signed-off-by: Oliver Pinter --- sys/conf/files.amd64 | 5 +++++ sys/conf/options.amd64 | 2 ++ sys/dev/kbdmux/kbdmux.c | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 9e5a2ed..3ad7495 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -47,6 +47,11 @@ ukbdmap.h optional ukbd_dflt_keymap \ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" # +kbdmuxmap.h optional kbdmux_dflt_keymap \ + compile-with "/usr/sbin/kbdcontrol -L ${KBDMUX_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > kbdmuxmap.h" \ + no-obj no-implicit-rule before-depend \ + clean "kbdmuxmap.h" +# hpt27xx_lib.o optional hpt27xx \ dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index f1d4b4a..225a1bc 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -49,6 +49,8 @@ AGP_DEBUG opt_agp.h ATKBD_DFLT_KEYMAP opt_atkbd.h +KBDMUX_DFLT_KEYMAP opt_kbdmux.h + # ------------------------------- # EOF # ------------------------------- diff --git a/sys/dev/kbdmux/kbdmux.c b/sys/dev/kbdmux/kbdmux.c index a21b37c..a94f2b5 100644 --- a/sys/dev/kbdmux/kbdmux.c +++ b/sys/dev/kbdmux/kbdmux.c @@ -33,6 +33,7 @@ #include "opt_compat.h" #include "opt_kbd.h" +#include "opt_kbdmux.h" #include #include @@ -54,6 +55,14 @@ #include #include #include + +/* the initial key map, accent map and fkey strings */ +#if defined(KBDMUX_DFLT_KEYMAP) && !defined(KLD_MODULE) +#define KBD_DFLT_KEYMAP +#include "kbdmuxmap.h" +#endif + +/* the following file must be included after "ukbdmap.h" */ #include #define KEYBOARD_NAME "kbdmux" -- 1.9.3