|
|
630c91 |
# This is a firmware package, so binaries (which are not run on the host)
|
|
|
630c91 |
# in the end package are expected.
|
|
|
630c91 |
%define _binaries_in_noarch_packages_terminate_build 0
|
|
|
630c91 |
%global _firmwarepath /usr/lib/firmware
|
|
|
630c91 |
|
|
|
630c91 |
|
|
|
271ef6 |
%global sof_version 1.6
|
|
|
f1fd4c |
%global sof_commit faa5bdc276651f3f8b7c77612fff770bd778987b
|
|
|
630c91 |
%global sof_shortcommit %(c=%{sof_commit}; echo ${c:0:7})
|
|
|
630c91 |
|
|
|
630c91 |
Summary: Firmware and topology files for Sound Open Firmware project
|
|
|
630c91 |
Name: alsa-sof-firmware
|
|
|
630c91 |
Version: %{sof_version}
|
|
|
f1fd4c |
Release: 2%{?dist}
|
|
|
630c91 |
# See later in the spec for a breakdown of licensing
|
|
|
630c91 |
License: BSD
|
|
|
630c91 |
URL: https://github.com/thesofproject/sof-bin
|
|
|
630c91 |
Source: https://github.com/thesofproject/sof-bin/archive/%{sof_commit}/sof-bin-%{sof_shortcommit}.tar.gz
|
|
|
630c91 |
|
|
|
630c91 |
# noarch, since the package is firmware
|
|
|
630c91 |
BuildArch: noarch
|
|
|
630c91 |
|
|
|
630c91 |
%description
|
|
|
630c91 |
This package contains the firmware binaries for the Sound Open Firmware project.
|
|
|
630c91 |
|
|
|
630c91 |
%package debug
|
|
|
630c91 |
Requires: alsa-sof-firmware
|
|
|
630c91 |
Summary: Debug files for Sound Open Firmware project
|
|
|
630c91 |
License: BSD
|
|
|
630c91 |
|
|
|
630c91 |
%description debug
|
|
|
630c91 |
This package contains the debug files for the Sound Open Firmware project.
|
|
|
630c91 |
|
|
|
630c91 |
%prep
|
|
|
630c91 |
%autosetup -n sof-bin-%{sof_commit}
|
|
|
630c91 |
|
|
|
630c91 |
cd lib/firmware
|
|
|
630c91 |
|
|
|
630c91 |
# we have the version in the package name
|
|
|
630c91 |
mv intel/sof/v%{sof_version}/* intel/sof
|
|
|
630c91 |
rmdir intel/sof/v%{sof_version}
|
|
|
630c91 |
|
|
|
630c91 |
# rename intel signed firmware files
|
|
|
f1fd4c |
for platform in apl cnl ehl icl tgl; do
|
|
|
630c91 |
mv intel/sof/intel-signed/sof-$platform-v%{sof_version}.ri intel/sof/intel-signed/sof-$platform.ri
|
|
|
630c91 |
ln -sf intel-signed/sof-$platform.ri intel/sof/sof-$platform.ri
|
|
|
630c91 |
done
|
|
|
630c91 |
|
|
|
630c91 |
# rename public signed firmware files
|
|
|
f1fd4c |
for platform in apl cnl icl jsl tgl; do
|
|
|
630c91 |
mv intel/sof/public-signed/sof-$platform-v%{sof_version}.ri intel/sof/public-signed/sof-$platform.ri
|
|
|
630c91 |
done
|
|
|
630c91 |
|
|
|
630c91 |
# rename unsigned firmware files
|
|
|
630c91 |
for platform in bdw byt cht; do
|
|
|
630c91 |
mv intel/sof/sof-$platform-v%{sof_version}.ri intel/sof/sof-$platform.ri
|
|
|
630c91 |
done
|
|
|
630c91 |
|
|
|
630c91 |
# rename debug files
|
|
|
f1fd4c |
for platform in apl bdw byt cht cnl ehl icl jsl tgl; do
|
|
|
630c91 |
mv intel/sof/sof-$platform-v%{sof_version}.ldc intel/sof/sof-$platform.ldc
|
|
|
630c91 |
done
|
|
|
630c91 |
|
|
|
f1fd4c |
# add missing symlinks
|
|
|
f1fd4c |
ln -s public-signed/sof-jsl.ri intel/sof/sof-jsl.ri
|
|
|
f1fd4c |
ln -s intel-signed/sof-apl.ri intel/sof/sof-glk.ri
|
|
|
630c91 |
ln -s intel-signed/sof-cnl.ri intel/sof/sof-cml.ri
|
|
|
630c91 |
ln -s intel-signed/sof-cnl.ri intel/sof/sof-cfl.ri
|
|
|
630c91 |
|
|
|
630c91 |
# move topology files
|
|
|
630c91 |
rm -f intel/sof-tplg
|
|
|
630c91 |
mv intel/sof-tplg-v%{sof_version} intel/sof-tplg
|
|
|
630c91 |
|
|
|
630c91 |
# remove NXP firmware files
|
|
|
271ef6 |
rm -rf nxp ../../LICENCE.NXP
|
|
|
271ef6 |
rm -rf intel/sof-tplg/sof-imx8*
|
|
|
630c91 |
|
|
|
630c91 |
%build
|
|
|
630c91 |
|
|
|
630c91 |
%install
|
|
|
630c91 |
mkdir -p %{buildroot}%{_firmwarepath}
|
|
|
630c91 |
cp -ra lib/firmware/* %{buildroot}%{_firmwarepath}
|
|
|
630c91 |
|
|
|
630c91 |
# gather files and directories
|
|
|
630c91 |
FILEDIR=$(pwd)
|
|
|
630c91 |
pushd %{buildroot}/%{_firmwarepath}
|
|
|
630c91 |
find -P . -name "*.ri" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.files
|
|
|
630c91 |
#find -P . -name "*.tplg" | sed -e '/^.$/d' >> $FILEDIR/alsa-sof-firmware.files
|
|
|
630c91 |
find -P . -name "*.ldc" | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.debug-files
|
|
|
630c91 |
find -P . -type d | sed -e '/^.$/d' > $FILEDIR/alsa-sof-firmware.dirs
|
|
|
630c91 |
popd
|
|
|
630c91 |
sed -i -e 's:^./::' alsa-sof-firmware.{files,debug-files,dirs}
|
|
|
630c91 |
sed -i -e 's!^!/usr/lib/firmware/!' alsa-sof-firmware.{files,debug-files,dirs}
|
|
|
630c91 |
sed -e 's/^/%%dir /' alsa-sof-firmware.dirs >> alsa-sof-firmware.files
|
|
|
630c91 |
cat alsa-sof-firmware.files
|
|
|
630c91 |
|
|
|
630c91 |
%files -f alsa-sof-firmware.files
|
|
|
630c91 |
%license LICENCE*
|
|
|
630c91 |
%doc README*
|
|
|
630c91 |
%dir %{_firmwarepath}
|
|
|
630c91 |
|
|
|
630c91 |
# Licence: 3-clause BSD
|
|
|
630c91 |
# .. for files with suffix .tplg
|
|
|
630c91 |
%{_firmwarepath}/intel/sof-tplg
|
|
|
630c91 |
|
|
|
630c91 |
# Licence: SOF (3-clause BSD plus others)
|
|
|
630c91 |
# .. for files with suffix .ri
|
|
|
630c91 |
|
|
|
630c91 |
%files debug -f alsa-sof-firmware.debug-files
|
|
|
630c91 |
|
|
|
630c91 |
%changelog
|
|
|
f1fd4c |
* Thu Dec 10 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-2
|
|
|
f1fd4c |
- Update to v1.6 (Dec 9)
|
|
|
f1fd4c |
|
|
|
271ef6 |
* Wed Nov 11 2020 Jaroslav Kysela <perex@perex.cz> - 1.6-1
|
|
|
271ef6 |
- Update to v1.6 (Oct 13)
|
|
|
271ef6 |
|
|
|
630c91 |
* Mon Jun 8 2020 Jaroslav Kysela <perex@perex.cz> - 1.5-2
|
|
|
630c91 |
- Update to v1.5
|
|
|
630c91 |
|
|
|
630c91 |
* Tue Apr 21 2020 Jaroslav Kysela <perex@perex.cz> - 1.4.2-2
|
|
|
630c91 |
- Initial version (Open Sound Firmware v1.4.2)
|