From 476ba1b217d040513d3b69ceba7218a553a82e69 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Feb 2016 15:30:01 +0000 Subject: [PATCH 1/3] lkl: add screen_info global definition. --- arch/lkl/kernel/setup.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/lkl/kernel/setup.c b/arch/lkl/kernel/setup.c index 3ca785e89918cf..aae37a23fc04ad 100644 --- a/arch/lkl/kernel/setup.c +++ b/arch/lkl/kernel/setup.c @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -18,6 +19,20 @@ static bool halt; void (*pm_power_off)(void) = NULL; static unsigned long mem_size; +/* + * Prepare a screen_info structure when console is enabled. + */ +#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) +struct screen_info screen_info = { + .orig_video_lines = 30, + .orig_video_cols = 80, + .orig_video_mode = 0, + .orig_video_ega_bx = 0, + .orig_video_isVGA = 1, + .orig_video_points = 8 +}; +#endif + long lkl_panic_blink(int state) { lkl_ops->panic(); From ee6ef321e47871248cbe57005e97f48ed61eacdc Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Feb 2016 18:09:32 +0000 Subject: [PATCH 2/3] lkl: Ban CONFIG_VGA_CONSOLE when CONFIG_LKL is set. --- arch/lkl/Kconfig | 2 +- arch/lkl/kernel/setup.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/lkl/Kconfig b/arch/lkl/Kconfig index 055d39b5e3ff02..e1373d88162549 100644 --- a/arch/lkl/Kconfig +++ b/arch/lkl/Kconfig @@ -1,6 +1,6 @@ config LKL def_bool y - depends on !SMP && !MMU && !COREDUMP && !AUDITSYSCALL && !SECCOMP && !TRACEPOINTS && !UPROBES && !COMPAT && !USER_RETURN_NOTIFIER + depends on !SMP && !MMU && !COREDUMP && !AUDITSYSCALL && !SECCOMP && !TRACEPOINTS && !UPROBES && !COMPAT && !USER_RETURN_NOTIFIER && !VGA_CONSOLE select ARCH_THREAD_INFO_ALLOCATOR select RWSEM_GENERIC_SPINLOCK select GENERIC_ATOMIC64 diff --git a/arch/lkl/kernel/setup.c b/arch/lkl/kernel/setup.c index aae37a23fc04ad..7bdea057771297 100644 --- a/arch/lkl/kernel/setup.c +++ b/arch/lkl/kernel/setup.c @@ -22,7 +22,7 @@ static unsigned long mem_size; /* * Prepare a screen_info structure when console is enabled. */ -#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) +#if defined(CONFIG_DUMMY_CONSOLE) struct screen_info screen_info = { .orig_video_lines = 30, .orig_video_cols = 80, From c3050154c6d5b0152627c9ac25712fa48fa49167 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 29 Feb 2016 18:15:18 +0000 Subject: [PATCH 3/3] Set line & cols of dummy console to default values. --- arch/lkl/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/lkl/kernel/setup.c b/arch/lkl/kernel/setup.c index 7bdea057771297..55dca14cd26fb4 100644 --- a/arch/lkl/kernel/setup.c +++ b/arch/lkl/kernel/setup.c @@ -24,8 +24,8 @@ static unsigned long mem_size; */ #if defined(CONFIG_DUMMY_CONSOLE) struct screen_info screen_info = { - .orig_video_lines = 30, - .orig_video_cols = 80, + .orig_video_lines = CONFIG_DUMMY_CONSOLE_ROWS, + .orig_video_cols = CONFIG_DUMMY_CONSOLE_COLUMNS, .orig_video_mode = 0, .orig_video_ega_bx = 0, .orig_video_isVGA = 1,