mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] test/strategy.py: optionally don't activate BareboxDriver
@ 2026-01-08 10:07 Sascha Hauer
  2026-01-08 14:42 ` Ahmad Fatoum
  2026-01-08 16:05 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Sascha Hauer @ 2026-01-08 10:07 UTC (permalink / raw)
  To: Barebox List

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-08 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-08 10:07 [PATCH] test/strategy.py: optionally don't activate BareboxDriver Sascha Hauer
2026-01-08 14:42 ` Ahmad Fatoum
2026-01-08 16:05 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox