Skip to contentSkip to conversation

Add support for Labgrid

PATCH In review Simon Glass 2 participants 5 messages Nov 4, 2024

lore
Share & tools
lore
#0 lore raw

v5 cover Add support for Labgrid

This adds hooks for use with my integration for Labgrid (called Labgrid-sjg). The only existing hook that really does anything with the target, with this integration, is the 'console' one. There is also a new 'getrole' hook which looks up a role to find various things about it, such as the U-Boot board name.

Changes in v5:
- Use Labgrid-sjg instead of Labgrid
- Use LABGRID_SJG to indicates the 'Labgrid-sjg' integration is running
- Update commit message and cover letter for Labgrid-sjg

Changes in v4:
- Use an environment variable to select the Labgrid hooks
- Add new patch to add .none scripts for power off/on
- Support pytest fully with dual-build boards like Beagleplay

Changes in v3:
- Fall back to conf.${board_type}_${board_ident} if conf.all missing
- Update scripts for latest version of Labgrid integration
- Add poweroff.none and poweron.none
- Provide -n flag when querying board info
- Target the grpc version of Labgrid which is now in -master
- Update README to cover the changes

Changes in v2:
- Make use of the common script (only) to set bin_dir
- Make use of the common script (only) to set bin_dir

Simon Glass (3):
Create a common file for test scripts
Add .none scripts for power off/on
Provide some basic scripts for Labgrid integration

 README.md                        | 51 ++++++++++++++++++++++++++++++++
 bin/console.labgrid-sjg          | 42 ++++++++++++++++++++++++++
 bin/ellesmere/common-labgrid-sjg | 46 ++++++++++++++++++++++++++++
 bin/ellesmere/conf.all           | 24 +++++++++++++++
 bin/getrole.labgrid-sjg          | 25 ++++++++++++++++
 bin/poweroff.none                | 22 ++++++++++++++
 bin/poweron.none                 | 22 ++++++++++++++
 bin/release.labgrid-sjg          | 22 ++++++++++++++
 bin/release.none                 | 22 ++++++++++++++
 bin/u-boot-test-common           | 36 ++++++++++++++++++++++
 bin/u-boot-test-console          |  8 +----
 bin/u-boot-test-flash            |  8 +----
 bin/u-boot-test-getrole          | 38 ++++++++++++++++++++++++
 bin/u-boot-test-power-off        |  8 +----
 bin/u-boot-test-power-on         |  8 +----
 bin/u-boot-test-release          | 26 ++++++++++++++++
 bin/u-boot-test-reset            |  8 +----
 17 files changed, 381 insertions(+), 35 deletions(-)
 create mode 100644 bin/console.labgrid-sjg
 create mode 100755 bin/ellesmere/common-labgrid-sjg
 create mode 100644 bin/ellesmere/conf.all
 create mode 100644 bin/getrole.labgrid-sjg
 create mode 100755 bin/poweroff.none
 create mode 100755 bin/poweron.none
 create mode 100644 bin/release.labgrid-sjg
 create mode 100644 bin/release.none
 create mode 100755 bin/u-boot-test-common
 create mode 100755 bin/u-boot-test-getrole
 create mode 100755 bin/u-boot-test-release
Signature · 1 line
2.34.1
#1 lore raw

PATCH v5 1/3 Create a common file for test scripts

The top part of each of the u-boot-test-* files is common. Put it in a common script file to avoid duplication and to allow it to be replaced for the Labgrid-sjg integration.

---

Changes in v5:
- Use Labgrid-sjg instead of Labgrid
- Use LABGRID_SJG to indicates the 'Labgrid-sjg' integration is running

Changes in v4:
- Use an environment variable to select the Labgrid hooks

Changes in v3:
- Fall back to conf.${board_type}_${board_ident} if conf.all missing

Changes in v2:
- Make use of the common script (only) to set bin_dir

 bin/u-boot-test-common    | 36 ++++++++++++++++++++++++++++++++++++
 bin/u-boot-test-console   |  8 +-------
 bin/u-boot-test-flash     |  8 +-------
 bin/u-boot-test-power-off |  8 +-------
 bin/u-boot-test-power-on  |  8 +-------
 bin/u-boot-test-reset     |  8 +-------
 6 files changed, 41 insertions(+), 35 deletions(-)
 create mode 100755 bin/u-boot-test-common
bin/u-boot-test-common new file +36 -0
new file mode 100755
index 0000000..2c3b476
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Copyright 2024 Google LLC
+# Written by Simon Glass <[email protected]>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+set -e
+
+bin_dir="`dirname $0`"
+board_type="$1"
+board_ident="$2"
+hostname="`hostname`"
+
+# Use either the Labgrid integration or the traditional hooks
+if [ -n "${USE_LABGRID_SJG}" ]; then
+	. "${bin_dir}/${hostname}/conf.all"
+else
+	. "${bin_dir}/${hostname}/conf.${board_type}_${board_ident}"
+fi
bin/u-boot-test-console +1 -7
index 0b6b4ac..8b7377a 100755
@@ -20,12 +20,6 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-set -e
-
-bin_dir="`dirname $0`"
-board_type="$1"
-board_ident="$2"
-hostname="`hostname`"
-. "${bin_dir}/${hostname}/conf.${board_type}_${board_ident}"
+. "$(dirname $0)/u-boot-test-common"
 
 . "${bin_dir}/console.${console_impl:-picocom}"
bin/u-boot-test-flash +1 -7
index 8dcf198..bd89a50 100755
@@ -20,12 +20,6 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-set -e
-
-bin_dir="`dirname $0`"
-board_type="$1"
-board_ident="$2"
-hostname="`hostname`"
-. "${bin_dir}/${hostname}/conf.${board_type}_${board_ident}"
+. "$(dirname $0)/u-boot-test-common"
 
 . "${bin_dir}/flash.${flash_impl}"
bin/u-boot-test-power-off +1 -7
index b59436a..83b69c0 100755
@@ -20,12 +20,6 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-set -e
-
-bin_dir="`dirname $0`"
-board_type="$1"
-board_ident="$2"
-hostname="`hostname`"
-. "${bin_dir}/${hostname}/conf.${board_type}_${board_ident}"
+. "$(dirname $0)/u-boot-test-common"
 
 . "${bin_dir}/poweroff.${power_impl}"
bin/u-boot-test-power-on +1 -7
index ca87477..5a41c3e 100755
@@ -20,12 +20,6 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-set -e
-
-bin_dir="`dirname $0`"
-board_type="$1"
-board_ident="$2"
-hostname="`hostname`"
-. "${bin_dir}/${hostname}/conf.${board_type}_${board_ident}"
+. "$(dirname $0)/u-boot-test-common"
 
 . "${bin_dir}/poweron.${power_impl}"
bin/u-boot-test-reset +1 -7
index a160e0c..77e3f40 100755
@@ -20,12 +20,6 @@
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
 
-set -e
-
-bin_dir="`dirname $0`"
-board_type="$1"
-board_ident="$2"
-hostname="`hostname`"
-. "${bin_dir}/${hostname}/conf.${board_type}_${board_ident}"
+. "$(dirname $0)/u-boot-test-common"
 
 . "${bin_dir}/reset.${reset_impl}"
Signature · 1 line
2.34.1
#2 lore raw

PATCH v5 2/3 Add .none scripts for power off/on

In reply to Simon Glass

These methods don't have a 'none' method right now, but it will be needed for Labgrid. Add these scripts.

Note that these are not used by the existing integration, which requires that boards can be powered off and on.

---

(no changes since v4)

Changes in v4:
- Add new patch to add .none scripts for power off/on

 bin/poweroff.none | 22 ++++++++++++++++++++++
 bin/poweron.none  | 22 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100755 bin/poweroff.none
 create mode 100755 bin/poweron.none
