Skip to contentSkip to conversation

Gitlab: Add a "sage-lab" stage to access a board farm

PATCH Superseded Tom Rini 2 participants 7 messages Nov 10, 2025 – Nov 17, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Gitlab: Add a "sage-lab" stage to access a board farm

This is the Gitlab side of adding support for the board lab connected to the "konsulko-sage" runner. On the software side, this lab uses only upstream labgrid. On the hardware side, each device under test is connected to its own exporter (typically a Raspberry Pi 4) that must be turned on (and cleanly turned off) as part of a given test cycle.

Add support for testing on a SolidRun Hummingboard 2 (imx6), Raspberry Pi 3 and Raspberry Pi 4. In all cases, we enable additional options to run more tests on the board. As we have some networking tests, we test both the legacy network stack and lwIP. In the case of Pi platforms, we test all of 32bit configuration, plain configuration and rpi_arm64, and again with and without lwIP.

---
Note that for the Pi platforms we enable/disable CMD_BOOTEFI_SELFTEST based on overall binary size. I've created
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
to track addressing that issue.

---
 .gitlab-ci-sage-lab.yml | 182 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |   5 ++
 2 files changed, 187 insertions(+)
 create mode 100644 .gitlab-ci-sage-lab.yml
.gitlab-ci-sage-lab.yml new file +182 -0
new file mode 100644
index 000000000000..26a055f93121
@@ -0,0 +1,182 @@
+# Definition for the lab connected to the "sage" host and managed with labgrid
+
+.sage_lab_template: &sage_lab_dfn
+  stage: sage-lab
+  rules:
+    - if: $SAGE_LAB == "1"
+      when: always
+    - if: $SAGE_LAB != "1"
+      when: manual
+      allow_failure: true
+  # USB can be unreliable.
+  retry: 2
+  dependencies: []
+  needs: [ "sandbox test.py" ]
+  tags: [ 'konsulko-sage-labgrid' ]
+  before_script:
+    # Clone uboot-test-hooks
+    - git config --global --add safe.directory "${CI_PROJECT_DIR}"
+    - git clone --depth=1 -b sage-labgrid https://github.com/trini/u-boot-test-hooks.git /tmp/uboot-test-hooks
+    - ln -s sage /tmp/uboot-test-hooks/bin/`hostname`
+    - ln -s sage /tmp/uboot-test-hooks/py/`hostname`
+    - export LG_ENV="/tmp/uboot-test-hooks/bin/sage/labgrid-sage-env.yaml"
+    # Prepare python environment
+    - python3 -m venv /tmp/venv;
+      . /tmp/venv/bin/activate;
+      pip install -r test/py/requirements.txt -r tools/binman/requirements.txt
+        -r tools/buildman/requirements.txt -r tools/u_boot_pylib/requirements.txt
+        labgrid
+    # Add more tools
+    - sudo apt-get update && sudo apt-get -y install snmp rsync
+    # Acquire and turn on the exporter.
+    - labgrid-client -p ${LABGRID_EXPORTER} acquire &&
+      labgrid-client -p ${LABGRID_EXPORTER} power on
+    # Prepare ssh
+    - mkdir --mode=0700 ~/.ssh;
+      printf 'Host sage-exporter-*\n\tUser labgrid\n' > ~/.ssh/config
+  script:
+    - export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD}
+    # Sage is 16 threads and has 3 devices attached, so 6 builder threads.
+    - tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e
+        --board ${TEST_PY_BD} ${OVERRIDE} -T 6
+    # Wait for the exporter to have the device ready
+    - while test `labgrid-client resources |
+        grep -q ${LABGRID_EXPORTER}/${LG_PLACE}/; echo $?` -ne 0; do sleep 1;
+      done
+    # Fingerprint the exporter
+    - ssh-keyscan ${LABGRID_EXPORTER} > ~/.ssh/known_hosts 2>/dev/null
+    # Don't stop on non-zero exit codes now, to provide as much chance as
+    # possible to ensure we don't leave lab resources acquired.
+    - set +e;
+    # Run the tests, save the results.
+    - export PATH=/tmp/uboot-test-hooks/bin:${PATH};
+      export PYTHONPATH=/tmp/uboot-test-hooks/py/sage;
+      labgrid-client -p ${LG_PLACE} acquire;
+      ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID}
+        ${TEST_PY_EXTRA:-"--capture=tee-sys"}
+        ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
+        --build-dir "$UBOOT_TRAVIS_BUILD_DIR"
+        --junitxml=/tmp/${TEST_PY_BD}/results.xml;
+      RC=`echo $?`;
+      cp -v /tmp/${TEST_PY_BD}/*.{html,css,xml} .;
+    # Release and power off everything.
+    - labgrid-client -p ${LG_PLACE} power off
+    - labgrid-client -p ${LG_PLACE} release
+    - labgrid-client -p ${LABGRID_EXPORTER} ssh sudo poweroff && sleep 15 &&
+      labgrid-client -p ${LABGRID_EXPORTER} power off
+    - labgrid-client -p ${LABGRID_EXPORTER} release
+    - exit $RC
+  artifacts:
+    when: always
+    paths:
+      - "*.html"
+      - "*.css"
+      - results.xml
+    reports:
+      junit: results.xml
+    expire_in: 1 week
+
+SolidRun Hummingboard 2:
+  <<: *sage_lab_dfn
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-hb-1"
+    LG_PLACE: "hb-1"
+    TEST_PY_BD: "mx6cuboxi"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG"
+
+SolidRun Hummingboard 2 (lwIP):
+  <<: *sage_lab_dfn
+  needs: [ "SolidRun Hummingboard 2" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-hb-1"
+    LG_PLACE: "hb-1"
+    TEST_PY_BD: "mx6cuboxi"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a NET_LWIP"
+
+Raspberry Pi 4:
+  <<: *sage_lab_dfn
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi4-1"
+    LG_PLACE: "rpi4-1"
+    TEST_PY_BD: "rpi_4"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a ~CMD_BOOTEFI_SELFTEST -a IPV6 -a IPV6_ROUTER_DISCOVERY -a CMD_TFTPPUT -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000"
+
+Raspberry Pi 4 (rpi_arm64):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 4" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi4-1"
+    LG_PLACE: "rpi4-1"
+    TEST_PY_BD: "rpi_arm64"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a ~CMD_BOOTEFI_SELFTEST -a IPV6 -a IPV6_ROUTER_DISCOVERY -a CMD_TFTPPUT -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000"
+
+Raspberry Pi 4 (rpi_arm64, lwIP):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 4 (rpi_arm64)" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi4-1"
+    LG_PLACE: "rpi4-1"
+    TEST_PY_BD: "rpi_arm64"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a ~CMD_BOOTEFI_SELFTEST -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000 -a NET_LWIP"
+
+Raspberry Pi 4 (rpi_4_32b):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 4 (rpi_arm64, lwIP)" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi4-1"
+    LG_PLACE: "rpi4-1"
+    TEST_PY_BD: "rpi_4_32b"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a CMD_BOOTEFI_SELFTEST -a IPV6 -a IPV6_ROUTER_DISCOVERY -a CMD_TFTPPUT -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000"
+
+Raspberry Pi 4 (rpi_4_32b, lwIP):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 4 (rpi_4_32b)" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi4-1"
+    LG_PLACE: "rpi4-1"
+    TEST_PY_BD: "rpi_4_32b"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a CMD_BOOTEFI_SELFTEST -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000 -a NET_LWIP"
+
+Raspberry Pi 3:
+  <<: *sage_lab_dfn
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi3-1"
+    LG_PLACE: "rpi3-1"
+    TEST_PY_BD: "rpi_3"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a CMD_BOOTEFI_SELFTEST -a IPV6 -a IPV6_ROUTER_DISCOVERY -a CMD_TFTPPUT -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000"
+
+Raspberry Pi 3 (rpi_arm64):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 3" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi3-1"
+    LG_PLACE: "rpi3-1"
+    TEST_PY_BD: "rpi_arm64"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a ~CMD_BOOTEFI_SELFTEST -a IPV6 -a IPV6_ROUTER_DISCOVERY -a CMD_TFTPPUT -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000"
+
+Raspberry Pi 3 (rpi_arm64, lwIP):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 3 (rpi_arm64)" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi3-1"
+    LG_PLACE: "rpi3-1"
+    TEST_PY_BD: "rpi_arm64"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a ~CMD_BOOTEFI_SELFTEST -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000 -a NET_LWIP"
+
+Raspberry Pi 3 (rpi_3_32b):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 3 (rpi_arm64, lwIP)" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi3-1"
+    LG_PLACE: "rpi3-1"
+    TEST_PY_BD: "rpi_3_32b"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a CMD_BOOTEFI_SELFTEST -a IPV6 -a IPV6_ROUTER_DISCOVERY -a CMD_TFTPPUT -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000"
+
+Raspberry Pi 3 (rpi_3_32b, lwIP):
+  <<: *sage_lab_dfn
+  needs: [ "Raspberry Pi 3 (rpi_3_32b)" ]
+  variables:
+    LABGRID_EXPORTER: "sage-exporter-rpi3-1"
+    LG_PLACE: "rpi3-1"
+    TEST_PY_BD: "rpi_3_32b"
+    OVERRIDE: "-a UNIT_TEST -a ~CMD_EFIDEBUG -a CMD_BOOTMENU -a CMD_LOG -a CMD_BOOTEFI_SELFTEST -a FIT -a FIT_SIGNATURE -a FIT_BEST_MATCH -a SYS_BOOTM_LEN=0x4000000 -a BOOTSTAGE -a BOOTSTAGE_STASH -a CMD_BOOTSTAGE -a BOOTSTAGE_STASH_ADDR=0x02400000 -a NET_LWIP"
.gitlab-ci.yml +5 -0
index 6a36513c3b75..b32e6ade230d 100644
@@ -5,6 +5,7 @@ variables:
   DEFAULT_AMD64_TAG: "amd64"
   DEFAULT_FAST_TAG: "fast"
   MIRROR_DOCKER: docker.io
+  SAGE_LAB: ""
   SJG_LAB: ""
   PLATFORM: linux/amd64,linux/arm64
 
@@ -24,6 +25,7 @@ image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20251001-04Nov2025
 stages:
   - testsuites
   - test.py
+  - sage-lab
   - sjg-lab
   - world build
 
@@ -597,6 +599,9 @@ coreboot test.py:
     TEST_PY_ID: "--id qemu"
   <<: *buildman_and_testpy_dfn
 
+# Add sage-lab stage
+include: .gitlab-ci-sage-lab.yml
+
 .sjg_lab_template: &sjg_lab_dfn
   stage: sjg-lab
   rules:
Signature · 1 line
2.43.0
#1 lore raw

Hi Tom,

Quoted 20 lines · Tom Rini

This is the Gitlab side of adding support for the board lab connected to the "konsulko-sage" runner. On the software side, this lab uses only upstream labgrid. On the hardware side, each device under test is connected to its own exporter (typically a Raspberry Pi 4) that must be turned on (and cleanly turned off) as part of a given test cycle.

Add support for testing on a SolidRun Hummingboard 2 (imx6), Raspberry Pi 3 and Raspberry Pi 4. In all cases, we enable additional options to run more tests on the board. As we have some networking tests, we test both the legacy network stack and lwIP. In the case of Pi platforms, we test all of 32bit configuration, plain configuration and rpi_arm64, and again with and without lwIP.

---
Note that for the Pi platforms we enable/disable CMD_BOOTEFI_SELFTEST based on overall binary size. I've created
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
to track addressing that issue.

Quoted 5 lines
---
 .gitlab-ci-sage-lab.yml | 182 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |   5 ++
 2 files changed, 187 insertions(+)
 create mode 100644 .gitlab-ci-sage-lab.yml

Would it be possible to add some docs about this? Does the exporting rpi do a full system boot and then run some scripts to load things onto the board, then shut down?

Regards,
Simon

author
#2 lore raw
Quoted 29 lines · Simon Glass

Hi Tom,

Quoted 20 lines · Tom Rini

This is the Gitlab side of adding support for the board lab connected to the "konsulko-sage" runner. On the software side, this lab uses only upstream labgrid. On the hardware side, each device under test is connected to its own exporter (typically a Raspberry Pi 4) that must be turned on (and cleanly turned off) as part of a given test cycle.

Add support for testing on a SolidRun Hummingboard 2 (imx6), Raspberry Pi 3 and Raspberry Pi 4. In all cases, we enable additional options to run more tests on the board. As we have some networking tests, we test both the legacy network stack and lwIP. In the case of Pi platforms, we test all of 32bit configuration, plain configuration and rpi_arm64, and again with and without lwIP.

---
Note that for the Pi platforms we enable/disable CMD_BOOTEFI_SELFTEST based on overall binary size. I've created
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
to track addressing that issue.

Quoted 5 lines
---
 .gitlab-ci-sage-lab.yml | 182 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |   5 ++
 2 files changed, 187 insertions(+)
 create mode 100644 .gitlab-ci-sage-lab.yml
Quoted 3 lines

Would it be possible to add some docs about this? Does the exporting rpi do a full system boot and then run some scripts to load things onto the board, then shut down?

I don't understand your question. Yes, the exporter is powered on/off in the test job, as explained in the commit message. When it comes up it registers the device under test with the coordinator (and unregisters when powering off).

Signature · 1 line
Tom
#3 lore raw

Hi Tom,

Quoted 31 lines · Tom Rini
Quoted 29 lines · Simon Glass

Hi Tom,

Quoted 25 lines · Tom Rini

This is the Gitlab side of adding support for the board lab connected to the "konsulko-sage" runner. On the software side, this lab uses only upstream labgrid. On the hardware side, each device under test is connected to its own exporter (typically a Raspberry Pi 4) that must be turned on (and cleanly turned off) as part of a given test cycle.

Add support for testing on a SolidRun Hummingboard 2 (imx6), Raspberry Pi 3 and Raspberry Pi 4. In all cases, we enable additional options to run more tests on the board. As we have some networking tests, we test both the legacy network stack and lwIP. In the case of Pi platforms, we test all of 32bit configuration, plain configuration and rpi_arm64, and again with and without lwIP.

---
Note that for the Pi platforms we enable/disable CMD_BOOTEFI_SELFTEST based on overall binary size. I've created
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
to track addressing that issue.

---
 .gitlab-ci-sage-lab.yml | 182 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |   5 ++
 2 files changed, 187 insertions(+)
 create mode 100644 .gitlab-ci-sage-lab.yml
Quoted 8 lines
Quoted 3 lines

Would it be possible to add some docs about this? Does the exporting rpi do a full system boot and then run some scripts to load things onto the board, then shut down?

I don't understand your question. Yes, the exporter is powered on/off in the test job, as explained in the commit message. When it comes up it registers the device under test with the coordinator (and unregisters when powering off).

So does that mean that all the logic for talking to the board is not in the hooks or Labgrid, but somewhere else? I'm just trying to understand how it is put together and compare it with what I did.

Regards,
Simon

author
#4 lore raw
Quoted 38 lines · Simon Glass

Hi Tom,

Quoted 35 lines · Tom Rini
Quoted 32 lines · Simon Glass

Hi Tom,

Quoted 20 lines · Tom Rini

This is the Gitlab side of adding support for the board lab connected to the "konsulko-sage" runner. On the software side, this lab uses only upstream labgrid. On the hardware side, each device under test is connected to its own exporter (typically a Raspberry Pi 4) that must be turned on (and cleanly turned off) as part of a given test cycle.

Add support for testing on a SolidRun Hummingboard 2 (imx6), Raspberry Pi 3 and Raspberry Pi 4. In all cases, we enable additional options to run more tests on the board. As we have some networking tests, we test both the legacy network stack and lwIP. In the case of Pi platforms, we test all of 32bit configuration, plain configuration and rpi_arm64, and again with and without lwIP.

---
Note that for the Pi platforms we enable/disable CMD_BOOTEFI_SELFTEST based on overall binary size. I've created
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
to track addressing that issue.

Quoted 5 lines
---
 .gitlab-ci-sage-lab.yml | 182 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |   5 ++
 2 files changed, 187 insertions(+)
 create mode 100644 .gitlab-ci-sage-lab.yml

Would it be possible to add some docs about this? Does the exporting rpi do a full system boot and then run some scripts to load things onto the board, then shut down?

Quoted 8 lines
Quoted 4 lines

I don't understand your question. Yes, the exporter is powered on/off in the test job, as explained in the commit message. When it comes up it registers the device under test with the coordinator (and unregisters when powering off).

So does that mean that all the logic for talking to the board is not in the hooks or Labgrid, but somewhere else? I'm just trying to understand how it is put together and compare it with what I did.

I still don't understand what you're asking. Maybe you missed the patch that added sage to u-boot-test-hooks as well? That contains the labgrid environment yaml file. The boards are just in labgrid, the exporter registers them with the coordinator when the exporter comes online.

And FWIW, this isn't ideally how I'd do the labgrid integration, but tees up the next steps nicely. We need to abstract how our pytest portion grabs console/flashes/etc so that someone could write a python native set of classes (since labgrid supports pytest directly). Iterating on that is easier however when starting with something that works.

Signature · 1 line
Tom
#5 lore raw

Hi Tom,

Quoted 45 lines · Tom Rini
Quoted 43 lines · Simon Glass

Hi Tom,

Quoted 39 lines · Tom Rini
Quoted 29 lines · Simon Glass

Hi Tom,

Quoted 20 lines · Tom Rini

This is the Gitlab side of adding support for the board lab connected to the "konsulko-sage" runner. On the software side, this lab uses only upstream labgrid. On the hardware side, each device under test is connected to its own exporter (typically a Raspberry Pi 4) that must be turned on (and cleanly turned off) as part of a given test cycle.

Add support for testing on a SolidRun Hummingboard 2 (imx6), Raspberry Pi 3 and Raspberry Pi 4. In all cases, we enable additional options to run more tests on the board. As we have some networking tests, we test both the legacy network stack and lwIP. In the case of Pi platforms, we test all of 32bit configuration, plain configuration and rpi_arm64, and again with and without lwIP.

---
Note that for the Pi platforms we enable/disable CMD_BOOTEFI_SELFTEST based on overall binary size. I've created
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
to track addressing that issue.

Quoted 5 lines
---
 .gitlab-ci-sage-lab.yml | 182 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |   5 ++
 2 files changed, 187 insertions(+)
 create mode 100644 .gitlab-ci-sage-lab.yml
Quoted 3 lines

Would it be possible to add some docs about this? Does the exporting rpi do a full system boot and then run some scripts to load things onto the board, then shut down?

I don't understand your question. Yes, the exporter is powered on/off in the test job, as explained in the commit message. When it comes up it registers the device under test with the coordinator (and unregisters when powering off).

Quoted 8 lines
Quoted 3 lines

So does that mean that all the logic for talking to the board is not in the hooks or Labgrid, but somewhere else? I'm just trying to understand how it is put together and compare it with what I did.

I still don't understand what you're asking. Maybe you missed the patch that added sage to u-boot-test-hooks as well? That contains the labgrid environment yaml file. The boards are just in labgrid, the exporter registers them with the coordinator when the exporter comes online.

I saw the hooks patch. But I am missing the logic that actually writes U-Boot to the board, powers it on/off, etc. Where is that?

Quoted 7 lines

And FWIW, this isn't ideally how I'd do the labgrid integration, but tees up the next steps nicely. We need to abstract how our pytest portion grabs console/flashes/etc so that someone could write a python native set of classes (since labgrid supports pytest directly). Iterating on that is easier however when starting with something that works.

Yes, that would be nice. It would also make it easier to know when to expect the board to respond, rather than the long timeouts we have today. I started looking at this in June but didn't finish.

Regards,
Simon

author
#6 lore raw
Quoted 52 lines · Simon Glass

Hi Tom,

Quoted 49 lines · Tom Rini
Quoted 46 lines · Simon Glass

Hi Tom,

Quoted 31 lines · Tom Rini
Quoted 29 lines · Simon Glass

Hi Tom,

Quoted 25 lines · Tom Rini

This is the Gitlab side of adding support for the board lab connected to the "konsulko-sage" runner. On the software side, this lab uses only upstream labgrid. On the hardware side, each device under test is connected to its own exporter (typically a Raspberry Pi 4) that must be turned on (and cleanly turned off) as part of a given test cycle.

Add support for testing on a SolidRun Hummingboard 2 (imx6), Raspberry Pi 3 and Raspberry Pi 4. In all cases, we enable additional options to run more tests on the board. As we have some networking tests, we test both the legacy network stack and lwIP. In the case of Pi platforms, we test all of 32bit configuration, plain configuration and rpi_arm64, and again with and without lwIP.

---
Note that for the Pi platforms we enable/disable CMD_BOOTEFI_SELFTEST based on overall binary size. I've created
https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
to track addressing that issue.

---
 .gitlab-ci-sage-lab.yml | 182 ++++++++++++++++++++++++++++++++++++++++
 .gitlab-ci.yml          |   5 ++
 2 files changed, 187 insertions(+)
 create mode 100644 .gitlab-ci-sage-lab.yml
Quoted 8 lines
Quoted 3 lines

Would it be possible to add some docs about this? Does the exporting rpi do a full system boot and then run some scripts to load things onto the board, then shut down?

I don't understand your question. Yes, the exporter is powered on/off in the test job, as explained in the commit message. When it comes up it registers the device under test with the coordinator (and unregisters when powering off).

So does that mean that all the logic for talking to the board is not in the hooks or Labgrid, but somewhere else? I'm just trying to understand how it is put together and compare it with what I did.

Quoted 7 lines
Quoted 4 lines

I still don't understand what you're asking. Maybe you missed the patch that added sage to u-boot-test-hooks as well? That contains the labgrid environment yaml file. The boards are just in labgrid, the exporter registers them with the coordinator when the exporter comes online.

I saw the hooks patch. But I am missing the logic that actually writes U-Boot to the board, powers it on/off, etc. Where is that?

Already in the repository or a different patch I posted for a new SoC. It's just calls to the appropriate labgrid-client subcommand.

Quoted 10 lines
Quoted 6 lines

And FWIW, this isn't ideally how I'd do the labgrid integration, but tees up the next steps nicely. We need to abstract how our pytest portion grabs console/flashes/etc so that someone could write a python native set of classes (since labgrid supports pytest directly). Iterating on that is easier however when starting with something that works.

Yes, that would be nice. It would also make it easier to know when to expect the board to respond, rather than the long timeouts we have today. I started looking at this in June but didn't finish.

I'm not sure how one is connected to the other there, but yes, doing it all within python might make some cleanup / configuration easier too.

Signature · 1 line
Tom