summaryrefslogtreecommitdiff
path: root/units/audio
diff options
authorKai-Chuan Hsieh <kaichuan.hsieh@canonical.com>2020-07-16 19:33:28 +0800
committerKai-Chuan Hsieh <kaichuan.hsieh@canonical.com>2020-08-18 17:27:33 +0800
commit877d7d8851d75b16823c75b8db67dc01f443334e (patch)
treeadbe6a835b9eb5fe53ebba06c1f432dd9e79022b /units/audio
parent0c6f30f792fd0f9970d2cd8c47c24d810abf46e7 (diff)
Add job for validating sof firmware signature
The sof_ri_info.py is from https://github.com/thesofproject/sof/tree/master/tools/sof_ri_info for dumping the sof firmware's info. I add --valid argument to identify if the firmware is signed by recognized production key, which becomes the final version of sof_ri_info.py https://code.launchpad.net/~kchsieh/+git/sof/+ref/add-valid-cap The test job is because that the audio sof firmware can only be signed by Intel production key, add a job to avoid releasing wrong firmware. The idea comes from lp:1880792, which SRU the linux-firmware contains the firmware signed by test key but not valid production key.
Diffstat (limited to 'units/audio')
-rw-r--r--units/audio/jobs.pxu16
-rw-r--r--units/audio/test-plan.pxu1
2 files changed, 17 insertions, 0 deletions
diff --git a/units/audio/jobs.pxu b/units/audio/jobs.pxu
index b9f4856..538d213 100644
--- a/units/audio/jobs.pxu
+++ b/units/audio/jobs.pxu
@@ -8,6 +8,22 @@ requires:
command: cat /proc/asound/cards
_description: Test to detect audio devices
+plugin: shell
+category_id: com.canonical.plainbox::audio
+id: audio/valid-sof-firmware-sig
+requires:
+ device.category == 'AUDIO'
+ package.name == 'linux-firmware'
+command:
+ for fw in /lib/firmware/intel/sof/sof-*.ri;
+ do
+ # shellcheck disable=SC2016
+ if xxd "${fw}" | grep -q '$CPD'; then
+ sof_ri_info.py --valid "${fw}"
+ fi
+ done
+_description: Valid sof firmware signature
+
plugin: user-interact-verify
category_id: com.canonical.plainbox::audio
id: audio/playback_auto
diff --git a/units/audio/test-plan.pxu b/units/audio/test-plan.pxu
index f583b91..422b831 100644
--- a/units/audio/test-plan.pxu
+++ b/units/audio/test-plan.pxu
@@ -46,6 +46,7 @@ include:
audio/alsa_info_collect
audio/alsa_info_attachment
audio/list_devices
+ audio/valid-sof-firmware-sig
id: audio-cert-blockers
unit: test plan