Skip to content

validate_sof_install.py: add MD5 installation validation tool and tests - #208

Open
lgirdwood wants to merge 1 commit into
mainfrom
feature/validate-sof-install
Open

validate_sof_install.py: add MD5 installation validation tool and tests#208
lgirdwood wants to merge 1 commit into
mainfrom
feature/validate-sof-install

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Add a Python 3 CLI tool validate_sof_install.py to validate that SOF firmware binaries (.ri, .ldc), LLEXT modules (.llext, UUID symlinks), topologies (.tplg), and userspace tools from sof-bin are correctly and completely installed on a target host's /lib/firmware directory.

Features:

  • Full coverage for IPC3 and IPC4 releases (v1.7.x through v2.14.x)
  • Supports local host (/lib/firmware/intel), offline rootfs/NFS mount (--target-root /srv/nfs/spider-rootfs), and remote DUTs (--ssh root@spider)
  • Filtering by platform (-p), component (-c), and flavor (-f)
  • Formatted summary table, JSON output (--json), and standalone MD5 manifest generation (--generate-md5)
  • Unit and integration test suite in tests/test_validate_sof_install.py
  • Documentation in README.md and updated .gitignore for python caches

@lgirdwood
lgirdwood requested a lite review from Copilot August 26, 2026 11:14
@lgirdwood

Copy link
Copy Markdown
Member Author
lrg@moth:~$ ~/bin/validate_sof_install.py --version 2.14
COMPONENT PLATFORM     STATUS           MD5 MATCH                          FILE                                    
-------------------------------------------------------------------------------------------------------------------
fw       mtl          SYMLINK_MATCH    ff5e48d1f581e59ee65642d108f81def   sof-ipc4/mtl/sof-mtl.ri
fw       mtl          MATCH            88310ca35125c622951762be685ffabd   sof-ipc4/mtl/community/sof-mtl.ri
fw       mtl          MATCH            ff5e48d1f581e59ee65642d108f81def   sof-ipc4/mtl/intel-signed/sof-mtl.ri
fw       lnl          SYMLINK_MATCH    9d66bffa1da7bc493dbe2767fc03bf6f   sof-ipc4/lnl/sof-lnl.ri
fw       lnl          MATCH            4b291911e834cb08ed62da3fe3df58eb   sof-ipc4/lnl/community/sof-lnl.ri
fw       lnl          MATCH            9d66bffa1da7bc493dbe2767fc03bf6f   sof-ipc4/lnl/intel-signed/sof-lnl.ri
fw       arl          SYMLINK_MATCH    ff5e48d1f581e59ee65642d108f81def   sof-ipc4/arl/sof-arl.ri
fw       arl          SYMLINK_MATCH    88310ca35125c622951762be685ffabd   sof-ipc4/arl/community/sof-arl.ri
fw       arl          SYMLINK_MATCH    ff5e48d1f581e59ee65642d108f81def   sof-ipc4/arl/intel-signed/sof-arl.ri
fw       ptl          SYMLINK_MATCH    55af0dcd8a9e8ec1c70784c2c7c4b244   sof-ipc4/ptl/sof-ptl-openmodules.ri
fw       ptl          SYMLINK_MATCH    b976d7d8a2ff740d4c4b5c890014e29c   sof-ipc4/ptl/sof-ptl.ri
fw       ptl          MATCH            20bc2a9f6e3cebbeca83bcc3a79a1aed   sof-ipc4/ptl/community/sof-ptl-openmodules.ri
fw       ptl          MATCH            4a5f9f3ed5efe9b692d99db30b049e4d   sof-ipc4/ptl/community/sof-ptl.ri
fw       ptl          MATCH            55af0dcd8a9e8ec1c70784c2c7c4b244   sof-ipc4/ptl/intel-signed/sof-ptl-openmodules.ri
fw       ptl          MATCH            b976d7d8a2ff740d4c4b5c890014e29c   sof-ipc4/ptl/intel-signed/sof-ptl.ri
fw       wcl          SYMLINK_MATCH    062fe2eb1cfc96a26755633c99c197b9   sof-ipc4/wcl/sof-wcl.ri
fw       wcl          SYMLINK_MATCH    dbc189d20a752079c0c10c9debfbb604   sof-ipc4/wcl/sof-wcl-openmodules.ri
fw       wcl          MATCH            1e965a08c8cf21b772ed11651a71fc34   sof-ipc4/wcl/community/sof-wcl.ri
fw       wcl          MATCH            791b4e252ce3674e44a62da3cc984e7f   sof-ipc4/wcl/community/sof-wcl-openmodules.ri
fw       wcl          MATCH            062fe2eb1cfc96a26755633c99c197b9   sof-ipc4/wcl/intel-signed/sof-wcl.ri
fw       wcl          MATCH            dbc189d20a752079c0c10c9debfbb604   sof-ipc4/wcl/intel-signed/sof-wcl-openmodules.ri
fw       arl-s        SYMLINK_MATCH    8ff1eaef887d0b066bbfa443d8a4f96a   sof-ipc4/arl-s/sof-arl-s.ri
fw       arl-s        SYMLINK_MATCH    88310ca35125c622951762be685ffabd   sof-ipc4/arl-s/community/sof-arl-s.ri
fw       arl-s        MATCH            8ff1eaef887d0b066bbfa443d8a4f96a   sof-ipc4/arl-s/intel-signed/sof-arl-s.ri
llext    lnl          MISMATCH         8c16bf75 != 7e892fc6               sof-ipc4-lib/lnl/community/drc.llext
llext    lnl          MISMATCH         8c16bf75 != 7e892fc6               sof-ipc4-lib/lnl/community/B36EE4DA-006F-47F9-A06D-FECBE2D8B6CE.bin
tplg     hdmi         MATCH            56d6167e759895c27df4895eff680c84   sof-ipc4-tplg/sof-hdmi-pcm5-id7.tplg
tplg     mtl          MISMATCH         5aaafa62 != b2c86b9d               sof-ipc4-tplg/sof-mtl-dmic-4ch-id3.tplg
tplg     tgl          MATCH            f83c91114a47099a50196402700d180d   sof-ipc4-tplg/sof-tgl-rt711-rt1308-rt715.tplg
tplg     lnl          MATCH            5b8151ff244d262ce623ab3a8bb580a9   sof-ipc4-tplg/sof-lnl-cs42l43-l0-cs35l56-l23-4ch.tplg
tplg     ptl          MATCH            a43ad714bf5e97869db1ad6c13a1d7d0   sof-ipc4-tplg/sof-ptl-es83x6-ssp1-hdmi-ssp02.tplg
tplg     hda          MATCH            6a7cee894f1cadd357a53e5485906e9f   sof-ipc4-tplg/sof-hda-generic-4ch.tplg
tplg     lnl          MISMATCH         5151f298 != c9bd7d6f               sof-ipc4-tplg/sof-lnl-dmic-4ch-id2.tplg
tplg     mtl          MATCH            d202932a1dd0e70efd471b8d9bdea38e   sof-ipc4-tplg/sof-mtl-sdw-cs42l42-l0-max98363-l2.tplg
tplg     hda          MATCH            bd21ca37063061619330eab56f1f51d6   sof-ipc4-tplg/sof-hda-generic-cavs25-2ch.tplg
tplg     tgl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-tgl-rt712.tplg
tplg     lnl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-lnl-rt712-l2-rt1320-l1.tplg
tplg     ptl          MISMATCH         28093f58 != c4a6cd30               sof-ipc4-tplg/sof-ptl-dmic-4ch-id3.tplg
tplg     lnl          MISMATCH         1f2ffb74 != 7e85b8f2               sof-ipc4-tplg/sof-lnl-dmic-4ch-id3.tplg
tplg     ptl          MISMATCH         9a0b7b4e != dc01e85c               sof-ipc4-tplg/sof-ptl-dmic-2ch-id3.tplg
tplg     tgl          MATCH            b62beb4eab1ba0d013afc44f60717123   sof-ipc4-tplg/sof-tgl-rt715-rt711-rt1308-mono.tplg
tplg     arl          MISMATCH         6868239d != 54ea5771               sof-ipc4-tplg/sof-arl-dmic-4ch-id5.tplg
tplg     hda          MATCH            7b1feb1edb8ee215ee6f34e73e325d84   sof-ipc4-tplg/sof-hda-generic-ace3-1ch.tplg
tplg     arl          MISMATCH         2d0e76d5 != 0a262250               sof-ipc4-tplg/sof-arl-dmic-2ch-id5.tplg
tplg     ptl          MATCH            4be74ce4af8c91adece7ecd3e974622e   sof-ipc4-tplg/sof-ptl-rt722-4ch.tplg
tplg     mtl          MATCH            6bcecd0e3ec8635bb2947f566b614b05   sof-ipc4-tplg/sof-mtl-rt1318-l12-rt714-l0.tplg
tplg     mtl          MATCH            b6a948f248f2a5aeb93ad11c53b506ce   sof-ipc4-tplg/sof-mtl-rt711-4ch.tplg
tplg     ptl          MATCH            1da4e004ebe2500189feb510eb20ab64   sof-ipc4-tplg/sof-ptl-cs42l43-l2-cs35l56x6-l13.tplg
tplg     hda          MATCH            c3615934594e8c748c5b21674ebe00bf   sof-ipc4-tplg/sof-hda-generic-idisp-2ch.tplg
tplg     mtl          MATCH            a9784dda61c8a1919af2ce28aae3146a   sof-ipc4-tplg/sof-mtl-max98357a-rt5682-ssp2-ssp0-google-aec.tplg
tplg     tgl          MATCH            626b248214e31717f619f2d0ce42213a   sof-ipc4-tplg/sof-tgl-rt711-rt1316-rt714.tplg
tplg     arl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-arl-cs42l43-l0-cs35l56-l23.tplg
tplg     arl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-arl-rt722-l0_rt1320-l2.tplg
tplg     ptl          MATCH            b6e013b43c53e239addba853eab818ad   sof-ipc4-tplg/sof-ptl-rt722-192k.tplg
tplg     hdmi         MATCH            562fe78fa50ed752827662e8a008c2db   sof-ipc4-tplg/sof-hdmi-pcm5-id3.tplg
tplg     arl          MISMATCH         cead18fc != 2077e193               sof-ipc4-tplg/sof-arl-dmic-2ch-id4.tplg
tplg     ptl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-ptl-rt713-l3-rt1320-l12.tplg
tplg     arl          MISMATCH         34c7bde0 != 1761a274               sof-ipc4-tplg/sof-arl-dmic-2ch-id2.tplg
tplg     sdw          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-sdw-generic.tplg
tplg     arl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-arl-cs42l43-l2-cs35l56-l3.tplg
tplg     mtl          MISMATCH         357d74c9 != 0ed1617b               sof-ipc4-tplg/sof-mtl-dmic-4ch-id2.tplg
tplg     tgl          MATCH            351860b905b7f870003a41459f55bcec   sof-ipc4-tplg/sof-tgl-cs35l56-l01-fb8.tplg
tplg     ptl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-ptl-rt712-l3-rt1320-l2.tplg
tplg     arl          MISMATCH         357d74c9 != 0ed1617b               sof-ipc4-tplg/sof-arl-dmic-4ch-id2.tplg
tplg     arl          MATCH            e0e82fd99b2711ad97ffb61d60d177db   sof-ipc4-tplg/sof-arl-rt711-l0-2ch.tplg
tplg     mtl          MISMATCH         47f197f4 != 13fff4cd               sof-ipc4-tplg/sof-mtl-dmic-4ch-id4.tplg
tplg     hda          MATCH            c9b67fbe6915eeff417a6da8f0102083   sof-ipc4-tplg/sof-hda-generic-ace1-4ch.tplg
tplg     ptl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-ptl-rt713-l2-rt1320-l13.tplg
tplg     mtl          MISMATCH         a82e379d != 20004b30               sof-ipc4-tplg/sof-mtl-dmic-2ch-id3.tplg
tplg     hda          MATCH            aed0b6275d2eefb1844de3cff795e521   sof-ipc4-tplg/sof-hda-generic-ace3-idisp-4ch.tplg
tplg     lnl          MATCH            1da4e004ebe2500189feb510eb20ab64   sof-ipc4-tplg/sof-lnl-cs42l43-l2-cs35l56x6-l13.tplg
tplg     ptl          MATCH            057d4bf1e99aac9f4ee69ff5b50e70ca   sof-ipc4-tplg/sof-ptl-es8336-ssp1.tplg
tplg     hdmi         MATCH            a236469de2caaaa8d55e5ae11fe67fd8   sof-ipc4-tplg/sof-hdmi-pcm5-id4.tplg
tplg     mtl          MATCH            ed029e7b4e991bb2bd9eaa647cf02049   sof-ipc4-tplg/sof-mtl-max98357a-rt5682.tplg
tplg     lnl          MISMATCH         5d9ac460 != b2052397               sof-ipc4-tplg/sof-lnl-dmic-2ch-id4.tplg
tplg     mtl          MATCH            1da4e004ebe2500189feb510eb20ab64   sof-ipc4-tplg/sof-mtl-cs42l43-l3-cs35l56-l01-spkagg.tplg
tplg     lnl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-lnl-rt722-l0.tplg
tplg     mtl          MATCH            71e368a5a4c213905bb1c12c272555b1   sof-ipc4-tplg/sof-mtl-rt1019-rt5682.tplg
tplg     mtl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-mtl-rt712-l0-rt1712-l3.tplg
tplg     mtl          MATCH            0c2e521c78e6407a42a500d831679757   sof-ipc4-tplg/sof-mtl-rt5650.tplg
tplg     arl          MATCH            b6a948f248f2a5aeb93ad11c53b506ce   sof-ipc4-tplg/sof-arl-rt711-l0-4ch.tplg
tplg     hda          MATCH            a1b8a05344d2d6136f37cd5a9bf5e63b   sof-ipc4-tplg/sof-hda-generic-ace1-2ch.tplg
tplg     lnl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-lnl-cs42l43-l0.tplg
tplg     arl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-arl-cs42l43-l0-cs35l56-l2.tplg
tplg     mtl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-mtl-rt712-vb-l0.tplg
tplg     lnl          MISMATCH         9d40bd64 != 191edbd9               sof-ipc4-tplg/sof-lnl-dmic-2ch-id2.tplg
tplg     sdca         MATCH            4ec4db519c2d1e979480dc138361b814   sof-ipc4-tplg/sof-sdca-2amp-id2.tplg
tplg     rpl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-rpl-cs42l43-l0.tplg
tplg     lnl          MISMATCH         6b162a55 != 259f4423               sof-ipc4-tplg/sof-lnl-dmic-2ch-id3.tplg
tplg     adl          MATCH            626b248214e31717f619f2d0ce42213a   sof-ipc4-tplg/sof-adl-rt711-l0-rt1316-l12-rt714-l3.tplg
tplg     hda          MATCH            7cbf332b59349c4d2b2342286cde3faa   sof-ipc4-tplg/sof-hda-generic.tplg
tplg     mtl          MATCH            351860b905b7f870003a41459f55bcec   sof-ipc4-tplg/sof-mtl-cs35l56-l01-fb8.tplg
tplg     arl          MISMATCH         a82e379d != 20004b30               sof-ipc4-tplg/sof-arl-dmic-2ch-id3.tplg
tplg     hda          MATCH            04120ad7a836ea92d73b1732dc06534f   sof-ipc4-tplg/sof-hda-generic-cavs25-idisp-4ch.tplg
tplg     arl          MATCH            730e3109da39fbc7db6eef81fa75fb38   sof-ipc4-tplg/sof-arl-cs42l43-l0-cs35l56-l2-2ch.tplg
tplg     mtl          MISMATCH         2d0e76d5 != 0a262250               sof-ipc4-tplg/sof-mtl-dmic-2ch-id5.tplg
tplg     mtl          MATCH            cad040ec47fc89ea8922d7fb4aa78298   sof-ipc4-tplg/sof-mtl-rt711-l0-rt1316-l3-2ch.tplg
tplg     ptl          MATCH            5db8929b016675abdd16f3aeff1b5941   sof-ipc4-tplg/sof-ptl-rt722-96k.tplg
tplg     hda          MATCH            667a4d7629a5e7d42a71960fa79ad03f   sof-ipc4-tplg/sof-hda-generic-ace3-4ch.tplg
tplg     mtl          MATCH            76333e6fb14a58f7c8690d3418f6b758   sof-ipc4-tplg/sof-mtl-max98357a-rt5682-ssp2-ssp0-2ch-pdm1.tplg
tplg     adl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-adl-cs42l43-l0-cs35l56-l23.tplg
tplg     arl          MATCH            d4be49fc8362e775a972724eda752857   sof-ipc4-tplg/sof-arl-rt711-l0-rt1316-l3.tplg
tplg     hda          MATCH            c6ba6c3220677419181d02fc9be102ce   sof-ipc4-tplg/sof-hda-generic-ace1-idisp-4ch.tplg
tplg     ptl          MISMATCH         8d6429b3 != b5d72994               sof-ipc4-tplg/sof-ptl-dmic-2ch-id4.tplg
tplg     lnl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-lnl-cs42l43-l0-cs35l56-l23.tplg
tplg     mtl          MATCH            4806b09d4f3b266bf3af73f5db2383ff   sof-ipc4-tplg/sof-mtl-rt713-l0-rt1316-l12.tplg
tplg     hdmi         MATCH            8fc82cb4fae4c9e615a7dc73d1585df9   sof-ipc4-tplg/sof-hdmi-pcm5-id6.tplg
tplg     tgl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-tgl-cs42l43-l3-cs35l56-l01.tplg
tplg     mtl          MATCH            e0e82fd99b2711ad97ffb61d60d177db   sof-ipc4-tplg/sof-mtl-rt711-2ch.tplg
tplg     mtl          MISMATCH         6868239d != 54ea5771               sof-ipc4-tplg/sof-mtl-dmic-4ch-id5.tplg
tplg     lnl          MISMATCH         ba9468af != 1d09da79               sof-ipc4-tplg/sof-lnl-dmic-4ch-id5.tplg
tplg     lnl          MISMATCH         5a0b7fc2 != 469dbce7               sof-ipc4-tplg/sof-lnl-dmic-2ch-id5.tplg
tplg     ptl          MISMATCH         baccb467 != a8b8eaca               sof-ipc4-tplg/sof-ptl-dmic-2ch-id5.tplg
tplg     sdca         MATCH            96fc087326e0e68b057455f3d04b899f   sof-ipc4-tplg/sof-sdca-jack-id0.tplg
tplg     arl          MATCH            646c048452e4d0f20af8844722355a14   sof-ipc4-tplg/sof-arl-rt711-l0.tplg
tplg     tgl          MATCH            4998f2eff8e2e0c84c553e6c4007b944   sof-ipc4-tplg/sof-tgl-rt711-rt1308-4ch.tplg
tplg     hdmi         MATCH            26a38dcbe963eb07b9a899eb247f3d34   sof-ipc4-tplg/sof-hdmi-pcm5-id2.tplg
tplg     ptl          MISMATCH         21ffebee != fe4161b3               sof-ipc4-tplg/sof-ptl-dmic-2ch-id2.tplg
tplg     lnl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-lnl-cs42l43-l0-cs35l56-l3.tplg
tplg     mtl          MISMATCH         34c7bde0 != 1761a274               sof-ipc4-tplg/sof-mtl-dmic-2ch-id2.tplg
tplg     arl          MISMATCH         47f197f4 != 13fff4cd               sof-ipc4-tplg/sof-arl-dmic-4ch-id4.tplg
tplg     mtl          MATCH            626b248214e31717f619f2d0ce42213a   sof-ipc4-tplg/sof-mtl-rt713-l0-rt1318-l12-rt1713-l3.tplg
tplg     sdca         MATCH            81b20d46e16f509a0e4b42ed5d6170a5   sof-ipc4-tplg/sof-sdca-1amp-id2.tplg
tplg     mtl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-mtl-cs42l43-l0.tplg
tplg     mtl          MATCH            626b248214e31717f619f2d0ce42213a   sof-ipc4-tplg/sof-mtl-rt713-l0-rt1316-l12-rt1713-l3.tplg
tplg     mtl          MATCH            ed029e7b4e991bb2bd9eaa647cf02049   sof-ipc4-tplg/sof-mtl-max98360a-rt5682.tplg
tplg     hda          MATCH            ec9996af2abcd17b131cc76d40195759   sof-ipc4-tplg/sof-hda-generic-ace3-idisp-2ch.tplg
tplg     ptl          MISMATCH         2a5091bd != e1ecdb1f               sof-ipc4-tplg/sof-ptl-dmic-4ch-id4.tplg
tplg     ptl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-ptl-rt722.tplg
tplg     mtl          MATCH            97068996a0acb4033d2e6b40c21f0300   sof-ipc4-tplg/sof-mtl-rt5650-dts.tplg
tplg     ptl          MATCH            0704bd490b07a76f35d54c2d8f214380   sof-ipc4-tplg/sof-ptl-rt722-2ch.tplg
tplg     mtl          MATCH            72341b3ffabb9e21a546cd0823075805   sof-ipc4-tplg/sof-mtl-rt711-l0-rt1316-l3-4ch.tplg
tplg     adl          MATCH            230aeec3e37251a0349bcff56258d330   sof-ipc4-tplg/sof-adl-rt711-l0-rt1316-l13-rt714-l2.tplg
tplg     lnl          MATCH            9d99f40426728ac2721c6f0c760c2022   sof-ipc4-tplg/sof-lnl-cs42l43-l0-cs35l56-l23-2ch.tplg
tplg     ptl          MATCH            334845f51b609e12e2ba3e947fcbf1e3   sof-ipc4-tplg/sof-ptl-rt721-4ch-96k.tplg
tplg     mtl          MATCH            3a5c2dd558416d63dc6f1ff07343da4a   sof-ipc4-tplg/sof-mtl-hdmi-ssp02.tplg
tplg     hda          MATCH            a60152429c11e1cd09475d8a51669765   sof-ipc4-tplg/sof-hda-generic-idisp.tplg
tplg     hda          MATCH            394b832331f9cf06c4669f38b82c7958   sof-ipc4-tplg/sof-hda-generic-2ch.tplg
tplg     lnl          MISMATCH         10eb34a0 != e58527b4               sof-ipc4-tplg/sof-lnl-dmic-4ch-id4.tplg
tplg     mtl          MATCH            ceb441cc99459415d57f795a2bd3b71a   sof-ipc4-tplg/sof-mtl-es83x6-ssp1-hdmi-ssp02.tplg
tplg     mtl          MATCH            242680a51b808fa6a6984584e0cc917e   sof-ipc4-tplg/sof-mtl-max98357a-rt5682-ssp2-ssp0-2ch-pdm1-google-aec.tplg
tplg     lnl          MATCH            789fb0eaa220b4af43862b98d3a41e12   sof-ipc4-tplg/sof-lnl-cs42l43-l0-cs35l56-l3-2ch.tplg
tplg     lnl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-lnl-rt712-l2-rt1712-l3.tplg
tplg     ptl          MISMATCH         c5f3a752 != 4850a35e               sof-ipc4-tplg/sof-ptl-dmic-4ch-id2.tplg
tplg     hda          MATCH            a478d01949eaacad73b4b960333adf8d   sof-ipc4-tplg/sof-hda-generic-cavs25-1ch.tplg
tplg     mtl          MATCH            d4be49fc8362e775a972724eda752857   sof-ipc4-tplg/sof-mtl-rt711-l0-rt1316-l3.tplg
tplg     adl          MATCH            f83c91114a47099a50196402700d180d   sof-ipc4-tplg/sof-adl-rt711-l0-rt1308-l12-rt715-l3.tplg
tplg     mtl          MATCH            8cdd35f706209e7f7b5e7190bcc6eeb4   sof-ipc4-tplg/sof-mtl-es83x6-ssp1.tplg
tplg     ptl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-ptl-rt712-l3-rt1320-l3.tplg
tplg     lnl          MATCH            a134ade46da1bd9afd644ec312bc6dbb   sof-ipc4-tplg/sof-lnl-rt711-4ch.tplg
tplg     hda          MATCH            6c750ee9a6caae38b41b3956779932c9   sof-ipc4-tplg/sof-hda-generic-idisp-4ch.tplg
tplg     hda          MATCH            8ed3219cc64b1eb5f2e7452dc7bb5bd5   sof-ipc4-tplg/sof-hda-generic-cavs25-idisp-2ch.tplg
tplg     adl          MATCH            29234a0610883db5387dff8cb46c59fc   sof-ipc4-tplg/sof-adl-rt711-4ch.tplg
tplg     mtl          MATCH            65cdd5d03d278559b0b39fba05dc8799   sof-ipc4-tplg/sof-mtl-rt712-l0-4ch.tplg
tplg     mtl          MATCH            6732b8bcbe0a0a457d4182c6ad72589b   sof-ipc4-tplg/sof-mtl-cs42l43-l0-cs35l56-l12.tplg
tplg     mtl          MATCH            0123e226d586bd1cf47dbd69dc36e82f   sof-ipc4-tplg/sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg
tplg     hda          MATCH            31970ce02a98d7dd7cd4440e5b6c84ca   sof-ipc4-tplg/sof-hda-generic-ace1-1ch.tplg
tplg     mtl          MATCH            2384bfc3f943e9a77625c044ccdfe415   sof-ipc4-tplg/sof-mtl-rt713-l0-rt1318-l1-rt1713-l3.tplg
tplg     arl          MATCH            730e3109da39fbc7db6eef81fa75fb38   sof-ipc4-tplg/sof-arl-cs42l43-l2-cs35l56-l3-2ch.tplg
tplg     lnl          MATCH            c98a39f741c79e061a03dba0d2650427   sof-ipc4-tplg/sof-lnl-rt1320-l12-rt714-l0.tplg
tplg     hda          MATCH            3da9951fdc05982d1be2fc64631801e1   sof-ipc4-tplg/sof-hda-generic-1ch.tplg
tplg     lnl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-lnl-rt713-l2-rt1320-l13.tplg
tplg     ptl          MATCH            e014fed266d4b7bd831d68491d6857b4   sof-ipc4-tplg/sof-ptl-rt721-4ch.tplg
tplg     mtl          MATCH            730e3109da39fbc7db6eef81fa75fb38   sof-ipc4-tplg/sof-mtl-rt712-l0-2ch.tplg
tplg     arl          MATCH            72341b3ffabb9e21a546cd0823075805   sof-ipc4-tplg/sof-arl-rt711-l0-rt1316-l3-4ch.tplg
tplg     mtl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-mtl-cs42l43-l0-cs35l56-l23.tplg
tplg     hda          MATCH            5a5313c4bcd8262c5ebed0775035bf49   sof-ipc4-tplg/sof-hda-generic-ace1-idisp-2ch.tplg
tplg     ptl          MISMATCH         1b690130 != d3cec9f7               sof-ipc4-tplg/sof-ptl-dmic-4ch-id5.tplg
tplg     hda          MATCH            a73fe164937b80c7e8e26441cb94425c   sof-ipc4-tplg/sof-hda-generic-ace3-2ch.tplg
tplg     arl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-arl-cs42l43-l2.tplg
tplg     lnl          MATCH            789fb0eaa220b4af43862b98d3a41e12   sof-ipc4-tplg/sof-lnl-cs42l43-l0-2ch.tplg
tplg     sdca         MATCH            eb653a3efcfff0ed1123201b25a5cb5f   sof-ipc4-tplg/sof-sdca-mic-id4.tplg
tplg     ptl          MATCH            ba0de22e47e96f9c366866c747871fc6   sof-ipc4-tplg/sof-ptl-hdmi-ssp02.tplg
tplg     mtl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-mtl-rt722-l0.tplg
tplg     ptl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-ptl-rt721.tplg
tplg     lnl          MATCH            6bcecd0e3ec8635bb2947f566b614b05   sof-ipc4-tplg/sof-lnl-rt1318-l12-rt714-l0.tplg
tplg     lnl          MATCH            cae60240fe9dc04455bb9131353321ec   sof-ipc4-tplg/sof-lnl-cs42l43-l0-4ch.tplg
tplg     ptl          MATCH            44472265acdd290e0d3e189ff4781d4e   sof-ipc4-tplg/sof-ptl-rt712-l3-rt1320-l3-4ch.tplg
tplg     mtl          MATCH            51d0c6547ccce2d5161a807318537d86   sof-ipc4-tplg/sof-mtl-rt5650-dts-google-aec.tplg
tplg     mtl          MATCH            d2c7071bafe4e6638897985c593c52c5   sof-ipc4-tplg/sof-mtl-max98357a-rt5682-google-aec.tplg
tplg     mtl          MISMATCH         cead18fc != 2077e193               sof-ipc4-tplg/sof-mtl-dmic-2ch-id4.tplg
tplg     ptl          MATCH            f8446336ef8a3fe107460010c5f2a628   sof-ipc4-tplg/sof-ptl-rt712-l2-rt1320-l1.tplg
tplg     mtl          MATCH            71e368a5a4c213905bb1c12c272555b1   sof-ipc4-tplg/sof-mtl-max98357a-rt5682-ssp2-ssp0.tplg
tplg     mtl          MATCH            a99dffed78904a18f665fde9d5e874b7   sof-ipc4-tplg/sof-mtl-rt712-l0.tplg
tplg     lnl          MATCH            0cd0e05e62f49a7b446b552e4f16fc37   sof-ipc4-tplg/sof-lnl-rt713-l0-rt1318-l1-2ch.tplg
tplg     hdmi         MATCH            e97e03950853fec7dfc1a94a50aec575   sof-ipc4-tplg/sof-hdmi-pcm5-id5.tplg
tplg     lnl          MATCH            0123e226d586bd1cf47dbd69dc36e82f   sof-ipc4-tplg/sof-lnl-rt711-l0-rt1316-l23-rt714-l1.tplg
tplg     hda          MATCH            cb755e47834d19793f43090f2d695fa7   sof-ipc4-tplg/sof-hda-generic-cavs25-4ch.tplg
tplg     arl          MISMATCH         5aaafa62 != b2c86b9d               sof-ipc4-tplg/sof-arl-dmic-4ch-id3.tplg
tplg     arl          MATCH            fa54c27123619df1bfff47c8f2bad3d4   sof-ipc4-tplg/sof-arl-cs42l43-l0.tplg
tplg     arl          MATCH            cad040ec47fc89ea8922d7fb4aa78298   sof-ipc4-tplg/sof-arl-rt711-l0-rt1316-l3-2ch.tplg
tools    tools        MISSING          --------------------------------   tools/sof-probes
tools    tools        MISSING          --------------------------------   tools/mtrace-reader.py
tools    tools        MISSING          --------------------------------   tools/sof-ctl
===================================================================================================================
SUMMARY: Total: 194 | Passed: 157 | Failed: 34 | Missing: 3 | Verdict: FAIL
lrg@moth:~$ 

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new Python 3 CLI utility (validate_sof_install.py) to validate (and optionally repair) SOF firmware, LLEXT modules, topologies, and tools installed on a target system by comparing against the sof-bin repository using MD5 checksums. It also adds a unit/integration test suite, documentation, and ignores Python cache artifacts.

Changes:

  • Add validate_sof_install.py validator with local/offline-rootfs/SSH target support, JSON output, and optional “fix” mode.
  • Add tests/test_validate_sof_install.py covering repo resolution, local target behavior, mismatch detection, and fix flows.
  • Update README.md usage docs and expand .gitignore for Python cache files.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 8 comments.

File Description
validate_sof_install.py New MD5-based installation validation/repair CLI with local + SSH target support
tests/test_validate_sof_install.py New unittest suite validating core behaviors and fix paths
README.md Document how to run validation/repair and generate MD5 manifests
.gitignore Ignore Python bytecode and __pycache__ directories

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread validate_sof_install.py
Comment on lines +91 to +102
def compute_file_md5(file_path: Path, block_size: int = 65536) -> Optional[str]:
"""Compute MD5 hash of a local file."""
if not file_path.is_file():
return None
hasher = hashlib.md5()
try:
with open(file_path, "rb") as f:
for chunk in iter(lambda: f.read(block_size), b""):
hasher.update(chunk)
return hasher.hexdigest()
except (OSError, IOError):
return None
Comment thread validate_sof_install.py Outdated
Comment on lines +193 to +196
norm_ver = target_version.strip()
if not norm_ver.startswith("v") and not norm_ver.startswith("20"):
norm_ver = "v" + norm_ver

