[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240913092122.19523-1-tiwai@suse.de>
Date: Fri, 13 Sep 2024 11:21:08 +0200
From: Takashi Iwai <tiwai@...e.de>
To: linux-firmware@...nel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH linux-firmware] copy-firmware: Fix incorrect symlinks to uncompressed targets
The script tries to make a symlink to the target with the compressed
extension, but it ends up with a wrong symlink if the compression is
skipped for the target (e.g. via RawFile entry).
Add more checks to make a correct symlink.
Signed-off-by: Takashi Iwai <tiwai@...e.de>
---
This fixes the installation failure with the recent change for qcom
commit 541f96c0fa47b70e9bc13035f7a082064e5b2d4c
The workaround is pretty ad hoc, so if you have a better way to manage
it, feel free to scratch this.
copy-firmware.sh | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/copy-firmware.sh b/copy-firmware.sh
index 6757c6ce03a3..fc096dd6daf0 100755
--- a/copy-firmware.sh
+++ b/copy-firmware.sh
@@ -136,9 +136,15 @@ grep -E '^Link:' WHENCE | sed -e 's/^Link: *//g;s/-> //g' | while read f d; do
if test -d "$target"; then
$verbose "creating link $f -> $d"
ln -s "$d" "$destdir/$f"
- else
+ elif test -f "$target$compext"; then
$verbose "creating link $f$compext -> $d$compext"
ln -s "$d$compext" "$destdir/$f$compext"
+ elif test -f "$target"; then
+ $verbose "creating link $f -> $d"
+ ln -s "$d" "$destdir/$f"
+ else
+ $verbose "creating link (not yet existing) $f$compext -> $d$compext"
+ ln -s "$d$compext" "$destdir/$f$compext"
fi
fi
done
--
2.43.0
Powered by blists - more mailing lists