Skip to content

Commit

Permalink
external/mambo: Add an option to exit Mambo when the system is shutdown
Browse files Browse the repository at this point in the history
Automatically exiting can be convenient for scripting. Will also exit
due to a HW crash (eg. unhandled exception).

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[stewart: handle case where SKIBOOT_AUTORUN is not set]
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
apopple authored and stewartsmith committed May 15, 2019
1 parent 90d01f9 commit d7636a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions external/mambo/README.md
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions external/mambo/skiboot.tcl
Expand Up @@ -590,3 +590,7 @@ if { [info exists env(SKIBOOT_AUTORUN)] } {
} else {
readline
}

if { [info exists env(SKIBOOT_AUTORUN)] && $env(SKIBOOT_AUTORUN) == 2 } {
quit
}

0 comments on commit d7636a1

Please sign in to comment.