From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] test/strategy.py: optionally don't activate BareboxDriver
Date: Thu, 8 Jan 2026 15:42:16 +0100 [thread overview]
Message-ID: <4ca7bfa9-0df4-4223-90f5-22eea10a8fd2@pengutronix.de> (raw)
In-Reply-To: <20260108100739.1731988-1-s.hauer@pengutronix.de>
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 <s.hauer@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> 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 |
next prev parent reply other threads:[~2026-01-08 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 10:07 Sascha Hauer
2026-01-08 14:42 ` Ahmad Fatoum [this message]
2026-01-08 16:05 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ca7bfa9-0df4-4223-90f5-22eea10a8fd2@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox