From 7e23b704f09898fe452735d414ca4809af425acb Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Wed, 17 Apr 2024 17:58:26 +0200 Subject: [PATCH] sculpt: disable serial output when LOG!=core Issue #5180 --- repos/gems/run/sculpt.run | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/repos/gems/run/sculpt.run b/repos/gems/run/sculpt.run index 6510f1a4e5..243e0b32c5 100644 --- a/repos/gems/run/sculpt.run +++ b/repos/gems/run/sculpt.run @@ -25,8 +25,29 @@ proc assert_platform_supported { } { assert_platform_supported -if {[have_spec nova]} { - proc kernel_output { } { return "novga serial logmem" } +proc log_core { } { + + global ::env + + if {[info exists ::env(LOG)]} { + if {$::env(LOG) == "core"} { return true } + } + + return false +} + + +if {[log_core]} { + if {[have_spec nova]} { + proc kernel_output { } { return "novga serial logmem" } + } +} else { + # disable default enabled serial log output via core + proc boot_output { } { return "" } + + if {[have_spec nova]} { + proc kernel_output { } { return "novga logmem" } + } } @@ -141,10 +162,8 @@ import_from_depot [depot_user]/src/[base_src] \ proc log_route { } { - global ::env - if {[info exists ::env(LOG)]} { - if {$::env(LOG) == "core"} { - return { } } } + if {[log_core]} { + return { } } return { } }