From 84ee970e9bb5bd1485f145309cded29e1285bf0e Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Wed, 13 Jul 2016 14:19:57 +0200 Subject: [PATCH] run: look for platform boot string at beginning of line When running the same kernel in a VM as on the host system and the kernel boot message from the VM appears on the log output, the run tool assumes that the host machine has rebooted unexpectedly. With this commit, an unexpected reboot is assumed only if the kernel boot message appears at the beginning of a line. On base-hw, we enforce a line feed at the beginning of the boot message as the SPIKE emulator log starts with the first message of the kernel lacking a line feed. Fixes #2041 --- repos/base-hw/src/core/kernel/init.cc | 2 +- tool/run/boot_dir/fiasco | 2 +- tool/run/boot_dir/foc | 2 +- tool/run/boot_dir/hw | 2 +- tool/run/boot_dir/nova | 2 +- tool/run/boot_dir/okl4 | 2 +- tool/run/boot_dir/pistachio | 2 +- tool/run/boot_dir/sel4 | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/repos/base-hw/src/core/kernel/init.cc b/repos/base-hw/src/core/kernel/init.cc index 07ce9465c..10a9d8e9a 100644 --- a/repos/base-hw/src/core/kernel/init.cc +++ b/repos/base-hw/src/core/kernel/init.cc @@ -60,7 +60,7 @@ extern "C" void init_kernel() Core_thread::singleton(); - Genode::printf("kernel initialized\n"); + Genode::printf("\nkernel initialized\n"); test(); diff --git a/tool/run/boot_dir/fiasco b/tool/run/boot_dir/fiasco index 87bd541ca..dac7fe441 100644 --- a/tool/run/boot_dir/fiasco +++ b/tool/run/boot_dir/fiasco @@ -60,7 +60,7 @@ set fiasco_serial_esc_arg "-serial_esc " proc run_boot_string { } { - return "L4 Bootstrapper" + return "\nL4 Bootstrapper" } diff --git a/tool/run/boot_dir/foc b/tool/run/boot_dir/foc index 14d009e75..0c70eada6 100644 --- a/tool/run/boot_dir/foc +++ b/tool/run/boot_dir/foc @@ -248,7 +248,7 @@ proc run_boot_dir_arm {binaries} { proc run_boot_string { } { - return "L4 Bootstrapper" + return "\nL4 Bootstrapper" } diff --git a/tool/run/boot_dir/hw b/tool/run/boot_dir/hw index 92ea3321b..4def0bcc1 100644 --- a/tool/run/boot_dir/hw +++ b/tool/run/boot_dir/hw @@ -11,7 +11,7 @@ proc run_boot_dir_hook { } { proc run_boot_string { } { - return "kernel initialized" + return "\nkernel initialized" } diff --git a/tool/run/boot_dir/nova b/tool/run/boot_dir/nova index 5be441699..fb39ce07f 100644 --- a/tool/run/boot_dir/nova +++ b/tool/run/boot_dir/nova @@ -25,7 +25,7 @@ proc nova_external { } { proc run_boot_string { } { - return "NOVA Microhypervisor" + return "\n\r\fNOVA Microhypervisor" } diff --git a/tool/run/boot_dir/okl4 b/tool/run/boot_dir/okl4 index 41d1063f2..71927a2b4 100644 --- a/tool/run/boot_dir/okl4 +++ b/tool/run/boot_dir/okl4 @@ -102,7 +102,7 @@ set weaver_xml_template { proc run_boot_string { } { - return "OKL4 -" + return "\n\r\033\\\[1m\033\\\[33mOKL4 -" } diff --git a/tool/run/boot_dir/pistachio b/tool/run/boot_dir/pistachio index b91ab311f..50421a763 100644 --- a/tool/run/boot_dir/pistachio +++ b/tool/run/boot_dir/pistachio @@ -64,7 +64,7 @@ proc kernel_external { } { proc run_boot_string { } { - return "L4Ka::Pistachio -" + return "\n\r\033\\\[1m\033\\\[33mL4Ka::Pistachio -" } diff --git a/tool/run/boot_dir/sel4 b/tool/run/boot_dir/sel4 index 59c6d93f6..ca5209097 100644 --- a/tool/run/boot_dir/sel4 +++ b/tool/run/boot_dir/sel4 @@ -15,7 +15,7 @@ proc run_boot_dir_hook { } { proc run_boot_string { } { - return "Starting node #0" + return "\n\rStarting node #0" }