Comment thread validate_sof_install.py
Comment on lines +481 to +487
cmd = [
"ssh",
"-o", "BatchMode=yes",
"-o", "ConnectTimeout=10",
self.ssh_host,
f"python3 -c {subprocess.list2cmdline([remote_script])}",
]
Comment thread validate_sof_install.py
Comment on lines +511 to +519
shell_cmd = (
f'if [ -L "{rem_p}" ]; then '
f' echo "SYM $(readlink "{rem_p}")"; '
f' if [ -f "{rem_p}" ]; then md5sum "{rem_p}" 2>/dev/null | awk \'{{print $1}}\'; else echo "BROKEN"; fi; '
f'elif [ -f "{rem_p}" ]; then '
f' echo "FILE $(stat -c %s "{rem_p}" 2>/dev/null || echo 0)"; '
f' md5sum "{rem_p}" 2>/dev/null | awk \'{{print $1}}\'; '
f'else echo "MISSING"; fi'
)
Comment thread validate_sof_install.py
Comment on lines +586 to +588
return True, f"Transferred {source_path} -> {self.ssh_host}:{rem_p}"
except subprocess.SubprocessError as e:
return False, f"SSH/SCP error fixing {rem_p}: {e}"
Comment thread validate_sof_install.py
Comment on lines +38 to +47
class Status(Enum):
MATCH = "MATCH"
MISMATCH = "MISMATCH"
MISSING = "MISSING"
SYMLINK_MATCH = "SYMLINK_MATCH"
SYMLINK_MISMATCH = "SYMLINK_MISMATCH"
BROKEN_SYMLINK = "BROKEN_SYMLINK"
EXTRA = "EXTRA"
ERROR = "ERROR"

