On 1/8/26 11:07 AM, Sascha Hauer wrote:
> When bootstrapping barebox on QEMU with my barebox-bringup utility it
> brings it to the 'barebox' state before opening a console. The
> BareboxDriver consumes all console messages in order to bring barebox
> to the prompt. This is bad for interactive use where one wants to
> see the console output right from the start.
> 
> Insert a 'on' state which brings up QEMU but doesn't activate the
> BareboxDriver.
> 
> Signed-off-by: Sascha Hauer <[email protected]>

Reviewed-by: Ahmad Fatoum <[email protected]>

> ---
>  test/strategy.py | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/test/strategy.py b/test/strategy.py
> index 0f1b761474..0ca08b0cdd 100644
> --- a/test/strategy.py
> +++ b/test/strategy.py
> @@ -21,11 +21,12 @@ if match is None or int(match.group(1)) < 25:
>  class Status(enum.Enum):
>      unknown = 0
>      off = 1
> -    barebox = 2
> -    qemu_dry_run = 3
> -    qemu_interactive = 4
> -    qemu_dump_dtb = 5
> -    shell = 6
> +    on = 2
> +    barebox = 3
> +    qemu_dry_run = 4
> +    qemu_interactive = 5
> +    qemu_dump_dtb = 6
> +    shell = 7
>  
>  
>  @target_factory.reg_driver
> @@ -63,11 +64,13 @@ class BareboxTestStrategy(Strategy):
>              self.target.deactivate(self.console)
>              self.target.activate(self.power)
>              self.power.off()
> -        elif status == Status.barebox:
> +        elif status == Status.on:
>              self.transition(Status.off)  # pylint: disable=missing-kwoa
>              self.target.activate(self.console)
>              # cycle power
>              self.power.cycle()
> +        elif status == Status.barebox:
> +            self.transition(Status.on)  # pylint: disable=missing-kwoa
>              # interrupt barebox
>              self.target.activate(self.barebox)
>          elif status == Status.shell:

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |


Reply via email to