Skip to content
This repository was archived by the owner on Jan 23, 2026. It is now read-only.

Commit 00c64e5

Browse files
match => prompt only at the beginning of the line
some commands print strings resembling the prompt, e.g.: => crc32 0x48000000 0xc8438; echo $? crc32 for 48000000 ... 480c8437 ==> bd70c7dc
1 parent c7282f0 commit 00c64e5

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/jumpstarter-driver-uboot/jumpstarter_driver_uboot/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def reboot_to_console(self, *, debug=False) -> Generator[None]:
4646
for _ in range(100): # TODO: configurable retries
4747
try:
4848
p.send(ESC)
49-
p.expect_exact(self.prompt, timeout=0.1)
49+
# in case of "bootmenu" there are all sort of escape sequences in the output so try to
50+
# catch prompt without any leading newlines, hoping it's not in the menu text somewhere
51+
p.expect_exact(self.prompt.lstrip("\n"), timeout=0.1)
5052
except pexpect.TIMEOUT:
5153
continue
5254

packages/jumpstarter-driver-uboot/jumpstarter_driver_uboot/driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
@dataclass(kw_only=True)
77
class UbootConsole(Driver):
8-
prompt: str = "=>"
8+
prompt: str = "\n=>"
99

1010
@classmethod
1111
def client(cls) -> str:

0 commit comments

Comments
 (0)