summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Config.in8
-rw-r--r--package/bkeymaps/Makefile33
-rw-r--r--package/bkeymaps/files/bkeymaps.postinst4
-rw-r--r--package/bkeymaps/files/kbd.init26
-rw-r--r--package/busybox/config/console-tools/Config.in2
5 files changed, 73 insertions, 0 deletions
diff --git a/Config.in b/Config.in
index 078c9fa6e..d0cf133de 100644
--- a/Config.in
+++ b/Config.in
@@ -206,6 +206,14 @@ config ADK_RUNTIME_TIMEZONE
string "timezone for the embedded system"
default "Europe/Berlin"
help
+ Predefine the timezone for the embedded system.
+
+config ADK_RUNTIME_KBD_LAYOUT
+ string "keyboard layout for the embedded system"
+ default "en"
+ depends on ADK_TARGET_WITH_INPUT
+ help
+ Predefine the keyboard layout for the embedded system.
endmenu
diff --git a/package/bkeymaps/Makefile b/package/bkeymaps/Makefile
new file mode 100644
index 000000000..735bc38f8
--- /dev/null
+++ b/package/bkeymaps/Makefile
@@ -0,0 +1,33 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= bkeymaps
+PKG_VERSION:= 1.13
+PKG_RELEASE:= 1
+PKG_MD5SUM:= a68058ab4a81cf9a8dcbaaa7a5df5b11
+PKG_DESCR:= binary keymaps for busybox loadkmap
+PKG_SECTION:= utils
+PKG_URL:= http://dev.alpinelinux.org/bkeymaps/
+PKG_SITES:= http://dev.alpinelinux.org/bkeymaps/
+
+PKG_DFLT_BKEYMAPS:= y if ADK_TARGET_WITH_INPUT
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,BKEYMAPS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+
+CONFIG_STYLE:= manual
+BUILD_STYLE:= manual
+INSTALL_STYLE:= manual
+
+KBD_LAYOUT:=$(strip $(subst ",, $(ADK_RUNTIME_KBD_LAYOUT)))
+KBD_DIR:=$(shell echo $(KBD_LAYOUT)|cut -c 1-2)
+
+do-install:
+ $(INSTALL_DIR) $(IDIR_BKEYMAPS)/usr/share/keymaps/
+ $(INSTALL_DATA) $(WRKBUILD)/bkeymaps/$(KBD_DIR)/$(KBD_LAYOUT).bmap \
+ $(IDIR_BKEYMAPS)/usr/share/keymaps/keymap.bmap
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/bkeymaps/files/bkeymaps.postinst b/package/bkeymaps/files/bkeymaps.postinst
new file mode 100644
index 000000000..8af581f06
--- /dev/null
+++ b/package/bkeymaps/files/bkeymaps.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+. $IPKG_INSTROOT/etc/functions.sh
+
+add_rcconf bkeymaps kbd NO
diff --git a/package/bkeymaps/files/kbd.init b/package/bkeymaps/files/kbd.init
new file mode 100644
index 000000000..ec8bad244
--- /dev/null
+++ b/package/bkeymaps/files/kbd.init
@@ -0,0 +1,26 @@
+#!/bin/sh
+#PKG bkeymaps
+#INIT 6
+. /etc/rc.conf
+
+case $1 in
+autostop) ;;
+autostart)
+ [[ $kbd = NO ]] && exit 0
+ exec sh $0 start
+ ;;
+start)
+ [ -f /usr/share/keymaps/keymap.bmap ] || exit
+ loadkmap < /usr/share/keymaps/keymap.bmap
+ ;;
+stop)
+ ;;
+restart)
+ sh $0 stop
+ sh $0 start
+ ;;
+*)
+ echo "Usage: $0 {start | stop | restart}"
+ ;;
+esac
+exit $?
diff --git a/package/busybox/config/console-tools/Config.in b/package/busybox/config/console-tools/Config.in
index 7b1d3ac2e..4a86ff740 100644
--- a/package/busybox/config/console-tools/Config.in
+++ b/package/busybox/config/console-tools/Config.in
@@ -39,6 +39,7 @@ config BUSYBOX_DUMPKMAP
config BUSYBOX_KBD_MODE
bool "kbd_mode"
+ default y if ADK_TARGET_WITH_INPUT
default n
help
This program reports and sets keyboard mode.
@@ -51,6 +52,7 @@ config BUSYBOX_LOADFONT
config BUSYBOX_LOADKMAP
bool "loadkmap"
+ default y if ADK_TARGET_WITH_INPUT
default n
help
This program loads a keyboard translation table from