Index: kernel/arch/amd64/src/amd64.c
===================================================================
--- kernel/arch/amd64/src/amd64.c	(revision 0b6eba524a4c2dba6de2114c02261bfbad4422d7)
+++ kernel/arch/amd64/src/amd64.c	(revision 08fed0ad9e4bea3fef001e2f6f14c85e82781cb2)
@@ -194,15 +194,17 @@
 void arch_post_smp_init(void)
 {
+#ifdef CONFIG_PC_KBD
 	devno_t devno = device_assign_devno();
-
-        /*
-	 * Initialize the keyboard module and conect it to stdin. Then
-	 * initialize the i8042 controller and connect it to kbrdin. Enable
-	 * keyboard interrupts.
-         */
-	kbrd_init(stdin);
-	(void) i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD, &kbrdin);
-	trap_virtual_enable_irqs(1 << IRQ_KBD);
-
+	
+	/*
+	 * Initialize the i8042 controller. Then initialize the keyboard
+	 * module and connect it to i8042. Enable keyboard interrupts.
+	 */
+	indev_t *kbrdin = i8042_init((i8042_t *) I8042_BASE, devno, IRQ_KBD);
+	if (kbrdin) {
+		kbrd_init(kbrdin);
+		trap_virtual_enable_irqs(1 << IRQ_KBD);
+	}
+	
 	/*
 	 * This is the necessary evil until the userspace driver is entirely
@@ -216,4 +218,5 @@
 	sysinfo_set_item_val("kbd.address.kernel", NULL,
 	    (uintptr_t) I8042_BASE);
+#endif
 }
 
@@ -251,7 +254,12 @@
 {
 #ifdef CONFIG_FB
-	vesa_redraw();
+	if (vesa_present())
+		vesa_redraw();
+	else
+#endif
+#ifdef CONFIG_EGA
+		ega_redraw();
 #else
-	ega_redraw();
+		{}
 #endif
 }