Comment on lines +69 to +77
def test_global_md5_database_lookup(self):
# Lookup known hash for TGL v2.12 firmware
tgl_v212_fw = self.repo_dir / "v2.12.x" / "sof-ipc4-v2.12" / "tgl" / "community" / "sof-tgl.ri"
if tgl_v212_fw.exists():
h = compute_file_md5(tgl_v212_fw)
matched = self.repo.lookup_md5(h, "sof-tgl.ri")
self.assertIsNotNone(matched)
self.assertIn("v2.12", matched)

Comment thread validate_sof_install.py
Comment on lines +258 to +268
def build_global_md5_database(self) -> Dict[str, List[Dict[str, str]]]:
"""
Build an index of all regular files in all version directories by MD5 checksum.
Returns: md5_hash -> list of {version_dir, component, filename, rel_path}
"""
if self._md5_db is not None:
return self._md5_db

db: Dict[str, List[Dict[str, str]]] = {}
for vdir in self.get_version_dirs():
for root, _, files in os.walk(vdir):
@lgirdwood
lgirdwood force-pushed the feature/validate-sof-install branch from a1ad60f to ecd76dd Compare August 26, 2026 13:09
lgirdwood pushed a commit that referenced this pull request Aug 26, 2026
- Safe MD5 instantiation with FIPS/OpenSSL fallback and error handling
- Case-insensitive version string resolution (e.g. V2.14.1)
- Fast on-demand filename-targeted MD5 lookup caching
- Proper POSIX quoting with shlex.quote in remote SSH fallback
- SubprocessError and OSError handling in RemoteSshTarget.fix_file
- Extraneous installed files detection and Status.EXTRA handling in strict mode
- Fast isolated mock repository for lookup_md5 unit tests
Add validate_sof_install.py tool to verify, identify, and repair SOF
firmware, LLEXT modules, topology binaries, and debug tools installed on
target hosts against reference releases in sof-bin.

