Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BareboxDriver and (Small)UBootDriver: does not handle hex interrupt arguments (such as Ctrl-C) properly #1622

Open
pmelange opened this issue Feb 28, 2025 · 0 comments · May be fixed by #1623

Comments

@pmelange
Copy link
Contributor

In the BareboxDriver, UBootDriver, and SmallUBootDriver, the option sent to the bootloader to interrupt boot loading is done with some form of:

self.console.write(interrupstring.encode('ASCII'))

According to the documentation

use \x03 for CTRL-C
or
use “\x03” for CTRL-C

Neither of these work.

After using labgrid-client -vv I see the following is written to the console

CONSOLE SerialLogger.ma:   SerialDriver(main) > \x03␍␤
DEBUG   SerialDriver(ma:   Write 4 bytes: b'\\x03'

or

CONSOLE SerialLogger.ma:   SerialDriver(main) > \\x03␍␤
DEBUG   SerialDriver(ma:   Write 5 bytes: b'\\\\x03'

Neither of which is correct and causing the boot loader not to be interrupted.

pmelange added a commit to pmelange/labgrid that referenced this issue Feb 28, 2025
Checks to see if the interrupt string starts with \x and when that
is the case, converts the remained of the string to a bytearray before
sending the interrupt to the boot loader.

fixes labgrid-project#1622

Signed-off-by: Perry Melange <[email protected]>
pmelange added a commit to pmelange/labgrid that referenced this issue Feb 28, 2025
Checks to see if the interrupt string starts with \x and when that
is the case, converts the remained of the string to a bytearray before
sending the interrupt to the boot loader.

fixes labgrid-project#1622

Signed-off-by: Perry Melange <[email protected]>
pmelange added a commit to pmelange/labgrid that referenced this issue Mar 1, 2025
Checks to see if the interrupt string starts with \x and when that
is the case, converts the remained of the string to a bytearray before
sending the interrupt to the boot loader.

fixes labgrid-project#1622

Signed-off-by: Perry Melange <[email protected]>
pmelange added a commit to pmelange/labgrid that referenced this issue Mar 1, 2025
Checks to see if the interrupt string starts with \x and when that
is the case, converts the remained of the string to a bytearray before
sending the interrupt to the boot loader.

fixes labgrid-project#1622

Signed-off-by: Perry Melange <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant