add amd-ucode subpackage with ADM CPUs update microcode image [release 20220509-2mamba;Sun Jun 05 2022]

This commit is contained in:
Silvan Calarco 2024-01-06 06:18:44 +01:00
parent 688ae267e5
commit 3f8ddc2310

View File

@ -1,6 +1,6 @@
Name: linux-firmware Name: linux-firmware
Version: 20220509 Version: 20220509
Release: 1mamba Release: 2mamba
Summary: Collection of firmware files used by the Linux Kernel Summary: Collection of firmware files used by the Linux Kernel
Group: System/Kernel and Hardware Group: System/Kernel and Hardware
Vendor: openmamba Vendor: openmamba
@ -30,17 +30,43 @@ Obsoletes: linux-firmware-extra < 20210719
%description %description
Collection of firmware files used by the Linux Kernel. Collection of firmware files used by the Linux Kernel.
%package -n amd-ucode
Group: System/Kernel and Hardware
Summary: Microcode update image for AMD CPUs
%description -n amd-ucode
Microcode update image for AMD CPUs.
%prep %prep
%setup -q %setup -q
#%patch0 -p1 #%patch0 -p1
%build %build
%ifarch x86_64 %{ix86}
# Create amd-ucode.img
mkdir -p kernel/x86/microcode
cat amd-ucode/microcode_amd*.bin > kernel/x86/microcode/AuthenticAMD.bin
# Reproducibility: set the timestamp on the bin file
if [[ -n ${SOURCE_DATE_EPOCH} ]]; then
touch -d @${SOURCE_DATE_EPOCH} kernel/x86/microcode/AuthenticAMD.bin
fi
# Reproducibility: strip the inode and device numbers from the cpio archive
echo kernel/x86/microcode/AuthenticAMD.bin |
bsdtar --uid 0 --gid 0 -cnf - -T - |
bsdtar --null -cf - --format=newc @- > amd-ucode.img
%endif
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall \ %makeinstall \
FIRMWAREDIR=%{_prefix}/lib/firmware FIRMWAREDIR=%{_prefix}/lib/firmware
%ifarch x86_64 %{ix86}
install -D -m0644 amd-ucode.img %{buildroot}/boot/amd-ucode.img
%endif
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -68,7 +94,17 @@ fi
%dir %{_prefix}/lib/firmware %dir %{_prefix}/lib/firmware
%{_prefix}/lib/firmware/* %{_prefix}/lib/firmware/*
%ifarch x86_64 %{ix86}
%files -n amd-ucode
%defattr(-,root,root)
/boot/amd-ucode.img
%doc LICENSE.amd-ucode
%endif
%changelog %changelog
* Sun Jun 05 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 20220509-2mamba
- add amd-ucode subpackage with ADM CPUs update microcode image
* Tue May 10 2022 Automatic Build System <autodist@mambasoft.it> 20220509-1mamba * Tue May 10 2022 Automatic Build System <autodist@mambasoft.it> 20220509-1mamba
- automatic version update by autodist - automatic version update by autodist