From 5dce6450cf93bde8816892db3f67d74b9947b209 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 14 Feb 2015 04:48:26 -0600 Subject: rework VGA and serial output The Linux kernel can output messages to serial devices and vga devices in parallel. The latest console= entry decides which console output is used for init via /dev/console character device. Let the developer configure what he wants. If you use f.e. Kodi, be sure output/input is used for VGA, other wise kodi startsup, but you end up with a black screen. --- target/Makefile | 16 ++++++++++++---- target/config/Config.in.runtime | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/target/Makefile b/target/Makefile index 3a90413ea..4a497b80b 100644 --- a/target/Makefile +++ b/target/Makefile @@ -36,12 +36,20 @@ config-prepare: $(ADK_TOPDIR)/.config echo "no miniconfig found for target system"; \ exit 1; \ fi -ifneq ($(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE),) +ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_VGA_ONLY),y) + $(SED) 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 console=$(ADK_RUNTIME_CONSOLE_VGA_DEVICE) consoleblank=0"#' \ + $(BUILD_DIR)/.kernelconfig.board +endif +ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_ONLY),y) $(SED) 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 console=$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE),$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)"#' \ $(BUILD_DIR)/.kernelconfig.board endif -ifneq ($(ADK_RUNTIME_CONSOLE_VGA_DEVICE),) - $(SED) 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 console=$(ADK_RUNTIME_CONSOLE_VGA_DEVICE)" consoleblank=0#' \ +ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_VGA_SERIAL),y) + $(SED) 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 console=$(ADK_RUNTIME_CONSOLE_VGA_DEVICE) consoleblank=0 console=$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE),$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED)"#' \ + $(BUILD_DIR)/.kernelconfig.board +endif +ifeq ($(ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_VGA),y) + $(SED) 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 console=$(ADK_RUNTIME_CONSOLE_SERIAL_DEVICE),$(ADK_RUNTIME_CONSOLE_SERIAL_SPEED) console=$(ADK_RUNTIME_CONSOLE_VGA_DEVICE) consoleblank=0"#' \ $(BUILD_DIR)/.kernelconfig.board endif ifeq ($(ADK_TARGET_SYSTEM_QEMU_M68K),y) @@ -70,7 +78,7 @@ ifeq ($(ADK_RUNTIME_QUIET_INIT),y) @$(SED) 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 rcquiet=1"#' \ $(BUILD_DIR)/.kernelconfig.board endif -ifeq ($(ADK_QUIET_KERNEL),y) +ifeq ($(ADK_RUNTIME_QUIET_KERNEL),y) @$(SED) 's#^\(CONFIG_.*CMDLINE="\)\(.*\)"#\1\2 quiet loglevel=2 vt.global_cursor_default=0"#' \ $(BUILD_DIR)/.kernelconfig.board endif diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index 0d8fae992..5318157cc 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -50,11 +50,40 @@ config ADK_RUNTIME_TIMEZONE help Predefine the timezone for the embedded system. -config ADK_QUIET_KERNEL - bool "make bootup quiet without messages from the kernel" +choice +prompt "bootup messages from kernel" + +config ADK_RUNTIME_VERBOSE_KERNEL_VGA_ONLY + bool "output via VGA only" + depends on ADK_TARGET_WITH_VGA + +config ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_ONLY + bool "output via serial console only" + depends on ADK_TARGET_WITH_SERIAL + +config ADK_RUNTIME_VERBOSE_KERNEL_VGA_SERIAL + bool "output via VGA and serial console" + depends on ADK_TARGET_WITH_SERIAL && \ + ADK_TARGET_WITH_VGA + help + Output is via VGA and serial console. + Init can use only serial via /dev/console. + +config ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_VGA + bool "output via serial console and VGA" + depends on ADK_TARGET_WITH_SERIAL && \ + ADK_TARGET_WITH_VGA + help + Output is via serial console and VGA. + Init can use only VGA via /dev/console. + +config ADK_RUNTIME_QUIET_KERNEL + bool "no output from the kernel" help Make bootup quiet without messages from the kernel. +endchoice + choice prompt "bootup messages from initscripts" default ADK_RUNTIME_VERBOSE_INIT_VGA if ADK_TARGET_WITH_VGA @@ -63,10 +92,16 @@ default ADK_RUNTIME_VERBOSE_INIT_SERIAL config ADK_RUNTIME_VERBOSE_INIT_VGA bool "output via VGA" depends on ADK_TARGET_WITH_VGA + depends on ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_VGA || \ + ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_ONLY || \ + ADK_RUNTIME_QUIET_KERNEL config ADK_RUNTIME_VERBOSE_INIT_SERIAL bool "output via serial" depends on ADK_TARGET_WITH_SERIAL + depends on ADK_RUNTIME_VERBOSE_KERNEL_VGA_SERIAL || \ + ADK_RUNTIME_VERBOSE_KERNEL_SERIAL_ONLY || \ + ADK_RUNTIME_QUIET_KERNEL config ADK_RUNTIME_QUIET_INIT bool "no output" -- cgit v1.2.3