* [PATCH] nios2: add screen_info
@ 2016-11-09 23:09 Sudip Mukherjee
0 siblings, 0 replies; only message in thread
From: Sudip Mukherjee @ 2016-11-09 23:09 UTC (permalink / raw)
To: Ley Foon Tan; +Cc: linux-kernel, nios2-dev, Sudip Mukherjee
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-11-09 23:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-09 23:09 [PATCH] nios2: add screen_info Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).