public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option
  2005-10-13 17:38 Nick Warne
@ 2005-10-13 16:31 ` Jeff V. Merkey
  2005-10-14  4:32 ` Willy Tarreau
  1 sibling, 0 replies; 7+ messages in thread
From: Jeff V. Merkey @ 2005-10-13 16:31 UTC (permalink / raw)
  To: Nick Warne; +Cc: linux-kernel

Nick Warne wrote:

>Hi all,
>
>A small patch here to reintroduce the dummy keyboard, which seems to have been 
>lost sometime - refer to my LKML thread:
>
>http://marc.theaimsgroup.com/?l=linux-kernel&m=112885471602308&w=2
>
>
>
>  
>
A serial based keyboard driver for general purpose debuggers and test 
harnesses would be a whole lot more useful.  Ever consider it?  Snatch 
the one out of kdb and submit it as a patch.  The AIMS test.  I remember 
that from my Memorex Telex days on OS/2.

Jeff

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option
@ 2005-10-13 17:38 Nick Warne
  2005-10-13 16:31 ` Jeff V. Merkey
  2005-10-14  4:32 ` Willy Tarreau
  0 siblings, 2 replies; 7+ messages in thread
From: Nick Warne @ 2005-10-13 17:38 UTC (permalink / raw)
  To: linux-kernel

Hi all,

A small patch here to reintroduce the dummy keyboard, which seems to have been 
lost sometime - refer to my LKML thread:

http://marc.theaimsgroup.com/?l=linux-kernel&m=112885471602308&w=2

I reason that a lot of people have headless boxes (I have 7), and the dummy 
keyboard option appears to be unknown, but a good addition...

I found out that CONFIG_DUMMY_KEYB is slightly broken in that although the 
header text in 'dummy_keyb.c' states that this should be used with CONFIG_VT, 
using this option breaks the kernel build 'as is'.  This patch fixes that, 
and also allows the use of dummy keyboard with or with out CONFIG_VT which 
stops all the timeout warnings etc at boot on a keyboardless box.  The option 
to use the dummy keyboard is only available if CONFIG_INPUT_KEYBDEV   is 'n'.

I apologise sending to list only, but I couldn't find a maintainer of this 
area...

Nick


Signed off by Nick Warne <nick@linicks.net>


 Documentation/Configure.help |   18 ++++++++++++++++++
 arch/i386/kernel/dmi_scan.c  |    2 ++
 drivers/char/dummy_keyb.c    |    1 +
 drivers/input/Config.in      |    5 +++++
 kernel/panic.c               |    2 +-
 5 files changed, 27 insertions(+), 1 deletion(-)





diff -Naur linux-2.4.31.orig/Documentation/Configure.help 
linux-2.4.31n/Documentation/Configure.help
--- linux-2.4.31.orig/Documentation/Configure.help	Mon Apr  4 02:42:19 2005
+++ linux-2.4.31n/Documentation/Configure.help	Thu Oct 13 09:38:07 2005
@@ -15242,6 +15242,24 @@
   The module will be called joydev.o. If you want to compile it as a
   module, say M here and read <file:Documentation/modules.txt>.
 
+Dummy keyboard driver
+CONFIG_DUMMY_KEYB
+  What is this for?
+
+  Not all systems have keyboards.  Some don't even have a keyboard
+  port.  However, some of those systems have video support and can
+  use the virtual terminal support for display.  However, the virtual
+  terminal code expects a keyboard of some kind.  This driver keeps
+  the virtual terminal code happy by providing it a "keyboard", albeit
+  a very quiet one.
+
+  If you want to use the virtual terminal support but your system
+  does not support a keyboard, define CONFIG_DUMMY_KEYB along with
+  CONFIG_VT.
+
+  This can also be selected lonesome without any VT support (i.e. no
+  monitor or keyboard attached) - just define CONFIG_DUMMY_KEYB.
+
 Event interface support
 CONFIG_INPUT_EVDEV
   Say Y here if you want your USB or ADB HID device events be
diff -Naur linux-2.4.31.orig/arch/i386/kernel/dmi_scan.c 
linux-2.4.31n/arch/i386/kernel/dmi_scan.c
--- linux-2.4.31.orig/arch/i386/kernel/dmi_scan.c	Wed Nov 17 11:54:21 2004
+++ linux-2.4.31n/arch/i386/kernel/dmi_scan.c	Wed Oct 12 15:57:27 2005
@@ -412,11 +412,13 @@
 static __init int broken_ps2_resume(struct dmi_blacklist *d)
 {
 #ifdef CONFIG_VT
+#ifndef CONFIG_DUMMY_KEYB
 	if (pm_kbd_request_override == NULL)
 	{
 		pm_kbd_request_override = pckbd_pm_resume;
 		printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround 
enabled.\n", d->ident);
 	}
+#endif
 #endif
 	return 0;
 }
