[SLOF] [PATCH v2] Rework the printing of the banner during boot

Alexey Kardashevskiy aik at ozlabs.ru
Wed Apr 26 15:47:20 AEST 2017


On 26/04/17 15:15, Thomas Huth wrote:
> If the initial boot attempt fails, for example because the file that we
> downloaded via TFTP is not executable, or because the user exited grub
> instead of booting a kernel, SLOF prints out the banner text twice.
> This is quite ugly. Fix it by avoiding to print the banner during the
> first boot attempt, i.e. by adding the ".banner" command to the "boot"
> command only after we've done the first attempt via "start-it".
> 
> Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1443904
> Signed-off-by: Thomas Huth <thuth at redhat.com>

Thanks, applied.

> ---
>  board-js2x/slof/OF.fs | 6 ++++++
>  board-qemu/slof/OF.fs | 6 ++++++
>  slof/fs/boot.fs       | 3 ---
>  3 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/board-js2x/slof/OF.fs b/board-js2x/slof/OF.fs
> index f342d2f..f8cde85 100644
> --- a/board-js2x/slof/OF.fs
> +++ b/board-js2x/slof/OF.fs
> @@ -541,6 +541,12 @@ cr
>  \ this CATCH is to ensure the code bellow always executes:  boot may ABORT!
>  ' start-it CATCH drop
>  
> +: boot
> +    boot
> +    \ When we return from boot print the banner again.
> +    .banner
> +;
> +
>  #include <history.fs>
>  nvram-history? [IF]
>  ." loading shell history .. "
> diff --git a/board-qemu/slof/OF.fs b/board-qemu/slof/OF.fs
> index 5be56ed..458c9d6 100644
> --- a/board-qemu/slof/OF.fs
> +++ b/board-qemu/slof/OF.fs
> @@ -312,4 +312,10 @@ cr cr
>  \ this CATCH is to ensure the code bellow always executes:  boot may ABORT!
>  ' start-it CATCH drop
>  
> +: boot
> +    boot
> +    \ When we return from boot print the banner again.
> +    .banner
> +;
> +
>  cr ." Ready!"
> diff --git a/slof/fs/boot.fs b/slof/fs/boot.fs
> index e99a164..1fd7439 100644
> --- a/slof/fs/boot.fs
> +++ b/slof/fs/boot.fs
> @@ -268,9 +268,6 @@ read-bootlist
>     BEGIN load-next WHILE
>        disable-watchdog (go-and-catch)
>     REPEAT
> -
> -   \ When we return from boot print the banner again.
> -   .banner
>  ;
>  
>  : load load 0= IF -65 boot-exception-handler THEN ;
> 


-- 
Alexey


More information about the SLOF mailing list