bin/poweroff.none new file +22 -0
new file mode 100755
index 0000000..cd9733e
@@ -0,0 +1,22 @@
+# Copyright 2024 Google LLC
+# Written by Simon Glass <[email protected]>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+# No power-control needed
bin/poweron.none new file +22 -0
new file mode 100755
index 0000000..cd9733e
@@ -0,0 +1,22 @@
+# Copyright 2024 Google LLC
+# Written by Simon Glass <[email protected]>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+# No power-control needed
Signature · 1 line
2.34.1
#3 lore raw

PATCH v5 3/3 Provide some basic scripts for Labgrid integration

In reply to Simon Glass

With Labgrid we don't need to specify the various methods, except for the console, which simply calls labgrid-client.

This allows supporting any boards in your lab, without adding per-board configuration to these hooks.

Provide ellesmere files as an example lab-configuration.

---

Changes in v5:
- Update commit message and cover letter for Labgrid-sjg

Changes in v4:
- Support pytest fully with dual-build boards like Beagleplay

Changes in v3:
- Update scripts for latest version of Labgrid integration
- Add poweroff.none and poweron.none
- Provide -n flag when querying board info
- Target the grpc version of Labgrid which is now in -master
- Update README to cover the changes

Changes in v2:
- Make use of the common script (only) to set bin_dir

 README.md                        | 51 ++++++++++++++++++++++++++++++++
 bin/console.labgrid-sjg          | 42 ++++++++++++++++++++++++++
 bin/ellesmere/common-labgrid-sjg | 46 ++++++++++++++++++++++++++++
 bin/ellesmere/conf.all           | 24 +++++++++++++++
 bin/getrole.labgrid-sjg          | 25 ++++++++++++++++
 bin/release.labgrid-sjg          | 22 ++++++++++++++
 bin/release.none                 | 22 ++++++++++++++
 bin/u-boot-test-getrole          | 38 ++++++++++++++++++++++++
 bin/u-boot-test-release          | 26 ++++++++++++++++
 9 files changed, 296 insertions(+)
 create mode 100644 bin/console.labgrid-sjg
 create mode 100755 bin/ellesmere/common-labgrid-sjg
 create mode 100644 bin/ellesmere/conf.all
 create mode 100644 bin/getrole.labgrid-sjg
 create mode 100644 bin/release.labgrid-sjg
 create mode 100644 bin/release.none
 create mode 100755 bin/u-boot-test-getrole
 create mode 100755 bin/u-boot-test-release
README.md +51 -0
index 290e4d0..7abcff7 100644
@@ -199,6 +199,57 @@ scripts must be replicated once per board instance, or their actions somehow
 serialized, since they copy files into their own directories when executing, and
 hence parallel execution would cause incorrect operation.
 
+## Labgrid Integration
+
+Labgrid is a python library for embedded-board-control. It includes a client
+program which is used to integrate with the U-Boot pytests.
+
+Since Labgrid has all the information necessary to build and boot on a lab,
+there is no per-board configuration required. The various flash.xxx and
+recovery.xxx scripts are not used. To set it up:
+
+- In your bin/$hostname directory, create an executable file
+  `common-labgrid-sjg` and set your crossbar and environment information, for
+  example:
+
+      # Hostname and port for the gRPC coordinator
+      export LG_COORDINATOR=kea:20408
+
+      # Environment file for the lab
+      export LG_ENV="/path/to/kea_env.cfg"
+
+      # Location of the U-Boot test hooks
+      export UB_TEST_HOOKS=/path/to/u-boot-test-hooks
+
+      # Make sure only one buildman can run at a time, since it uses all CPUs
+      export BUILDMAN_PROCESS_LIMIT=1
+
+      # Use the internal console since microcom can miss serial input at boot
+      export LG_CONSOLE="internal"
+
+      # Tell u-boot-test-hooks to use the Labgrid-sjg integration
+      export USE_LABGRID_SJG=1
+
+      flash_impl=none
+      reset_impl=none
+      console_impl=labgrid-sjg
+      release_impl=labgrid-sjg
+      getrole_impl=labgrid-sjg
+      power_impl=none
+
+The last 6 lines tell the hooks to use Labgrid for console and board release
+as well as a new 'getrole' hook which is only used by Labgrid. The flash, reset
+and power features of boards are all handled by entirely by Labgrid.
+
+Then create another executable file (in the same directory) called 'conf.all',
+containing::
+
+    .. code-block:: bash
+
+    . "${bin_dir}/${hostname}/common-labgrid-sjg"
+
+That should be all that is needed.
+
 ## Dependencies
 
 The example scripts depend on various external tools, the installation location
