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
U-Boot boot commands Support #1082
Conversation
Codecov ReportBase: 63.2% // Head: 63.3% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1082 +/- ##
======================================
Coverage 63.2% 63.3%
======================================
Files 152 152
Lines 11330 11339 +9
======================================
+ Hits 7168 7179 +11
+ Misses 4162 4160 -2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
labgrid/driver/ubootdriver.py
Outdated
@step(args=['cmd']) | ||
def boot(self, cmd: str = ""): | ||
"""Boot the default if cmd is empty or a specific boot cmd otherwise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LinuxBootProtocol defines this parameter as cmd
: https://github.com/labgrid-project/labgrid/blob/master/labgrid/protocol/linuxbootprotocol.py#L6
We could have a dict in the UBootDriver configuration which defines commands for each boot "entry". What do you think? @jremmet @Emantor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea. I would be configurable, and we can check if exists. Guess self.boot_command
should continue to work and the default for name = ""
? @jluebbe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Perhaps something like:
boot_commands:
a: "run boot_slot_a"
b: "run boot_slot_b"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way, you could also reuse test cases and Strategies easier with different boards.
uboot doesn't have pre defined boot sources. The "boot" command takes no parameters. Add self.boot_commands to hold different boot_command by name. They can be used with LinuxBootProtocol boot(name) Signed-off-by: Jan Remmet <j.remmet@phytec.de>
Test if cmd parameter is send to console or the default if no cmd is given. Fix names while on it. Signed-off-by: Jan Remmet <j.remmet@phytec.de>
bdb803d
to
cfb9903
Compare
uboot doesn't have pre defined boot sources. The "boot" command takes no parameters.
Add self.boot_commands to hold different boot_command by name.
They can be used with LinuxBootProtocol boot(name)
Checklist