[Skiboot] [PATCH v3 2/7] external/mambo: Add an option to exit Mambo when the system is shutdown

Oliver oohall at gmail.com
Fri May 10 15:17:49 AEST 2019


On Wed, May 8, 2019 at 4:35 PM Nicholas Piggin <npiggin at gmail.com> wrote:
>
> 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).
>
> Reviewed-by: Nicholas Piggin <npiggin at gmail.com>
> 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
> +}

I think this would make more sense as a separate variable, but I also
don't really care.

> --
> 2.20.1
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot


More information about the Skiboot mailing list