lkml.org 
[lkml]   [2016]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] nios2: add screen_info
Date
The build of nios2 was failing with the error:
drivers/built-in.o: In function `vgacon_switch':
vgacon.c:(.text+0x12174): undefined reference to `screen_info'
vgacon.c:(.text+0x1217c): undefined reference to `screen_info'
drivers/built-in.o: In function `vgacon_resize':
vgacon.c:(.text+0x123f4): undefined reference to `screen_info'
vgacon.c:(.text+0x123f8): undefined reference to `screen_info'
drivers/built-in.o: In function `vgacon_save_screen':
vgacon.c:(.text+0x12528): undefined reference to `screen_info'

Lets define a screen_info which can work as the vga console.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

Note: Not tested on hardware. Values of screen_info taken from m32r.

build log is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/174408433

arch/nios2/kernel/setup.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c
index a4ff86d..0c1cd9d4 100644
--- a/arch/nios2/kernel/setup.c
+++ b/arch/nios2/kernel/setup.c
@@ -23,6 +23,7 @@
#include <asm/sections.h>
#include <asm/setup.h>
#include <asm/cpuinfo.h>
+#include <linux/screen_info.h>

unsigned long memory_start;
EXPORT_SYMBOL(memory_start);
@@ -36,6 +37,15 @@
0, 0, 0, 0, 0, 0,
0};

+#if defined(CONFIG_VGA_CONSOLE)
+struct screen_info screen_info = {
+ .orig_video_lines = 25,
+ .orig_video_cols = 80,
+ .orig_video_isVGA = 1,
+ .orig_video_points = 8
+};
+#endif
+
/* Copy a short hook instruction sequence to the exception address */
static inline void copy_exception_handler(unsigned int addr)
{
--
1.9.1
\
 
 \ /
  Last update: 2016-11-10 00:10    [W:0.042 / U:1.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site