diff --git a/.gitignore b/.gitignore index 0ef4d2c..334e4a2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,10 @@ /sof-bin-f31c9ce.tar.gz /sof-bin-6bd5501.tar.gz /sof-bin-v1.8.tar.gz +/sof-bin-v1.9.tar.gz +/sof-bin-v1.9.2.tar.gz +/sof-bin-v1.9.3.tar.gz +/sof-bin-v2.0.tar.gz +/sof-tplg-v2.1.1a.tar.gz +/alsa-sof-firmware-2.1.1-1.fc37.src.rpm +/sof-bin-v2.1.1.tar.gz diff --git a/alsa-sof-firmware.spec b/alsa-sof-firmware.spec index cef929d..fcca289 100644 --- a/alsa-sof-firmware.spec +++ b/alsa-sof-firmware.spec @@ -2,22 +2,29 @@ # in the end package are expected. %define _binaries_in_noarch_packages_terminate_build 0 %global _firmwarepath /usr/lib/firmware +%global _xz_opts -9 --check=crc32 -%global sof_ver 1.8 -#global sof_ver_pre rc2 +%global sof_ver 2.1.1 +#global sof_ver_pre rc1 %global sof_ver_rel %{?sof_ver_pre:.%{sof_ver_pre}} %global sof_ver_pkg v%{sof_ver}%{?sof_ver_pre:-%{sof_ver_pre}} +%global with_sof_addon 1 +%global sof_ver_addon 2.1.1a + %global tplg_version 1.2.4 Summary: Firmware and topology files for Sound Open Firmware project Name: alsa-sof-firmware Version: %{sof_ver} -Release: 2%{?sof_ver_rel}%{?dist} +Release: 1%{?sof_ver_rel}%{?dist} # See later in the spec for a breakdown of licensing License: BSD URL: https://github.com/thesofproject/sof-bin Source: https://github.com/thesofproject/sof-bin/releases/download/%{sof_ver_pkg}/sof-bin-%{sof_ver_pkg}.tar.gz +%if 0%{?with_sof_addon} +Source2: https://github.com/thesofproject/sof-bin/releases/download/v%{sof_ver_addon}/sof-tplg-v%{sof_ver_addon}.tar.gz +%endif BuildRequires: alsa-topology >= %{tplg_version} BuildRequires: alsa-topology-utils >= %{tplg_version} Conflicts: alsa-firmware <= 1.2.1-6 @@ -47,15 +54,39 @@ mv sof-%{sof_ver_pkg}/* firmware/intel/sof # move topology files mv sof-tplg-%{sof_ver_pkg} firmware/intel/sof-tplg +%if 0%{?with_sof_addon} +tar xvzf %{SOURCE2} +mv sof-tplg-v%{sof_ver_addon}/*.tplg firmware/intel/sof-tplg +%endif + # remove NXP firmware files rm LICENCE.NXP rm -rf firmware/intel/sof-tplg/sof-imx8* +# remove Mediatek firmware files +rm -rf firmware/intel/sof-tplg/sof-mt8* + +# use xz compression +find -P firmware/intel/sof -type f -name "*.ri" -exec xz -z %{_xz_opts} {} \; +for f in $(find -P firmware/intel/sof -type l -name "*.ri"); do \ + l=$(readlink "${f}"); \ + d=$(dirname "${f}"); \ + b=$(basename "${f}"); \ + rm "${f}"; \ + pushd "${d}"; \ + ln -svf "${l}.xz" "${b}.xz"; \ + popd; \ +done +find -P firmware/intel/sof-tplg -type f -name "*.tplg" -exec xz -z %{_xz_opts} {} \; + %build # SST topology files (not SOF related, but it's a Intel hw support # and this package seems a good place to distribute them alsatplg -c /usr/share/alsa/topology/hda-dsp/skl_hda_dsp_generic-tplg.conf \ -o firmware/skl_hda_dsp_generic-tplg.bin +# use xz compression +xz -z %{_xz_opts} firmware/*.bin +chmod 0644 firmware/*.bin.xz %install mkdir -p %{buildroot}%{_firmwarepath} @@ -64,7 +95,7 @@ cp -ra firmware/* %{buildroot}%{_firmwarepath} # gather files and directories FILEDIR=$(pwd) pushd %{buildroot}/%{_firmwarepath} -find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files +find -P . -name "*.ri.xz" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files #find -P . -name "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-files find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs @@ -80,11 +111,11 @@ cat alsa-sof-firmware.files %dir %{_firmwarepath} # Licence: 3-clause BSD -%{_firmwarepath}/*.bin +%{_firmwarepath}/*.bin.xz # Licence: 3-clause BSD # .. for files with suffix .tplg -%{_firmwarepath}/intel/sof-tplg +%{_firmwarepath}/intel/sof-tplg/*.tplg.xz # Licence: SOF (3-clause BSD plus others) # .. for files with suffix .ri @@ -99,6 +130,25 @@ if st and st.type == "link" then end %changelog +* Fri Jun 17 2022 Jaroslav Kysela - 2.1.1-1 +- Update to v2.1.1 + v2.1.1a (topology) + +* Fri Feb 4 2022 Jaroslav Kysela - 2.0-2 +- Use CRC32 for the xz compression + +* Thu Jan 27 2022 Jaroslav Kysela - 2.0-1 +- Update to v2.0 +- Use xz compression + +* Wed Dec 15 2021 Jaroslav Kysela - 1.9.3-1 +- Update to v1.9.3 + +* Tue Nov 23 2021 Jaroslav Kysela - 1.9.2-1 +- Update to v1.9.2 + +* Tue Oct 5 2021 Jaroslav Kysela - 1.9-1 +- Update to v1.9 + * Wed Jul 21 2021 Fedora Release Engineering - 1.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index f1352f3..c765245 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (sof-bin-v1.8.tar.gz) = b103828769de5a267889466608adac20aad4790be8da9680498d3b8f8d0c407b9813d13d5ed12db7238a409064a7fe345b73927c566239c27b98e1c7bea3cd99 +SHA512 (sof-bin-v2.1.1.tar.gz) = 77e9562f67014d78b213fe428edef6a08dcc058a9a762da09a486c002c3aa0b907ea7c8ba6d4f88f5ddab5e564de06df9f2ed77206341a0fe2e1aaab1d9740ce +SHA512 (sof-tplg-v2.1.1a.tar.gz) = 48f8aa8023313d44ddce6c5a2c9f9e9acdd3320b52e2718eaf949d030e79e8ea547e101374f59fd7492e763983af030a5ecfa3725c48e72cddfdefecb9421ece