colinux64/patch/coconsole-2.6.26.diff
2025-02-13 19:44:47 -07:00

111 lines
4.2 KiB
Diff
Executable File

Implements console support
Index: linux-2.6.26-source/drivers/video/console/Kconfig
===================================================================
--- linux-2.6.26-source.orig/drivers/video/console/Kconfig
+++ linux-2.6.26-source/drivers/video/console/Kconfig
@@ -6,7 +6,7 @@
config VGA_CONSOLE
bool "VGA text console" if EMBEDDED || !X86
- depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH && !BLACKFIN && !AVR32 && !MN10300
+ depends on !COOPERATIVE && !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH && !BLACKFIN && !AVR32 && !MN10300
default y
help
Saying Y here will allow you to use Linux in text mode through a
@@ -43,6 +43,14 @@
buffer. Each 64KB will give you approximately 16 80x25
screenfuls of scrollback buffer
+config COOPERATIVE_CONSOLE
+ bool 'coLinux Pseudo-VGA text console' if COOPERATIVE
+ depends on !VGA_CONSOLE && COOPERATIVE
+ default y
+ help
+ You need to say Y here if you compile a Linux kernel in cooperative
+ mode.
+
config VIDEO_SELECT
bool "Video mode selection support"
depends on X86 && VGA_CONSOLE
@@ -92,7 +100,7 @@
config DUMMY_CONSOLE
bool
- depends on PROM_CONSOLE!=y || VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y
+ depends on PROM_CONSOLE!=y || (COOPERATIVE_CONSOLE!=y && VGA_CONSOLE!=y) || SGI_NEWPORT_CONSOLE!=y
default y
config DUMMY_CONSOLE_COLUMNS
Index: linux-2.6.26-source/include/linux/console.h
===================================================================
--- linux-2.6.26-source.orig/include/linux/console.h
+++ linux-2.6.26-source/include/linux/console.h
@@ -61,6 +61,7 @@
extern const struct consw dummy_con; /* dummy console buffer */
extern const struct consw vga_con; /* VGA text console */
+extern const struct consw colinux_con; /* coLinux Mode text console */
extern const struct consw newport_con; /* SGI Newport console */
extern const struct consw prom_con; /* SPARC PROM console */
Index: linux-2.6.26-source/drivers/video/console/Makefile
===================================================================
--- linux-2.6.26-source.orig/drivers/video/console/Makefile
+++ linux-2.6.26-source/drivers/video/console/Makefile
@@ -25,6 +25,7 @@
obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o
obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o font.o
obj-$(CONFIG_VGA_CONSOLE) += vgacon.o
+obj-$(CONFIG_COOPERATIVE_CONSOLE) += cocon.o
obj-$(CONFIG_MDA_CONSOLE) += mdacon.o
obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon.o bitblit.o font.o softcursor.o
ifeq ($(CONFIG_FB_TILEBLITTING),y)
Index: linux-2.6.26-source/drivers/video/console/cocon.c
===================================================================
--- linux-2.6.26-source.orig/drivers/video/console/cocon.c
+++ linux-2.6.26-source/drivers/video/console/cocon.c
@@ -454,8 +454,8 @@
co_send_message_restore(flags);
}
-static int cocon_resize(struct vc_data *c, unsigned int width,
- unsigned int height)
+static int cocon_resize(struct vc_data *vc, unsigned int width,
+ unsigned int height, unsigned int user)
{
return -EINVAL;
}
Index: linux-2.6.26-source/include/linux/console_struct.h
===================================================================
--- linux-2.6.26-source.orig/include/linux/console_struct.h
+++ linux-2.6.26-source/include/linux/console_struct.h
@@ -132,7 +132,11 @@
#define CUR_HWMASK 0x0f
#define CUR_SWMASK 0xfff0
-#define CUR_DEFAULT CUR_UNDERLINE
+#ifdef CONFIG_COOPERATIVE
+# define CUR_DEFAULT CUR_DEF
+#else
+# define CUR_DEFAULT CUR_UNDERLINE
+#endif
#define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
Index: linux-2.6.26-source/drivers/char/vt.c
===================================================================
--- linux-2.6.26-source.orig/drivers/char/vt.c
+++ linux-2.6.26-source/drivers/char/vt.c
@@ -2811,7 +2811,8 @@
vc->vc_palette[k++] = default_grn[j] ;
vc->vc_palette[k++] = default_blu[j] ;
}
- vc->vc_def_color = 0x07; /* white */
+ if (!vc->vc_def_color)
+ vc->vc_def_color = 0x07; /* white */
vc->vc_ulcolor = default_underline_color;
vc->vc_itcolor = default_italic_color;
vc->vc_halfcolor = 0x08; /* grey */