From patchwork Sun Jul 8 21:56:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 1170261 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2643B40134 for ; Sun, 8 Jul 2012 22:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752556Ab2GHV5p (ORCPT ); Sun, 8 Jul 2012 17:57:45 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:42390 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752475Ab2GHV4z (ORCPT ); Sun, 8 Jul 2012 17:56:55 -0400 Received: by mail-we0-f174.google.com with SMTP id x8so708039wey.19 for ; Sun, 08 Jul 2012 14:56:55 -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=EWzGhlDkpIcl7/+z24f2Dv6WSG+1EeWm8hnrkkJgxN0=; b=qEWMa4AcXqNonSPCe9dwgP/dzQibv/fd5IPdQI+bgsBrCQiO3pSn1BpflyA5ZxaUpB chkMiviEX7UdljWe6WLjuM6K2OoldGgig48PEwVcxVRM4mnsybJyKTNFLdYDYM+jOq6r M5I6fKTO33OjfaKqR+jieGVi/dwFxjyZwYHUPFGEc6pQUhvKP8vgJpPgJlUpAhOPlUHe HdYtI2vc6U4HIu8gAzQ632DosjxQIVSbh076mIJddr2qVGgwjp6yu2OWHCmFhub4Qmwv 1r43J/wvU0+BdcadihMe5gCRLs/0DYVfzECMtusl8qs+JKPBIe58/EdqIj3StNOoxQ/R Cs4A== Received: by 10.216.137.227 with SMTP id y77mr10250314wei.126.1341784614688; Sun, 08 Jul 2012 14:56:54 -0700 (PDT) Received: from localhost.localdomain (stgt-5f719b43.pool.mediaWays.net. [95.113.155.67]) by mx.google.com with ESMTPS id j6sm29743837wiy.4.2012.07.08.14.56.53 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 08 Jul 2012 14:56:54 -0700 (PDT) From: David Herrmann To: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org, florianschandinat@gmx.de, linux-fbdev@vger.kernel.org, gregkh@linuxfoundation.org, alan@lxorguk.ukuu.org.uk, bonbons@linux-vserver.org, David Herrmann Subject: [PATCH v2 03/11] fblog: new framebuffer kernel log dummy driver Date: Sun, 8 Jul 2012 23:56:46 +0200 Message-Id: <1341784614-2797-4-git-send-email-dh.herrmann@googlemail.com> X-Mailer: git-send-email 1.7.11.1 In-Reply-To: <1341784614-2797-1-git-send-email-dh.herrmann@googlemail.com> References: <1341784614-2797-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 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");