bin/console.labgrid-sjg new file +42 -0

42 lines not on this page · raw message

bin/ellesmere/common-labgrid-sjg new file +46 -0

46 lines not on this page · raw message

bin/ellesmere/conf.all new file +24 -0
new file mode 100644
index 0000000..4a82ee7
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Copyright 2024 Google LLC
+# Written by Simon Glass <[email protected]>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+. "${bin_dir}/${hostname}/common-labgrid-sjg"
bin/getrole.labgrid-sjg new file +25 -0
new file mode 100644
index 0000000..52fc3ce
@@ -0,0 +1,25 @@
+# Copyright 2024 Google LLC
+# Written by Simon Glass
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+[ -n "${do_configure}" ] && config_arg=",config_file"
+
+exec labgrid-client -r "${target}" -a query -n \
+	UBootProviderDriver:board,board_extra,source_dir,build_dir,build_dir_extra${config_arg}
bin/release.labgrid-sjg new file +22 -0
new file mode 100644
index 0000000..54e7895
@@ -0,0 +1,22 @@
+# Copyright 2024 Google LLC
+# Written by Simon Glass
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+exec labgrid-client -r "${U_BOOT_BOARD_IDENTITY}" release -a
bin/release.none new file +22 -0
new file mode 100644
index 0000000..284d1b1
@@ -0,0 +1,22 @@
+# Copyright 2024 Google LLC
+# Written by Simon Glass <[email protected]>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+# No releasing needed
bin/u-boot-test-getrole new file +38 -0
new file mode 100755
index 0000000..ac8e02a
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# Copyright 2024 Google LLC
+# Written by Simon Glass <[email protected]>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+# Prints the following pieces of information, each on a separate line
+#
+# - U-Boot board name
+# - source path
+# - build dir
+# - filename of .config file
+#
+# For example
+
+. "$(dirname $0)/u-boot-test-common"
+
+target="$1"
+[ -n "$2" ] && do_configure=1
+
+. "${bin_dir}/getrole.${getrole_impl:-none}"
bin/u-boot-test-release new file +26 -0
new file mode 100755
index 0000000..5a3a849
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Copyright 2024 Google LLC
+# Written by Simon Glass <[email protected]>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+. "$(dirname $0)/u-boot-test-common"
+
+. "${bin_dir}/release.${release_impl:-none}"
Signature · 1 line
2.34.1
#4 lore raw
In reply to Simon Glass
Quoted 6 lines · Simon Glass

This adds hooks for use with my integration for Labgrid (called Labgrid-sjg). The only existing hook that really does anything with the target, with this integration, is the 'console' one. There is also a new 'getrole' hook which looks up a role to find various things about it, such as the U-Boot board name.

Quoted 6 lines

Changes in v5:
- Use Labgrid-sjg instead of Labgrid
- Use LABGRID_SJG to indicates the 'Labgrid-sjg' integration is running
- Update commit message and cover letter for Labgrid-sjg

[...]

Applied to u-boot/u-boot-test-hooks.git/master, thanks!

Signature · 1 line
Tom