Key capabilities:
- Validation engine: Compares installed files, versions, symlinks, and
  MD5 checksums on local, offline rootfs, or remote (SSH) targets against
  release assets in sof-bin.
- Debian (.deb) & RPM (.rpm) package validation: Directly extracts and
  validates sof-bin packages offline without requiring installation.
- Version & release identification (--identify): Scans target filesystems
  and resolves installed component versions using on-demand release hash
  indexing.
- Platform FW vs LLEXT consistency verification: Validates that all
  installed dynamic LLEXT modules match base firmware binaries in both
  release version and embedded BCD build dates.
- Topology upgrade detection: Automatically identifies and flags installed
  topologies that can be upgraded from sof-bin to match target firmware.
- Binary manifest inspection (--manifest / -m): Extracts metadata
  directly from binaries (ADSP FW $AM1, CSS $MN2 BCD build dates,
  extended manifest XMan, Zephyr/SOF git tag banners, and ALSA topology
  CoSA ABI headers).
- Sub-row manifest diffs: On mismatch, outputs comparison sub-rows
  detailing Host vs Expected versions, build timestamps, and ABI levels.
- Repair engine (--fix, --dry-run): Automatically installs missing or
  mismatched files and recreates symlinks via local copy or SSH/SCP.
  Displays version and manifest transitions (from -> to) for each repair.
- Downgrade protection: Prevents downgrading installed packages unless
  explicitly allowed via --downgrade / --allow-downgrade flag.
- Strict mode & extraneous file detection (--strict): Identifies untracked
  or extraneous firmware/topology files on target systems (Status.EXTRA).
- Automated tests: Comprehensive unit test suite covering repo discovery,
  MD5 matching, manifest parsing, package validation, consistency checking,
  fix operations, and downgrade prevention.
@lgirdwood
lgirdwood force-pushed the feature/validate-sof-install branch 2 times, most recently from fabae95 to 4164f69 Compare August 26, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants