From patchwork Tue Feb 19 01:45:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Popple X-Patchwork-Id: 1044393 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 443NqX1DRqz9s5c for ; Tue, 19 Feb 2019 12:46:00 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 443NqW6WX5zDqDq for ; Tue, 19 Feb 2019 12:45:59 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 443NqQ5tdFzDq60 for ; Tue, 19 Feb 2019 12:45:54 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=popple.id.au Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 443NqQ3LTTz9s5c; Tue, 19 Feb 2019 12:45:54 +1100 (AEDT) From: Alistair Popple To: skiboot@lists.ozlabs.org Date: Tue, 19 Feb 2019 12:45:51 +1100 Message-Id: <20190219014551.12700-1-alistair@popple.id.au> X-Mailer: git-send-email 2.11.0 Subject: [Skiboot] [PATCH] external/mambo: Add an option to exit Mambo when the system is shutdown X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Popple MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Automatically exiting can be convenient for scripting. Will also exit due to a HW crash (eg. unhandled exception). Signed-off-by: Alistair Popple --- external/mambo/README.md | 5 +++++ external/mambo/skiboot.tcl | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/external/mambo/README.md b/external/mambo/README.md index 750a81e4..a11fe4ae 100644 --- a/external/mambo/README.md +++ b/external/mambo/README.md @@ -47,6 +47,11 @@ export SKIBOOT_INITRD=$HOME/src/op-build/output/images/rootfs.cpio.xz export SKIBOOT=$HOME/src/skiboot/skiboot.lid export SKIBOOT_AUTORUN=1 ``` +If you want Mambo to autmatically exit when the system is shutdown (or +has a HW crash) use this: +``` +export SKIBOOT_AUTORUN=2 +``` ### Run the simulator ``` diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl index 25414450..62c21897 100644 --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -568,3 +568,7 @@ if { [info exists env(SKIBOOT_AUTORUN)] } { readline } } + +if { $env(SKIBOOT_AUTORUN) == 2 } { + quit +}