diff -Naur linux-2.4.31.orig/drivers/char/dummy_keyb.c 
linux-2.4.31n/drivers/char/dummy_keyb.c
--- linux-2.4.31.orig/drivers/char/dummy_keyb.c	Mon Aug 25 12:44:41 2003
+++ linux-2.4.31n/drivers/char/dummy_keyb.c	Wed Oct 12 15:38:48 2005
@@ -29,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/input.h>
+#include <asm/keyboard.h>
 
 void kbd_leds(unsigned char leds)
 {
diff -Naur linux-2.4.31.orig/drivers/input/Config.in 
linux-2.4.31n/drivers/input/Config.in
--- linux-2.4.31.orig/drivers/input/Config.in	Wed Feb 18 13:36:31 2004
+++ linux-2.4.31n/drivers/input/Config.in	Wed Oct 12 15:16:09 2005
@@ -7,6 +7,11 @@
 
 tristate 'Input core support' CONFIG_INPUT
 dep_tristate '  Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_INPUT
+
+if [ "$CONFIG_INPUT_KEYBDEV" == "n" ]; then
+	bool '  Use dummy keyboard driver' CONFIG_DUMMY_KEYB $CONFIG_INPUT
+fi
+
 dep_tristate '  Mouse support' CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT
 if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
    int '   Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
diff -Naur linux-2.4.31.orig/kernel/panic.c linux-2.4.31n/kernel/panic.c
--- linux-2.4.31.orig/kernel/panic.c	Wed Nov 17 11:54:22 2004
+++ linux-2.4.31n/kernel/panic.c	Wed Oct 12 16:07:56 2005
@@ -104,7 +104,7 @@
 #endif
 	sti();
 	for(;;) {
-#if defined(CONFIG_X86) && defined(CONFIG_VT) 
+#if defined(CONFIG_X86) && defined(CONFIG_VT) && !defined(CONFIG_DUMMY_KEYB) 
 		extern void panic_blink(void);
 		panic_blink(); 
 #endif




-- 
http://sourceforge.net/projects/quake2plus

"When you're chewing on life's gristle,
Don't grumble, Give a whistle..."


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option
  2005-10-13 17:38 Nick Warne
  2005-10-13 16:31 ` Jeff V. Merkey
@ 2005-10-14  4:32 ` Willy Tarreau
  1 sibling, 0 replies; 7+ messages in thread
From: Willy Tarreau @ 2005-10-14  4:32 UTC (permalink / raw)
  To: Nick Warne; +Cc: linux-kernel, marcelo.tosatti

Hi Nick,

On Thu, Oct 13, 2005 at 06:38:44PM +0100, Nick Warne wrote:
(...)
> diff -Naur linux-2.4.31.orig/arch/i386/kernel/dmi_scan.c 
> linux-2.4.31n/arch/i386/kernel/dmi_scan.c
> --- linux-2.4.31.orig/arch/i386/kernel/dmi_scan.c	Wed Nov 17 11:54:21 2004
> +++ linux-2.4.31n/arch/i386/kernel/dmi_scan.c	Wed Oct 12 15:57:27 2005
> @@ -412,11 +412,13 @@
>  static __init int broken_ps2_resume(struct dmi_blacklist *d)
>  {
>  #ifdef CONFIG_VT
> +#ifndef CONFIG_DUMMY_KEYB

Please could you change this to #if defined(CONFIG_VT) && !defined(CONFIG_DUMMY_KEYB) ?

Marcelo, I'd like this one to be merged, as it is useful to many of us, and
is already fixed in 2.6 (where you're not forced to have a keyboard). It's
not intrusive and at most a build fix. Would you please accept Nick's patch
after the little clean-up above ?

Thanks in advance,
Willy


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option
@ 2005-10-14  9:19 Nick Warne
  2005-10-18  8:02 ` Marcelo Tosatti
  0 siblings, 1 reply; 7+ messages in thread
From: Nick Warne @ 2005-10-14  9:19 UTC (permalink / raw)
  To: linux-kernel; +Cc: Willy Tarreau, Marcelo Tosatti

[-- Attachment #1: Type: TEXT/PLAIN, Size: 587 bytes --]


>>  #ifdef CONFIG_VT
>> +#ifndef CONFIG_DUMMY_KEYB

> Please could you change this to #if defined(CONFIG_VT) && 
> !defined(CONFIG_DUMMY_KEYB) ?

> Marcelo, I'd like this one to be merged, as it is useful to many of us, 
> and is already fixed in 2.6 (where you're not forced to have a 
> keyboard).  It's not intrusive and at most a build fix. Would you please 
> accept Nick's patch after the little clean-up above ?


OK, the adjusted patch attached.  I did look at the ifdefs in that file 
for a few minutes; but I see now I should have done it like this in the 
first place.

Nick

[-- Attachment #2: dummy_keyb.diff --]
[-- Type: TEXT/PLAIN, Size: 3243 bytes --]

diff -Naur linux-2.4.31.orig/Documentation/Configure.help linux-2.4.31n/Documentation/Configure.help
--- linux-2.4.31.orig/Documentation/Configure.help	Mon Apr  4 02:42:19 2005
+++ linux-2.4.31n/Documentation/Configure.help	Thu Oct 13 09:38:07 2005
@@ -15242,6 +15242,24 @@
   The module will be called joydev.o. If you want to compile it as a
   module, say M here and read <file:Documentation/modules.txt>.
 
+Dummy keyboard driver
+CONFIG_DUMMY_KEYB
+  What is this for?
+
+  Not all systems have keyboards.  Some don't even have a keyboard
+  port.  However, some of those systems have video support and can
+  use the virtual terminal support for display.  However, the virtual
+  terminal code expects a keyboard of some kind.  This driver keeps
+  the virtual terminal code happy by providing it a "keyboard", albeit
+  a very quiet one.
+
+  If you want to use the virtual terminal support but your system
+  does not support a keyboard, define CONFIG_DUMMY_KEYB along with
+  CONFIG_VT.
+
+  This can also be selected lonesome without any VT support (i.e. no
+  monitor or keyboard attached) - just define CONFIG_DUMMY_KEYB.
+
 Event interface support
 CONFIG_INPUT_EVDEV
   Say Y here if you want your USB or ADB HID device events be
diff -Naur linux-2.4.31.orig/arch/i386/kernel/dmi_scan.c linux-2.4.31n/arch/i386/kernel/dmi_scan.c
--- linux-2.4.31.orig/arch/i386/kernel/dmi_scan.c	Wed Nov 17 11:54:21 2004
+++ linux-2.4.31n/arch/i386/kernel/dmi_scan.c	Fri Oct 14 08:39:04 2005
@@ -411,7 +411,7 @@
 
 static __init int broken_ps2_resume(struct dmi_blacklist *d)
 {
-#ifdef CONFIG_VT
+#if defined(CONFIG_VT) && !defined(CONFIG_DUMMY_KEYB)
 	if (pm_kbd_request_override == NULL)
 	{
 		pm_kbd_request_override = pckbd_pm_resume;
diff -Naur linux-2.4.31.orig/drivers/char/dummy_keyb.c linux-2.4.31n/drivers/char/dummy_keyb.c
--- linux-2.4.31.orig/drivers/char/dummy_keyb.c	Mon Aug 25 12:44:41 2003
+++ linux-2.4.31n/drivers/char/dummy_keyb.c	Wed Oct 12 15:38:48 2005
@@ -29,6 +29,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/input.h>
+#include <asm/keyboard.h>
 
 void kbd_leds(unsigned char leds)
 {
diff -Naur linux-2.4.31.orig/drivers/input/Config.in linux-2.4.31n/drivers/input/Config.in
--- linux-2.4.31.orig/drivers/input/Config.in	Wed Feb 18 13:36:31 2004
+++ linux-2.4.31n/drivers/input/Config.in	Wed Oct 12 15:16:09 2005
@@ -7,6 +7,11 @@
 
 tristate 'Input core support' CONFIG_INPUT
 dep_tristate '  Keyboard support' CONFIG_INPUT_KEYBDEV $CONFIG_INPUT
+
+if [ "$CONFIG_INPUT_KEYBDEV" == "n" ]; then
+	bool '  Use dummy keyboard driver' CONFIG_DUMMY_KEYB $CONFIG_INPUT
+fi
+
 dep_tristate '  Mouse support' CONFIG_INPUT_MOUSEDEV $CONFIG_INPUT
 if [ "$CONFIG_INPUT_MOUSEDEV" != "n" ]; then
    int '   Horizontal screen resolution' CONFIG_INPUT_MOUSEDEV_SCREEN_X 1024
diff -Naur linux-2.4.31.orig/kernel/panic.c linux-2.4.31n/kernel/panic.c
--- linux-2.4.31.orig/kernel/panic.c	Wed Nov 17 11:54:22 2004
+++ linux-2.4.31n/kernel/panic.c	Wed Oct 12 16:07:56 2005
@@ -104,7 +104,7 @@
 #endif
 	sti();
 	for(;;) {
-#if defined(CONFIG_X86) && defined(CONFIG_VT) 
+#if defined(CONFIG_X86) && defined(CONFIG_VT) && !defined(CONFIG_DUMMY_KEYB) 
 		extern void panic_blink(void);
 		panic_blink(); 
 #endif

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option
  2005-10-14  9:19 [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option Nick Warne
@ 2005-10-18  8:02 ` Marcelo Tosatti
  2005-10-18 18:30   ` Nick Warne
  2005-10-18 22:41   ` Willy Tarreau
  0 siblings, 2 replies; 7+ messages in thread
From: Marcelo Tosatti @ 2005-10-18  8:02 UTC (permalink / raw)
  To: Nick Warne; +Cc: linux-kernel, Willy Tarreau

On Fri, Oct 14, 2005 at 10:19:44AM +0100, Nick Warne wrote:
> 
> >>  #ifdef CONFIG_VT
> >> +#ifndef CONFIG_DUMMY_KEYB
> 
> > Please could you change this to #if defined(CONFIG_VT) && 
> > !defined(CONFIG_DUMMY_KEYB) ?
> 
> > Marcelo, I'd like this one to be merged, as it is useful to many of us, 
> > and is already fixed in 2.6 (where you're not forced to have a 
> > keyboard).  It's not intrusive and at most a build fix. Would you please 
> > accept Nick's patch after the little clean-up above ?
> 
> 
> OK, the adjusted patch attached.  I did look at the ifdefs in that file 
> for a few minutes; but I see now I should have done it like this in the 
> first place.

Looks fine - Willy can you keep it in your tree and add it later on to the 
2.4.33-pre tree?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option
  2005-10-18  8:02 ` Marcelo Tosatti
@ 2005-10-18 18:30   ` Nick Warne
  2005-10-18 22:41   ` Willy Tarreau
  1 sibling, 0 replies; 7+ messages in thread
From: Nick Warne @ 2005-10-18 18:30 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: linux-kernel, Willy Tarreau

On Tuesday 18 October 2005 09:02, Marcelo Tosatti wrote:

> > OK, the adjusted patch attached.  I did look at the ifdefs in that file
> > for a few minutes; but I see now I should have done it like this in the
> > first place.
>
> Looks fine - Willy can you keep it in your tree and add it later on to the
> 2.4.33-pre tree?

Hi Marcelo,

I just noticed something - I maybe buggered up:

+
+if [ "$CONFIG_INPUT_KEYBDEV" == "n" ]; then

I think I done wrong there - should that be:

[ "$CONFIG_INPUT_KEYBDEV" = "n" ]

menuconfig all works correctly, though?

If so I will rectify the patch again.

Nick
-- 
http://sourceforge.net/projects/quake2plus

"Person who say it cannot be done should not interrupt person doing it."
-Chinese Proverb


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option
  2005-10-18  8:02 ` Marcelo Tosatti
  2005-10-18 18:30   ` Nick Warne
@ 2005-10-18 22:41   ` Willy Tarreau
  1 sibling, 0 replies; 7+ messages in thread
From: Willy Tarreau @ 2005-10-18 22:41 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Nick Warne, linux-kernel

On Tue, Oct 18, 2005 at 06:02:26AM -0200, Marcelo Tosatti wrote:
> On Fri, Oct 14, 2005 at 10:19:44AM +0100, Nick Warne wrote:
> > 
> > >>  #ifdef CONFIG_VT
> > >> +#ifndef CONFIG_DUMMY_KEYB
> > 
> > > Please could you change this to #if defined(CONFIG_VT) && 
> > > !defined(CONFIG_DUMMY_KEYB) ?
> > 
> > > Marcelo, I'd like this one to be merged, as it is useful to many of us, 
> > > and is already fixed in 2.6 (where you're not forced to have a 
> > > keyboard).  It's not intrusive and at most a build fix. Would you please 
> > > accept Nick's patch after the little clean-up above ?
> > 
> > 
> > OK, the adjusted patch attached.  I did look at the ifdefs in that file 
> > for a few minutes; but I see now I should have done it like this in the 
> > first place.
> 
> Looks fine - Willy can you keep it in your tree and add it later on to the 
> 2.4.33-pre tree?

OK, fine.

Willy


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-10-18 22:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-14  9:19 [PATCH 2.4.31] Reintroduction i386 CONFIG_DUMMY_KEYB option Nick Warne
2005-10-18  8:02 ` Marcelo Tosatti
2005-10-18 18:30   ` Nick Warne
2005-10-18 22:41   ` Willy Tarreau
  -- strict thread matches above, loose matches on Subject: below --
2005-10-13 17:38 Nick Warne
2005-10-13 16:31 ` Jeff V. Merkey
2005-10-14  4:32 ` Willy Tarreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox