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