kernel-firmware/make-files.sh
Takashi Iwai 31cec0f276 - Update to version 20240912 (git commit 47c72fee8fe3):
* amdgpu: Add VPE 6.1.3 microcode
  * amdgpu: add SDMA 6.1.2 microcode
  * amdgpu: Add support for PSP 14.0.4
  * amdgpu: add GC 11.5.2 microcode
  * qcom: qcm6490: add ADSP and CDSP firmware
  * linux-firmware: Update firmware file for Intel Bluetooth Magnetor core
  * linux-firmware: Update firmware file for Intel BlazarU core
  * linux-firmware: Update firmware file for Intel Bluetooth Solar core
- Temporary fix for the missing symlink installations:
  copy-firmware-fix-symlink-without-compress.patch

- Update to version 20240911 (git commit 59def907425d):
  * rtl_bt: Update RTL8852B BT USB FW to 0x0447_9301 (bsc#1229272)

- Update to version 20240910 (git commit 2a7b69a3fa30):
  * realtek: rt1320: Add patch firmware of MCU
  * i915: Update MTL DMC v2.23
  * cirrus: cs35l56: Add firmware for Cirrus CS35L54 for some HP laptops

OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=500
2024-09-13 09:10:04 +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