#893814 keyboard-configuration: Set the default XKB model to nokiarx51 for Nokia N900 devices

#893814#5
Date:
2018-03-22 03:24:20 UTC
From:
To:
Dear Maintainer,

When installing Debian on the Nokia N900, the keyboard-configuration
package does not automatically configure the built-in keyboard in
/etc/default/keyboard.  The xkb-data package already provides XKB
configuration data for this device under the XKB model "nokiarx51".

Please find attached a patch for the keyboard-configuration config
script which will detect the Nokia N900 hardware and set XKBMODEL to
"nokiarx51".

I have tested this on the Nokia N900 itself and also on one other ARM
device to ensure that it falls back and configures the default XKBMODEL
as expected.

I would appreciate your comments.

Kind regards,

David


*** ~/console-setup/n900-xkbmodel.patch
diff -ru a/console-setup-1.180/debian/keyboard-configuration.config b/console-setup-1.180/debian/keyboard-configuration.config
--- a/console-setup-1.180/debian/keyboard-configuration.config	2018-03-20 12:26:54.560520833 -0500
+++ b/console-setup-1.180/debian/keyboard-configuration.config	2018-03-20 12:52:12.156520833 -0500
@@ -272,6 +272,7 @@
 # ppc/cell	pc		"platform: Cell"
 # ppc/{bbox,mbx,ppc64,82xx,8xx} Not yet supported by Debian

+# arm*/n900	nokiarx51	"Hardware.*: Nokia RX-51 board"
 # arm/*		pc		(refered to as 'arm' only)

 guess_arch () {
@@ -284,7 +285,7 @@

     arch=`dpkg --print-architecture`

-    if [ "$arch" = 'powerpc' -o "$arch" = 'm68k' ]; then
+    if [ "$arch" = powerpc ] || [ "$arch" = m68k ] || [ "$arch" = armhf ] || [ "$arch" = armel ]; then
 	if [ "$arch" = powerpc ]; then
 	    line=`sed -n 's/^platform.*: *//p' /proc/cpuinfo`
 	    if [ "$line" = PS3 ] || [ "$line" = Cell ]; then
@@ -304,6 +305,14 @@
 		return 0
 	    fi
 	    subarch=`echo $line|tr A-Z a-z`
+	elif [ "$arch" = armhf ] || [ "$arch" = armel ]; then
+	    line=`sed -n 's/^Hardware.*: *//p' /proc/cpuinfo`
+	    if [ "$line" = 'Nokia RX-51 board' ]; then
+		subarch=n900
+	    else
+		echo unknown
+		return 0
+	    fi
 	fi
 	case "$subarch" in
 	    *amiga*)
@@ -404,6 +413,10 @@
 	XKBMODEL=pc105
 	model_priority=medium
 	;;
+    arm*/n900)
+	XKBMODEL=nokiarx51
+	model_priority=medium
+	;;
     arm*)
 	XKBMODEL=pc105
 	model_priority=medium

#893814#10
Date:
2018-12-31 22:15:45 UTC
From:
To:
Dear maintainer,

Is there any chance of getting this patch merged before the buster
transition freeze on 2019-01-12?  It would be a shame to miss the
release and have to wait an additional 2 years for this to be included
in Debian stable (bullseye).  Is there anything I can do to help with
this?

I look forward to hearing from you.

Kind regards,

David