[Skiboot] [PATCH] external/mambo: Add an option to exit Mambo when the system is shutdown
Nicholas Piggin
npiggin at gmail.com
Sat Apr 20 20:13:40 AEST 2019
From: Alistair Popple <alistair at popple.id.au>
Automatically exiting can be convenient for scripting. Will also exit
due to a HW crash (eg. unhandled exception).
Signed-off-by: Alistair Popple <alistair at popple.id.au>
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
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 a0bc4a0fd..0390cc0ab 100644
--- a/external/mambo/README.md
+++ b/external/mambo/README.md
@@ -40,6 +40,11 @@ export SKIBOOT_ZIMAGE=$HOME/src/op-build/output/images/zImage.epapr
export SKIBOOT=$HOME/src/op-build/output/images/skiboot.lid
export SKIBOOT_AUTORUN=1
```
+If you want Mambo to autmatically run *AND* exit when the system is
+shutdown (or has a HW crash) use this:
+```
+export SKIBOOT_AUTORUN=2
+```
If you want a vmlinux and separate initramfs you can also do this:
```
export SKIBOOT_ZIMAGE=$HOME/src/op-build/output/images/vmlinux
diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl
index 1b05ba843..658155ae8 100644
--- a/external/mambo/skiboot.tcl
+++ b/external/mambo/skiboot.tcl
@@ -590,3 +590,7 @@ if { [info exists env(SKIBOOT_AUTORUN)] } {
} else {
readline
}
+
+if { $env(SKIBOOT_AUTORUN) == 2 } {
+ quit
+}
--
2.20.1
More information about the Skiboot
mailing list