From patchwork Sun Aug 12 14:53:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 1309871 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 62B9EDF280 for ; Sun, 12 Aug 2012 14:55:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751512Ab2HLOyn (ORCPT ); Sun, 12 Aug 2012 10:54:43 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:60286 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733Ab2HLOwg (ORCPT ); Sun, 12 Aug 2012 10:52:36 -0400 Received: by wibhr14 with SMTP id hr14so2715870wib.1 for ; Sun, 12 Aug 2012 07:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=yIFbcUpHfCTq0f/V59KWdolunWapYW//AhZY/kc+0jA=; b=vtNMnfipFbsX2HchtPBjvmHudnuKSP1hMlgH+bO12TerVzQxqvJfTfmwVIpaiJKGdz EAlwesqWFHhb5tPFZXd26nDBvLVOoll83uE8plLe+H77yueE4vMYc4pEVMtcfdrcyWoo pMmPSn4J1eky2gy/biiWsPNzqktaFXgaBjW8zM6uOkebauX5XazNGuOlbLzLjkqS6abG 8DVSnddyQe0CqqpolejpGLoeuJOJ6fBCRLvOhTVaxu6YDT1Rzx/ivC646SI1Ti/MkDt5 CEqDX+zxJPJbs5LpncHxvn8wdbM9/sE9FoyCAQxuSG72FnbFpnIhLKuKlJos/ZEsa02H RZCQ== Received: by 10.180.91.228 with SMTP id ch4mr11095962wib.7.1344783154887; Sun, 12 Aug 2012 07:52:34 -0700 (PDT) Received: from localhost.localdomain (stgt-5f71bba7.pool.mediaWays.net. [95.113.187.167]) by mx.google.com with ESMTPS id k20sm10803202wiv.11.2012.08.12.07.52.33 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Aug 2012 07:52:34 -0700 (PDT) From: David Herrmann To: linux-fbdev@vger.kernel.org Cc: Florian Tobias Schandinat , Greg Kroah-Hartman , linux-serial@vger.kernel.org, Alan Cox , linux-kernel@vger.kernel.org, Geert Uytterhoeven , David Herrmann Subject: [PATCH 03/11] fblog: new framebuffer kernel log dummy driver Date: Sun, 12 Aug 2012 16:53:17 +0200 Message-Id: <1344783205-2384-4-git-send-email-dh.herrmann@googlemail.com> X-Mailer: git-send-email 1.7.11.4 In-Reply-To: <1344783205-2384-1-git-send-email-dh.herrmann@googlemail.com> References: <1344783205-2384-1-git-send-email-dh.herrmann@googlemail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Fblog displays all kernel log messages on all connected framebuffers. It replaces fbcon when CONFIG_VT=n is selected. Its main purpose is to debug boot problems by displaying the whole boot log on the screen. This patch provides the first dummy module-init/deinit functions. As it uses all the font and fb functions I placed it in drivers/video/console. However, this means that we need to move the check for CONFIG_VT in Makefile/Kconfig from drivers/video into drivers/video/console as fblog does not depend on CONFIG_VT. Signed-off-by: David Herrmann --- drivers/video/Kconfig | 5 +---- drivers/video/Makefile | 2 +- drivers/video/console/Kconfig | 37 +++++++++++++++++++++++++++++-------- drivers/video/console/Makefile | 1 + drivers/video/console/fblog.c | 41 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+), 13 deletions(-) create mode 100644 drivers/video/console/fblog.c diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 0217f74..e8fd53d 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -2448,10 +2448,7 @@ source "drivers/video/omap/Kconfig" source "drivers/video/omap2/Kconfig" source "drivers/video/exynos/Kconfig" source "drivers/video/backlight/Kconfig" - -if VT - source "drivers/video/console/Kconfig" -endif +source "drivers/video/console/Kconfig" if FB || SGI_NEWPORT_CONSOLE source "drivers/video/logo/Kconfig" diff --git a/drivers/video/Makefile b/drivers/video/Makefile index ee8dafb..9f8a7f0 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -11,7 +11,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ modedb.o fbcvt.o fb-objs := $(fb-y) -obj-$(CONFIG_VT) += console/ +obj-y += console/ obj-$(CONFIG_LOGO) += logo/ obj-y += backlight/ diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index e2c96d0..7374362 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -6,7 +6,7 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EXPERT || !X86 - depends on !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) + depends on VT && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !SUPERH && !BLACKFIN && !AVR32 && !MN10300 && (!ARM || ARCH_FOOTBRIDGE || ARCH_INTEGRATOR || ARCH_NETWINDER) default y help Saying Y here will allow you to use Linux in text mode through a @@ -45,7 +45,7 @@ config VGACON_SOFT_SCROLLBACK_SIZE screenfuls of scrollback buffer config MDA_CONSOLE - depends on !M68K && !PARISC && ISA + depends on VT && !M68K && !PARISC && ISA tristate "MDA text console (dual-headed) (EXPERIMENTAL)" ---help--- Say Y here if you have an old MDA or monochrome Hercules graphics @@ -61,14 +61,14 @@ config MDA_CONSOLE config SGI_NEWPORT_CONSOLE tristate "SGI Newport Console support" - depends on SGI_IP22 + depends on VT && SGI_IP22 help Say Y here if you want the console on the Newport aka XL graphics card of your Indy. Most people say Y here. config DUMMY_CONSOLE bool - depends on VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y + depends on VT && (VGA_CONSOLE!=y || SGI_NEWPORT_CONSOLE!=y) default y config DUMMY_CONSOLE_COLUMNS @@ -89,7 +89,7 @@ config DUMMY_CONSOLE_ROWS config FRAMEBUFFER_CONSOLE tristate "Framebuffer Console support" - depends on FB + depends on VT && FB select CRC32 help Low-level framebuffer-based console driver. @@ -122,16 +122,37 @@ config FRAMEBUFFER_CONSOLE_ROTATION config STI_CONSOLE bool "STI text console" - depends on PARISC + depends on VT && PARISC default y help The STI console is the builtin display/keyboard on HP-PARISC machines. Say Y here to build support for it into your kernel. The alternative is to use your primary serial port as a console. +config FBLOG + tristate "Framebuffer Kernel Log Driver" + depends on !VT && FB + default n + help + This driver displays all kernel log messages on all connected + framebuffers. It is mutually exclusive with CONFIG_FRAMEBUFFER_CONSOLE + and CONFIG_VT. It was mainly created for debugging purposes when + CONFIG_VT is not selected but you still want kernel boot messages on + the screen. + + This driver overwrites all other graphics output on the framebuffer as + long as it is active so the kernel log will always be visible. You + need to disable this driver via sysfs to be able to start another + graphics application. + + If unsure, say N. + + To compile this driver as a module, choose M here: the module will + be called fblog. + config FONTS bool "Select compiled-in fonts" - depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE + depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE || FBLOG help Say Y here if you would like to use fonts other than the default your frame buffer console usually use. @@ -158,7 +179,7 @@ config FONT_8x8 config FONT_8x16 bool "VGA 8x16 font" if FONTS - depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON + depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE || STI_CONSOLE || USB_SISUSBVGA_CON || FBLOG default y if !SPARC && !FONTS help This is the "high resolution" font for the VGA frame buffer (the one diff --git a/drivers/video/console/Makefile b/drivers/video/console/Makefile index 9a52226..ec0e155 100644 --- a/drivers/video/console/Makefile +++ b/drivers/video/console/Makefile @@ -20,6 +20,7 @@ font-objs += $(font-objs-y) # Each configuration option enables a list of files. +obj-$(CONFIG_FBLOG) += fblog.o font.o fbdraw.o obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o font.o obj-$(CONFIG_STI_CONSOLE) += sticon.o sticore.o font.o diff --git a/drivers/video/console/fblog.c b/drivers/video/console/fblog.c new file mode 100644 index 0000000..fb39737 --- /dev/null +++ b/drivers/video/console/fblog.c @@ -0,0 +1,41 @@ +/* + * Framebuffer Kernel Log Driver + * Copyright (c) 2012 David Herrmann + */ + +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + */ + +/* + * Framebuffer Kernel Log + * This driver prints the kernel log to all connected display devices. It + * replaces CONFIG_VT and cannot run simultaneously with it. It does not provide + * any virtual-terminal, though. It should only be used to get kernel boot + * messages to debug kernel errors. + * Hence, this driver is neither optimized for speed, nor does it provide any + * fancy features like colored text output. + * This driver forcibly writes to the framebuffer while active, therefore, you + * cannot run other graphics applications simultaneously. You need to disable + * all fblog instances before running other graphics applications. + */ + +#include + +static int __init fblog_init(void) +{ + return 0; +} + +static void __exit fblog_exit(void) +{ +} + +module_init(fblog_init); +module_exit(fblog_exit); +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("David Herrmann "); +MODULE_DESCRIPTION("Framebuffer Kernel Log Driver");