From d1d038f6eb170b94216ddb8705bb513348ac7355 Mon Sep 17 00:00:00 2001 From: Gregor Haas Date: Sun, 14 Jan 2024 11:55:14 -0800 Subject: [PATCH] discover mpfs flash device rather than hardcoding --- .github/workflows/test-system.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-system.yml b/.github/workflows/test-system.yml index c46344867..5deebf1fe 100644 --- a/.github/workflows/test-system.yml +++ b/.github/workflows/test-system.yml @@ -151,8 +151,17 @@ jobs: # Wait a bit for the USB to connect then flash sleep 10 - dd if=build-mpfs64/buildroot.build/images/sdcard.img of=/dev/sda bs=4M oflag=direct + FOUND_DEVICE="" + for d in /dev/sd? ; do + if [[ ! -z $(udevadm info --query=all -n "$d" | grep -i polarfire) ]]; then + FOUND_DEVICE="yes" + dd if=build-mpfs64/buildroot.build/images/sdcard.img of="$d" bs=4M oflag=direct + break + fi + done + $POWER_OFF_CMD + [[ ! -z "$FOUND_DEVICE" ]] - name: Test Keystone system env: