diff options
author | Eric Anholt <[email protected]> | 2020-03-03 14:38:09 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-11 21:36:47 +0000 |
commit | cf5ba9d409bcae3496d094def5c3b199a8847b3c (patch) | |
tree | bd4730d75a133fc36d5e4d5c8c6d31ba7835e69a /.gitlab-ci/bare-metal/README.md | |
parent | d51da8610f6c5c0a22f2a7b1c9bfd596a7c46949 (diff) |
ci: Make a simple little bare-metal fastboot mode for db410c.
This supports powering up the device (using an external tool you
provide based on your particular lab), talking over serial to wait for
the fastboot prompt, and then booting a fastboot image on a target
device.
I was previously relying on LAVA for this, but that ran afoul of
corporate policies related to the AGPL. However, LAVA wasn't doing
too much for us, given that gitlab already has a job scheduler and
tagging and runners. We were spending a lot of engineering on making
the two systems match up, when we can just have gitlab do it directly.
Lightly-reviewed-by: Kristian H. Kristensen <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4076>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4076>
Diffstat (limited to '.gitlab-ci/bare-metal/README.md')
-rw-r--r-- | .gitlab-ci/bare-metal/README.md | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/.gitlab-ci/bare-metal/README.md b/.gitlab-ci/bare-metal/README.md new file mode 100644 index 00000000000..3bbfab11cfb --- /dev/null +++ b/.gitlab-ci/bare-metal/README.md @@ -0,0 +1,80 @@ +# bare-metal Mesa testing + +Testing Mesa with gitlab-runner running on the devices being tested +(DUTs) proved to be too unstable, so this set of scripts is for +running Mesa testing on bare-metal boards connected to a separate +system using gitlab-runner. Currently only "fastboot" devices are +supported. + +In comparison with LAVA, this doesn't involve maintaining a separate +webservice with its own job scheduler and replicating jobs between the +two. It also places more of the board support in git, instead of +webservice configuration. Most importantly, it doesn't download the +rootfs as artifacts on each job, so we can avoid traffic to +freedesktop.org. On the other hand, the serial interactions and +bootloader support are more primitive. + +## Requirements + +This testing requires power control of the DUTs by the gitlab-runner +machine, since this is what we use to reset the system and get back to +a pristine state at the start of testing. + +We require access to the console output from the gitlb-runner system, +since that is how we get the final results back from te tests. You +should probably have the console on a serial connection, so that you +can see bootloader progress. + +The boards need to be able to have a kernel/initramfs supplied by the +gitlab-runner system, since the initramfs is what contains the Mesa +testing payload. Currently only "fastboot" devices are supported. + +The boards should have networking, so that (in a future iteration of +this code) we can extract the dEQP .xml results to artifacts on +gitlab. + +## Setup + +Each board will be registered in fd.o gitlab. You'll want something +like this to register: + +``` +sudo gitlab-runner register \ + --url https://gitlab.freedesktop.org \ + --registration-token $1 \ + --name MY_BOARD_NAME \ + --tag-list MY_BOARD_TAG \ + --executor docker \ + --docker-image "alpine:latest" \ + --docker-volumes "/dev:/dev" \ + --docker-network-mode "host" \ + --docker-privileged \ + --non-interactive +``` + +The registration token has to come from a fd.o gitlab admin going to +https://gitlab.freedesktop.org/admin/runners + +The name scheme for Google's lab is google-freedreno-boardname-nn, and +our tag is google-freedreno-db410c. The tag is what identifies a +board type so that board-specific jobs can be dispatched into that +pool. + +We need privileged mode and the /dev bind mount in order to get at the +serial console and fastboot USB devices (--device arguments don't +apply to devices that show up after container start, which is the case +with fastboot). We use host network mode so that we can (in the +future) spin up a server to collect XML results. + +Once you've added your boards, you're going to need to specify the +board-specific env vars, adding something like this `environment` line +to each runner in `/etc/gitlab-runner/config.toml` + +``` +[[runners]] + name = "google-freedreno-db410c-01" + environment = ["BM_SERIAL=/dev/ttyDB410c8", "BM_POWERUP=google-power-up.sh 8", "BM_FASTBOOT_SERIAL=15e9e390"] +``` + +Once you've updated your runners' configs, restart with `sudo service +gitlab-runner restart` |