]> git.apps.os.sepia.ceph.com Git - linux-firmware.git/commit
copy-firmware: Handle links to uncompressed files
authorJuerg Haefliger <juerg.haefliger@canonical.com>
Fri, 13 Sep 2024 06:15:18 +0000 (08:15 +0200)
committerJuerg Haefliger <juerg.haefliger@canonical.com>
Fri, 13 Sep 2024 06:38:36 +0000 (08:38 +0200)
commit121e467fde66011caa2ff64b96738cbc68dc993e
tree40287e75f8ec1c83149e8e5be9ac7a2ce4735164
parent590d8aa4e39b6d1f1f6ec5a53d73919c607f9bb2
copy-firmware: Handle links to uncompressed files

If copy-firwmware is told to compress files, it blindly assumes that
the target is indeed compressed (unless it's a directory) and creates
any symlinks accordingly.

This leads to broken symlinks for links that point at RawFiles:
adspr.jsn.zst -> ../qcm6490/adspr.jsn.zst
adsps.jsn.zst -> ../qcm6490/adsps.jsn.zst

That should be:
adspr.jsn -> ../qcm6490/adspr.jsn
adsps.jsn -> ../qcm6490/adsps.jsn

Fix that by checking if the target (directory or file) exists. And while
at it, add a check for broken symlinks at the end.

Fixes: 541f96c0fa47b ("qcom: qcm6490: add ADSP and CDSP firmware")
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
copy-firmware.sh