1
0
kernel-firmware/get_supplements.sh
Takashi Iwai 6d5f1a9f23 Accepting request 723804 from home:tiwai:fw-compress3
- Move documents and license texts into the proper section
- Remove spurious non-firmware files
- Restructure the packaging for reducing the storage footprint
  (bsc#1143959):
  the firmware files are split into several subpackages, so that user
  doesn't need to install unnecessary files.  Each package has
  supplements entries that are generated from the static list (that
  was created from the current and old TW kernel binaries).
  There is a catch-all package, kernel-firmware-all, and this
  provides/obsoletes the former kernel-firmware package.  And each
  firmware file is compressed in XZ format for the new kernel (5.3 or
  later).
  For the systems with older kernels, we still provide the old'n'good
  kernel-firmware.rpm, containing everything in the raw format, too.
  This kernel-firmware.rpm will be obsoleted once when
  kernel-firmware-all above is installed.
  The build of both flavors are done in the multibuild.  Without the
  flavor, the raw kernel-firmware.rpm and ucode-amd.rpm are built,
  while the new kernel firmware packages are built in "compressed"
  flavor (-M compressed).

OBS-URL: https://build.opensuse.org/request/show/723804
OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-firmware?expand=0&rev=266
2019-08-15 17:52:36 +00:00

34 lines
603 B
Bash

#!/bin/sh
#
# Generate modalias Supplements lines for the given kernel-firmware topic
#
target=$1
modules=""
sorted_modules () {
for m in $*; do
m=$(echo $m | sed -e's/-/_/g')
echo $m
done | sort | uniq
}
while read first topic mods; do
if [ "$topic" = "$target" ]; then
first=${first%:}
if [ -z "$mods" ]; then
modules="$modules $first"
else
modules="$modules $mods"
fi
fi
done < topics.list
smodules=$(sorted_modules $modules)
for m in $smodules; do
grep '^'$m':' aliases.list | sed -e's/^.*: \(.*\)$/Supplements: modalias(\1)/g'
done | sort | uniq
exit 0