Make QEMU machine and cpu optional - #1484
Merged
Merged
Conversation
Emantor
requested changes
Sep 9, 2024
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1484 +/- ##
======================================
Coverage 61.1% 61.2%
======================================
Files 185 185
Lines 15230 15232 +2
======================================
+ Hits 9319 9323 +4
+ Misses 5911 5909 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
sjg20
added a commit
to sjg20/labgrid
that referenced
this pull request
Apr 3, 2026
Cover the drivers, scripts, pytest and the Gitlab information. Note: This PR exists just so others can replicate my lab. I have created separate PRs for features and will dribble those in as they get reviewed: labgrid-project#1482 labgrid-project#1483 labgrid-project#1484 labgrid-project#1571 Cover-letter: U-Boot integration END Changes in v9: - Rebase on upstream - Add ~/.lgrc support for site-wide labgrid defaults - Add automatic file logging via LG_LOG_DIR for both client and pytest - Add timestamps and CI_JOB_ID to auto-log filenames - Make log directories world-writable for multi-user sharing - Enable automatic labgrid-client logging in lg-env - Wait for USB resources instead of using a fixed sleep - Extract _prepare_for_send() from _reset_for_send() - Add get_send_driver_name() for USB resource discovery - Reopen console when power-cycling for send - Increase USB resource timeout and add power_off_delay - Add support for the Badgerd SDWire mux - Add QEMU disk-image and writer-arguments support for EFI - Use snapshot mode for the QEMU EFI root disk - Add check_lab.py for board reliability checking Changes in v8: - Fairly minor expansions to deal with new use cases Changes in v6: - Fix reference to crossbar in _ub-bisect-try and ub-smoke - Add -x option to specify the extra board directory - Add comments to the example lg-env - Define USE_LABGRID to tell u-boot-hooks to use labgrid hooks - Add a few more comments to ub-pyt - Show the build path with ub-pyt -v - Add --allow-unmatched to ub-smoke to avoid QEMU error - Add a new section on compatibility - Add a new section on script usage Changes in v5: - Rebase on latest grpc branch - Fix pylint errors and warnings Changes in v4: - Support for Beagleplay, which needs files from two separate U-Boot builds - Support for a 'recovery' button needed to boot the image - Tidy up the internal-console support - Fix pytest behaviour with an unpatched U-Boot (that doesn't have lab mode) Changes in v3: - Rebase on top of grpc branch - Don't mess with terminal setting unless stdin is a terminal - Don't show an error if there are no resources when auto-acquiring - Support QEMU in UBootWriter Some changes in v2: - Rationalise the flags for the U-Boot scripts - Support tracing with em100 - Support an internal terminal instead of microcom - Add a -D flag for debugging - Support send-only boards - Add a way to build the U-Boot config - Add a control for buildman's process-limit - allow the build-dir to be specified in a variable - add documentation about U-Boot-pytest integration - add source_dir and config_file to UBootProviderDriver - add an internal terminal - expand the U-Boot scripts - significantly improve the U-Boot-pytest integration The approximate diffstat is: contrib/sync-places.py | 23 +- contrib/u-boot/.gitignore | 1 + contrib/u-boot/_ub-bisect-try | 47 ++ contrib/u-boot/conftest.py | 21 + contrib/u-boot/get_args.sh | 128 +++++ contrib/u-boot/index.rst | 232 +++++++++ contrib/u-boot/lg-client | 11 + contrib/u-boot/lg-env | 10 + contrib/u-boot/test_smoke.py | 3 + contrib/u-boot/ub-bisect | 44 ++ contrib/u-boot/ub-cli | 39 ++ contrib/u-boot/ub-int | 41 ++ contrib/u-boot/ub-pyt | 69 +++ contrib/u-boot/ub-smoke | 48 ++ doc/configuration.rst | 611 ++++++++++++++++++++++- doc/usage.rst | 288 +++++++++++ labgrid/driver/__init__.py | 10 +- labgrid/driver/common.py | 11 + labgrid/driver/consoleexpectmixin.py | 7 + labgrid/driver/powerdriver.py | 29 ++ labgrid/driver/qemudriver.py | 84 ++-- labgrid/driver/recoverydriver.py | 25 + labgrid/driver/resetdriver.py | 7 + labgrid/driver/servodriver.py | 157 ++++++ labgrid/driver/sfemulatordriver.py | 102 ++++ labgrid/driver/ubootdriver.py | 27 +- labgrid/driver/ubootproviderdriver.py | 323 ++++++++++++ labgrid/driver/ubootwriterdriver.py | 160 ++++++ labgrid/driver/usbhidrelay.py | 7 +- labgrid/driver/usbloader.py | 170 ++++++- labgrid/driver/usbstoragedriver.py | 18 +- labgrid/factory.py | 4 +- labgrid/protocol/__init__.py | 1 + labgrid/protocol/bootstrapprotocol.py | 8 +- labgrid/protocol/recoveryprotocol.py | 14 + labgrid/protocol/resetprotocol.py | 12 + labgrid/pytestplugin/fixtures.py | 21 +- labgrid/pytestplugin/hooks.py | 8 + labgrid/remote/client.py | 351 ++++++++----- labgrid/remote/config.py | 7 +- labgrid/remote/exporter.py | 122 ++++- labgrid/resource/__init__.py | 6 + labgrid/resource/remote.py | 24 + labgrid/resource/servo.py | 485 ++++++++++++++++++ labgrid/resource/sfemulator.py | 33 ++ labgrid/resource/suggest.py | 6 + labgrid/resource/udev.py | 33 ++ labgrid/strategy/ubootstrategy.py | 151 +++++- labgrid/target.py | 120 ++++- labgrid/util/helper.py | 220 ++++---- labgrid/util/ssh.py | 3 +- labgrid/util/term.py | 184 +++++++ labgrid/var_dict.py | 8 + man/labgrid-client.1 | 6 + man/labgrid-client.rst | 4 + man/labgrid-device-config.5 | 4 + 56 files changed, 4267 insertions(+), 321 deletions(-) [1] https://github.com/labgrid-project/labgrid/issues/created_by/sjg20 Signed-off-by: Simon Glass <sjg@chromium.org>
sjg20
added a commit
to sjg20/labgrid
that referenced
this pull request
May 3, 2026
Cover the drivers, scripts, pytest and the Gitlab information. Note: This PR exists just so others can replicate my lab. I have created separate PRs for features and will dribble those in as they get reviewed: labgrid-project#1482 labgrid-project#1483 labgrid-project#1484 labgrid-project#1571 Cover-letter: U-Boot integration END Changes in v9: - Rebase on upstream - Add ~/.lgrc support for site-wide labgrid defaults - Add automatic file logging via LG_LOG_DIR for both client and pytest - Add timestamps and CI_JOB_ID to auto-log filenames - Make log directories world-writable for multi-user sharing - Enable automatic labgrid-client logging in lg-env - Wait for USB resources instead of using a fixed sleep - Extract _prepare_for_send() from _reset_for_send() - Add get_send_driver_name() for USB resource discovery - Reopen console when power-cycling for send - Increase USB resource timeout and add power_off_delay - Add support for the Badgerd SDWire mux - Add QEMU disk-image and writer-arguments support for EFI - Use snapshot mode for the QEMU EFI root disk - Add check_lab.py for board reliability checking Changes in v8: - Fairly minor expansions to deal with new use cases Changes in v6: - Fix reference to crossbar in _ub-bisect-try and ub-smoke - Add -x option to specify the extra board directory - Add comments to the example lg-env - Define USE_LABGRID to tell u-boot-hooks to use labgrid hooks - Add a few more comments to ub-pyt - Show the build path with ub-pyt -v - Add --allow-unmatched to ub-smoke to avoid QEMU error - Add a new section on compatibility - Add a new section on script usage Changes in v5: - Rebase on latest grpc branch - Fix pylint errors and warnings Changes in v4: - Support for Beagleplay, which needs files from two separate U-Boot builds - Support for a 'recovery' button needed to boot the image - Tidy up the internal-console support - Fix pytest behaviour with an unpatched U-Boot (that doesn't have lab mode) Changes in v3: - Rebase on top of grpc branch - Don't mess with terminal setting unless stdin is a terminal - Don't show an error if there are no resources when auto-acquiring - Support QEMU in UBootWriter Some changes in v2: - Rationalise the flags for the U-Boot scripts - Support tracing with em100 - Support an internal terminal instead of microcom - Add a -D flag for debugging - Support send-only boards - Add a way to build the U-Boot config - Add a control for buildman's process-limit - allow the build-dir to be specified in a variable - add documentation about U-Boot-pytest integration - add source_dir and config_file to UBootProviderDriver - add an internal terminal - expand the U-Boot scripts - significantly improve the U-Boot-pytest integration The approximate diffstat is: contrib/sync-places.py | 23 +- contrib/u-boot/.gitignore | 1 + contrib/u-boot/_ub-bisect-try | 47 ++ contrib/u-boot/conftest.py | 21 + contrib/u-boot/get_args.sh | 128 +++++ contrib/u-boot/index.rst | 232 +++++++++ contrib/u-boot/lg-client | 11 + contrib/u-boot/lg-env | 10 + contrib/u-boot/test_smoke.py | 3 + contrib/u-boot/ub-bisect | 44 ++ contrib/u-boot/ub-cli | 39 ++ contrib/u-boot/ub-int | 41 ++ contrib/u-boot/ub-pyt | 69 +++ contrib/u-boot/ub-smoke | 48 ++ doc/configuration.rst | 611 ++++++++++++++++++++++- doc/usage.rst | 288 +++++++++++ labgrid/driver/__init__.py | 10 +- labgrid/driver/common.py | 11 + labgrid/driver/consoleexpectmixin.py | 7 + labgrid/driver/powerdriver.py | 29 ++ labgrid/driver/qemudriver.py | 84 ++-- labgrid/driver/recoverydriver.py | 25 + labgrid/driver/resetdriver.py | 7 + labgrid/driver/servodriver.py | 157 ++++++ labgrid/driver/sfemulatordriver.py | 102 ++++ labgrid/driver/ubootdriver.py | 27 +- labgrid/driver/ubootproviderdriver.py | 323 ++++++++++++ labgrid/driver/ubootwriterdriver.py | 160 ++++++ labgrid/driver/usbhidrelay.py | 7 +- labgrid/driver/usbloader.py | 170 ++++++- labgrid/driver/usbstoragedriver.py | 18 +- labgrid/factory.py | 4 +- labgrid/protocol/__init__.py | 1 + labgrid/protocol/bootstrapprotocol.py | 8 +- labgrid/protocol/recoveryprotocol.py | 14 + labgrid/protocol/resetprotocol.py | 12 + labgrid/pytestplugin/fixtures.py | 21 +- labgrid/pytestplugin/hooks.py | 8 + labgrid/remote/client.py | 351 ++++++++----- labgrid/remote/config.py | 7 +- labgrid/remote/exporter.py | 122 ++++- labgrid/resource/__init__.py | 6 + labgrid/resource/remote.py | 24 + labgrid/resource/servo.py | 485 ++++++++++++++++++ labgrid/resource/sfemulator.py | 33 ++ labgrid/resource/suggest.py | 6 + labgrid/resource/udev.py | 33 ++ labgrid/strategy/ubootstrategy.py | 151 +++++- labgrid/target.py | 120 ++++- labgrid/util/helper.py | 220 ++++---- labgrid/util/ssh.py | 3 +- labgrid/util/term.py | 184 +++++++ labgrid/var_dict.py | 8 + man/labgrid-client.1 | 6 + man/labgrid-client.rst | 4 + man/labgrid-device-config.5 | 4 + 56 files changed, 4267 insertions(+), 321 deletions(-) [1] https://github.com/labgrid-project/labgrid/issues/created_by/sjg20 Signed-off-by: Simon Glass <sjg@chromium.org>
sjg20
force-pushed
the
push3-qemu
branch
2 times, most recently
from
July 28, 2026 14:58
cb2da68 to
e8ee639
Compare
Contributor
Author
|
OK I have slimmed this down a bit so PTAL |
Emantor
previously approved these changes
Jul 31, 2026
Bastian-Krause
force-pushed
the
push3-qemu
branch
from
August 26, 2026 12:28
e8ee639 to
46ac12c
Compare
Bastian-Krause
approved these changes
Aug 26, 2026
Bastian-Krause
left a comment
Member
There was a problem hiding this comment.
Force-pushed:
- drop extra_args handling as it is already optional
- drop redundant doc example
- improve docs
Emantor
approved these changes
Aug 26, 2026
At least for x86 devices it is not necessary to provide these arguments. Make them optional. Add tests for the optional arguments. Signed-off-by: Simon Glass <sjg@chromium.org> [bst: drop extra_args handling as it is already optional, drop redundant doc example, improve docs] Signed-off-by: Bastian Krause <bst@pengutronix.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the QEMU driver's machine, cpu and extra_args parameters optional, since on x86 these are typically not specified. It allows a simpler configuration for x86 targets.