summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-02-14 04:48:26 -0600
committerWaldemar Brodkorb <wbx@openadk.org>2015-02-14 04:50:37 -0600
commit5dce6450cf93bde8816892db3f67d74b9947b209 (patch)
tree991054ee6093dd8fd4e0ff7262a7868c6b3ebc4d
parentde7c7901a87c27f80bf562a1f1797c838fa6efe0 (diff)
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.
-rw-r--r--target/Makefile16
-rw-r--r--target/config/Config.in.runtime39
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"