kernel-firmware/make-files.sh
Takashi Iwai bc5ef928de Accepting request 1113030 from home:tiwai:branches:Kernel:HEAD
- Update to version 20230918 (commit f48da6da5507):
  * Run merge request pipelines for pre-commit.
  * linux-firmware: amd-ucode: Add note on fam19h warnings
  * i915: update MTL HuC to version 8.5.4
  * amdgpu: update DMCUB to 0.0.183.0 for various AMDGPU ASICs

- Update to version 20230907 (git commit c801b3b807d2):
  * Turn off textwidth check
  * linux-firmware: add link to sc8280xp audioreach firmware
  * qcom: sm8250: add RB5 sensors DSP firmware
  * qcom: Update vpu-1.0 firmware
  * qcom: sm8250: update DSP firmware
  * qcom: add firmware for the onboard WiFi on qcm2290 / qrb4210
  * qcom: add venus firmware files for v6.0
  * qcom: add firmware for QRB4210 platforms
  * qcom: add firmware for QCM2290 platforms
  * qcom: add GPU firmware for QCM2290 / QRB2210
  * ath10k/WCN3990: move wlanmdsp to qcom/sdm845
  * WHENCE: Don't compress qcom json files
  * WHENCE: amd-ucode: Use new RawFile keyword
  * check_whence: Recognize RawFile keyword
  * Only run ci-fairy on merge requests
  * Capture artifacts from `make dist` to save at release time.
  * Add new toplevel 'make dist' target.
  * Create symlinks for all firmware that is duplicate using rdfind
  * QCA: Update Bluetooth WCN685x 2.1 firmware to 2.1.0-00605
  * Add shellcheck pre-commit target
  * Fix carl9170fw shell scripts for shellcheck errors
  * Add a rule for automatic tagging releases by pipeline schedule
  * Add gitlab ci for calling pre-commit and ci-fairy

OBS-URL: https://build.opensuse.org/request/show/1113030
OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=442
2023-09-22 14:38:02 +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 [ -f "$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