2019-08-15 19:52:36 +02:00
|
|
|
#
|
|
|
|
# spec file for package kernel-firmware
|
|
|
|
#
|
2022-02-21 11:56:02 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-08-15 19:52:36 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
|
2020-11-23 15:00:48 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
%define _firmwaredir /lib/firmware
|
|
|
|
%endif
|
|
|
|
|
2020-11-11 14:28:48 +01:00
|
|
|
%define __ksyms_path ^%{_firmwaredir}
|
2019-08-15 19:52:36 +02:00
|
|
|
%define version_unconverted @@VERSION@@
|
|
|
|
|
|
|
|
Name: kernel-firmware
|
|
|
|
Version: @@VERSION@@
|
|
|
|
Release: 0
|
|
|
|
Summary: Linux kernel firmware files
|
2022-06-08 12:40:21 +02:00
|
|
|
License: GPL-2.0-only AND SUSE-Firmware AND GPL-2.0-or-later AND MIT
|
2019-08-15 19:52:36 +02:00
|
|
|
Group: System/Kernel
|
|
|
|
URL: https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/
|
|
|
|
# Created with umask 022; cd /_tmp
|
|
|
|
# After git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
|
|
|
|
# cd linux-firmware
|
|
|
|
# git archive --format=tar --prefix=kernel-firmware-$version/ -v master ./ | xz -9 -M 4G --check=crc32 -T 4 > /tmp/kernel-firmware-$version.tar.xz
|
|
|
|
#
|
|
|
|
Source0: kernel-firmware-%{version}.tar.xz
|
|
|
|
Source1: extrawhence
|
|
|
|
Source2: ast_dp501_fw.bin
|
|
|
|
Source8: ql2600_fw.bin
|
|
|
|
Source9: ql2700_fw.bin
|
|
|
|
Source10: ql8300_fw.bin
|
2022-10-24 12:44:58 +02:00
|
|
|
Source11: cirrus-cs35l41-firmware.tar.xz
|
2019-08-15 19:52:36 +02:00
|
|
|
Source99: %{name}-rpmlintrc
|
2022-08-08 17:45:50 +02:00
|
|
|
# temporary revert (bsc#1202152): taken from upstream commit 06acb465d80b
|
|
|
|
Source100: rtw8822c_fw.bin
|
2019-08-15 19:52:36 +02:00
|
|
|
# install / build infrastructure
|
|
|
|
Source1001: install-split.sh
|
|
|
|
Source1002: list-license.sh
|
|
|
|
Source1003: get_supplements.sh
|
|
|
|
Source1004: topics.list
|
|
|
|
Source1005: licenses.list
|
|
|
|
Source1006: aliases.list
|
|
|
|
Source1007: topicdefs
|
|
|
|
Source1008: topicprovs
|
|
|
|
Source1009: kernel-firmware.spec.in
|
|
|
|
Source1010: makespec.sh
|
|
|
|
Source1011: fwtopics.py
|
|
|
|
Source1012: check-topic.py
|
|
|
|
Source1013: update-aliases.py
|
|
|
|
Source1014: README.build
|
2022-10-10 11:25:22 +02:00
|
|
|
# workarounds
|
2022-10-09 11:23:23 +02:00
|
|
|
Source1100: qcom-post
|
2022-10-10 11:25:22 +02:00
|
|
|
Source1101: uncompressed-post
|
2022-10-24 12:44:58 +02:00
|
|
|
# temporary fix
|
|
|
|
Patch1: cirrus-WHENCE-update.patch
|
2019-08-15 19:52:36 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: suse-module-tools
|
2020-06-04 17:27:43 +02:00
|
|
|
Requires(post): /usr/bin/mkdir /usr/bin/touch
|
2022-06-08 12:40:21 +02:00
|
|
|
Requires(postun):/usr/bin/mkdir /usr/bin/touch
|
2019-08-15 19:52:36 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
@@ALLPROVS@@
|
|
|
|
Provides: compat-wireless-firmware = 4.4
|
|
|
|
Obsoletes: compat-wireless-firmware < 4.4
|
2021-07-16 16:30:05 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
# make sure we have post-usrmerge filesystem package on TW
|
|
|
|
Conflicts: filesystem < 84
|
|
|
|
%endif
|
2019-08-15 19:52:36 +02:00
|
|
|
|
2020-09-26 09:41:38 +02:00
|
|
|
# Force bzip2 instead of lzma compression (bsc#1176981)
|
|
|
|
%define _binary_payload w9.bzdio
|
|
|
|
|
2019-08-15 19:52:36 +02:00
|
|
|
%description
|
|
|
|
This package contains the raw uncompressed firmware files for Linux kernel
|
|
|
|
drivers. This package is provided only for compatibility with older kernels
|
|
|
|
that do not support the compressed format.
|
|
|
|
|
|
|
|
%package -n ucode-amd
|
|
|
|
Summary: Microcode updates for AMD CPUs
|
|
|
|
Group: System/Kernel
|
2020-06-04 17:27:43 +02:00
|
|
|
Requires(post): /usr/bin/mkdir /usr/bin/touch
|
2022-06-08 12:40:21 +02:00
|
|
|
Requires(postun):/usr/bin/mkdir /usr/bin/touch
|
2019-08-15 19:52:36 +02:00
|
|
|
# new style (after 3.12 kernel somewhen)
|
|
|
|
Supplements: modalias(cpu:type%%3Ax86*ven0002*)
|
|
|
|
# old style (before 3.16 kernel)
|
|
|
|
Supplements: modalias(x86cpu:vendor%%3A0002%%3Afamily%%3A*%%3Amodel%%3A*%%3Afeature%%3A*)
|
|
|
|
|
|
|
|
%description -n ucode-amd
|
|
|
|
This package contains the microcode files used by AMD CPUs.
|
|
|
|
|
|
|
|
%package all
|
|
|
|
Summary: Compatibility metapackage for kernel firmware files
|
|
|
|
Group: System/Kernel
|
2020-06-04 17:27:43 +02:00
|
|
|
Requires(post): /usr/bin/mkdir /usr/bin/touch
|
2022-06-08 12:40:21 +02:00
|
|
|
Requires(postun):/usr/bin/mkdir /usr/bin/touch
|
2019-09-23 09:44:12 +02:00
|
|
|
Requires(post): dracut >= 049
|
2019-08-15 19:52:36 +02:00
|
|
|
Provides: kernel-firmware = %{version}
|
|
|
|
Obsoletes: kernel-firmware <= %{version}
|
|
|
|
Conflicts: kernel < 5.3
|
|
|
|
Provides: compat-wireless-firmware = 4.4
|
|
|
|
Obsoletes: compat-wireless-firmware < 4.4
|
2021-07-16 16:30:05 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
# make sure we have post-usrmerge filesystem package on TW
|
|
|
|
Conflicts: filesystem < 84
|
|
|
|
%endif
|
2019-08-15 19:52:36 +02:00
|
|
|
@@SUBPKGLIST@@
|
|
|
|
|
|
|
|
%description all
|
|
|
|
This package is a catch-all compatibility metapackage for providing
|
|
|
|
all files that have been provided by kernel-firmware package.
|
|
|
|
|
|
|
|
@@SUBPACKAGES@@
|
|
|
|
|
|
|
|
%prep
|
2022-10-24 12:44:58 +02:00
|
|
|
%setup -q -a 11
|
|
|
|
%patch1 -p1
|
2019-08-15 19:52:36 +02:00
|
|
|
# additional firmwares
|
|
|
|
cat %{SOURCE1} >> WHENCE
|
|
|
|
cp %{SOURCE2} %{SOURCE8} %{SOURCE9} %{SOURCE10} .
|
2022-08-08 17:45:50 +02:00
|
|
|
# temporary revert (bsc#1202152)
|
|
|
|
install -c -m 0644 %{SOURCE100} rtw88/rtw8822c_fw.bin
|
2019-08-15 19:52:36 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
# nothing to do
|
|
|
|
|
|
|
|
%install
|
2020-11-11 14:28:48 +01:00
|
|
|
mkdir -p %{buildroot}%{_firmwaredir}
|
2019-08-15 19:52:36 +02:00
|
|
|
%if "%flavor" != "compressed"
|
2020-11-11 14:28:48 +01:00
|
|
|
sh ./copy-firmware.sh %{buildroot}%{_firmwaredir}
|
2019-08-15 19:52:36 +02:00
|
|
|
%else
|
2020-11-11 14:28:48 +01:00
|
|
|
sh %{_sourcedir}/install-split.sh -v %{_sourcedir}/topics.list %{buildroot} %{_firmwaredir} < WHENCE
|
2019-08-15 19:52:36 +02:00
|
|
|
sh %{_sourcedir}/list-license.sh < %{_sourcedir}/licenses.list
|
|
|
|
%endif
|
2020-11-11 14:28:48 +01:00
|
|
|
%fdupes -s %{buildroot}
|
2019-08-15 19:52:36 +02:00
|
|
|
|
|
|
|
%if "%flavor" != "compressed"
|
|
|
|
@@POST@@
|
2022-06-08 12:40:21 +02:00
|
|
|
|
2019-08-15 19:52:36 +02:00
|
|
|
@@POST@@ -n ucode-amd
|
|
|
|
%else
|
2022-06-08 12:40:21 +02:00
|
|
|
|
2019-08-15 19:52:36 +02:00
|
|
|
@@POST@@ all
|
|
|
|
@@SUBPKGPOSTS@@
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%flavor" != "compressed"
|
|
|
|
%files
|
|
|
|
%doc WHENCE README
|
|
|
|
%license GPL-2 GPL-3 LICEN[CS]E.*
|
2020-11-11 14:28:48 +01:00
|
|
|
%{_firmwaredir}
|
|
|
|
%exclude %{_firmwaredir}/amd-ucode
|
|
|
|
%exclude %{_firmwaredir}/amd-ucode/*
|
2019-08-15 19:52:36 +02:00
|
|
|
|
|
|
|
%files -n ucode-amd
|
2022-09-06 13:56:55 +02:00
|
|
|
%doc amd-ucode/README
|
2019-08-15 19:52:36 +02:00
|
|
|
%license LICENSE.amd-ucode
|
2020-11-11 14:28:48 +01:00
|
|
|
%dir %{_firmwaredir}
|
|
|
|
%{_firmwaredir}/amd-ucode
|
2019-08-15 19:52:36 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%flavor" == "compressed"
|
|
|
|
%files all
|
|
|
|
%doc WHENCE README
|
|
|
|
|
|
|
|
@@SUBPKGFILES@@
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%changelog
|