From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] test/strategy.py: optionally don't activate BareboxDriver
Date: Thu, 8 Jan 2026 11:07:39 +0100 [thread overview]
Message-ID: <20260108100739.1731988-1-s.hauer@pengutronix.de> (raw)
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>
---
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:
--
2.47.3
next reply other threads:[~2026-01-08 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 10:07 Sascha Hauer [this message]
2026-01-08 14:42 ` Ahmad Fatoum
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=20260108100739.1731988-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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