aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci/bare-metal
diff options
context:
space:
mode:
authorChristian Gmeiner <[email protected]>2020-05-09 21:49:52 +0200
committerMarge Bot <[email protected]>2020-06-02 22:20:46 +0000
commit2dfc241e36865655913d0f0d961fc76f49bf2f50 (patch)
tree6aefdf8c3293c0d841ad22ace6f55c7fb5061aef /.gitlab-ci/bare-metal
parenta21966837acd2e053ce183c5f145afcff2fd51b7 (diff)
ci: bare-metal: make it possible to use a script for serial
Makes it possible to use e.g. a ser2net script to talk to the devices. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5268>
Diffstat (limited to '.gitlab-ci/bare-metal')
-rwxr-xr-x.gitlab-ci/bare-metal/fastboot.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/.gitlab-ci/bare-metal/fastboot.sh b/.gitlab-ci/bare-metal/fastboot.sh
index 124309e8abe..572fd9dc9c4 100755
--- a/.gitlab-ci/bare-metal/fastboot.sh
+++ b/.gitlab-ci/bare-metal/fastboot.sh
@@ -2,9 +2,12 @@
BM=$CI_PROJECT_DIR/.gitlab-ci/bare-metal
-if [ -z "$BM_SERIAL" ]; then
- echo "Must set BM_SERIAL in your gitlab-runner config.toml [[runners]] environment"
- echo "This is the serial device to talk to for waiting for fastboot to be ready and logging from the kernel."
+if [ -z "$BM_SERIAL" -a -z "$BM_SERIAL_SCRIPT" ]; then
+ echo "Must set BM_SERIAL OR BM_SERIAL_SCRIPT in your gitlab-runner config.toml [[runners]] environment"
+ echo "BM_SERIAL:"
+ echo " This is the serial device to talk to for waiting for fastboot to be ready and logging from the kernel."
+ echo "BM_SERIAL_SCRIPT:"
+ echo " This is a shell script to talk to for waiting for fastboot to be ready and logging from the kernel."
exit 1
fi
@@ -63,7 +66,12 @@ abootimg \
rm Image.gz-dtb
# Start watching serial, and power up the device.
-$BM/serial-buffer.py $BM_SERIAL | tee artifacts/serial-output.txt &
+if [ -n "$BM_SERIAL" ]; then
+ $BM/serial-buffer.py $BM_SERIAL | tee artifacts/serial-output.txt &
+else
+ PATH=$BM:$PATH $BM_SERIAL_SCRIPT | tee artifacts/serial-output.txt &
+fi
+
while [ ! -e artifacts/serial-output.txt ]; do
sleep 1
done