Skip to content

Commit

Permalink
bareboxdriver: add bootstring argument
Browse files Browse the repository at this point in the history
If 'quiet' is used as linux bootarg, you may adjust the bootstring.

Signed-off-by: Jan Remmet <j.remmet@phytec.de>
  • Loading branch information
jremmet authored and jluebbe committed Jul 11, 2017
1 parent 4f2cef9 commit a760474
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ Arguments:
- prompt (regex): barebox prompt to match
- autoboot (regex, default="stop autoboot"): autoboot message to match
- interrupt (str, default="\\n"): string to interrupt autoboot (use "\\x03" for CTRL-C)
- bootstring (regex, default="Linux version \d"): succesfully jumped into the kernel

ExternalConsoleDriver
~~~~~~~~~~~~~~~~~~~~~
Expand Down
3 changes: 2 additions & 1 deletion labgrid/driver/bareboxdriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class BareboxDriver(CommandMixin, Driver, CommandProtocol, LinuxBootProtocol):
prompt = attr.ib(default="", validator=attr.validators.instance_of(str))
autoboot = attr.ib(default="stop autoboot", validator=attr.validators.instance_of(str))
interrupt = attr.ib(default="\n", validator=attr.validators.instance_of(str))
bootstring = attr.ib(default="Linux version \d", validator=attr.validators.instance_of(str))

def __attrs_post_init__(self):
super().__attrs_post_init__()
Expand Down Expand Up @@ -149,7 +150,7 @@ def await_boot(self):
"""Wait for the initial Linux version string to verify we succesfully
jumped into the kernel.
"""
self.console.expect(r"Linux version \d")
self.console.expect(self.bootstring)

@Driver.check_active
def boot(self, name: str):
Expand Down

0 comments on commit a760474

Please sign in to comment.