kernel-firmware/make-files.sh
Takashi Iwai f4daba6a5b - Update to version 20241113 (git commit 1727aceef4d2):
* qcom: venus-5.4: add venus firmware file for qcs615
  * qcom: update venus firmware file for SC7280
  * QCA: Add 22 bluetooth firmware nvm files for QCA2066

- Update to version 20241112 (git commit c57a0a42468b):
  * mediatek MT7922: update bluetooth firmware to 20241106163512
  * mediatek MT7921: update bluetooth firmware to 20241106151414
  * linux-firmware: update firmware for MT7922 WiFi device
  * linux-firmware: update firmware for MT7921 WiFi device
  * qcom: Add QDU100 firmware image files.
  * qcom: Update aic100 firmware files
  * dedup-firmware.sh: fix infinite loop for --verbose
  * rtl_bt: Update RTL8852BT/RTL8852BE-VT BT USB FW to 0x04D7_63F7
  * cnm: update chips&media wave521c firmware.
  * mediatek MT7920: update bluetooth firmware to 20241104091246
  * linux-firmware: update firmware for MT7920 WiFi device
  * copy-firmware.sh: Run check_whence.py only if in a git repo
  * cirrus: cs35l56: Add firmware for Cirrus CS35L56 for various Dell laptops
  * amdgpu: update DMCUB to v9.0.10.0 for DCN351
  * rtw89: 8852a: update fw to v0.13.36.2
  * rtw88: Add firmware v52.14.0 for RTL8812AU
  * i915: Update Xe2LPD DMC to v2.23
  * linux-firmware: update firmware for mediatek bluetooth chip (MT7925)
  * linux-firmware: update firmware for MT7925 WiFi device
  * WHENCE: Add sof-tolg for mt8195
  *  linux-firmware: Update firmware file for Intel BlazarI core
  * qcom: Add link for QCS6490 GPU firmware
  * qcom: update gpu firmwares for qcs615 chipset
  * cirrus: cs35l56: Update firmware for Cirrus Amps for some HP laptops

OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=508
2024-11-13 16:03:13 +00:00

105 lines
1.9 KiB
Bash

#!/bin/sh
#
# Read WHENCE from stdin create files-xxx for each topic
#
# usage: make-files.sh [-v] topics.list DESTDIR < WHENCE
#
verbose=:
if [ x"$1" = x"-v" ]; then
verbose=echo
shift
fi
topics="$1"
DESTDIR="$2"
fwdir=${3:-/lib/firmware}
dest=$DESTDIR/$fwdir
do_compress=1
if [ -n "$do_compress" ]; then
cext=".xz"
else
cext=""
fi
make_dirs () {
local f="$1"
local d=$(dirname "$f")
if [ "$d" != "." ]; then
while true; do
if ! grep -q '%dir '"$fwdir/$d"'$' files-$topic; then
echo "%dir $fwdir/$d" >> files-$topic
fi
case "$d" in
*/*) d=${d%/*};;
*) break;;
esac
done
fi
}
add_file () {
local f="$1"
make_dirs "$f"
if [ -e "$dest/$f" ]; then
echo "\"$fwdir/$f\"" >> files-$topic
else
echo "\"$fwdir/$f$cext\"" >> files-$topic
fi
}
sub="xxx"
while read l; do
test -z "$l" && continue
case "$l" in
----*)
sub=""
topic=""
;;
Driver:*)
test -n "$sub" && continue
sub=$(echo "$l" | sed -e's/Driver: *//' -e's/[ :].*$//')
m=$(grep -m1 "^$sub": "$topics" | sed -e's/^.*:[[:space:]]*//')
test -z "$m" && continue
set -- $m
topic="$1"
if [ "$topic" = "SKIP" ]; then
continue
fi
$verbose "Switching to topic $topic"
if [ -n "$topic" ]; then
if [ ! -s files-$topic ]; then
echo "%dir $fwdir" > files-$topic
fi
fi
;;
File:*|RawFile:*)
test "$topic" = "SKIP" && continue
if [ -z "$topic" ]; then
echo "ERROR: no topic found for $l"
exit 1
fi
f=$(echo "$l" | sed -e's/^File: *//' -e's/^RawFile: *//' -e's/"//g' -e's/\\//g')
case "$f" in
*/README*)
continue;;
esac
add_file "$f"
;;
Link:*)
test "$topic" = "SKIP" && continue
if [ -z "$topic" ]; then
echo "ERROR: no topic found for $l"
exit 1
fi
f=$(echo "$l" | sed -e's/^Link: *//' -e's/ *->.*$//' -es'/\\//g')
add_file "$f"
;;
esac
done
exit 0