From 3f8ddc231095c81819990d32c9d0a03a2c6739e7 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 06:18:44 +0100 Subject: [PATCH] add amd-ucode subpackage with ADM CPUs update microcode image [release 20220509-2mamba;Sun Jun 05 2022] --- linux-firmware.spec | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/linux-firmware.spec b/linux-firmware.spec index 1f086fb..95ad5a4 100644 --- a/linux-firmware.spec +++ b/linux-firmware.spec @@ -1,6 +1,6 @@ Name: linux-firmware Version: 20220509 -Release: 1mamba +Release: 2mamba Summary: Collection of firmware files used by the Linux Kernel Group: System/Kernel and Hardware Vendor: openmamba @@ -30,17 +30,43 @@ Obsoletes: linux-firmware-extra < 20210719 %description 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 %setup -q #%patch0 -p1 %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 [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall \ FIRMWAREDIR=%{_prefix}/lib/firmware +%ifarch x86_64 %{ix86} +install -D -m0644 amd-ucode.img %{buildroot}/boot/amd-ucode.img +%endif + %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -68,7 +94,17 @@ fi %dir %{_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 +* Sun Jun 05 2022 Silvan Calarco 20220509-2mamba +- add amd-ucode subpackage with ADM CPUs update microcode image + * Tue May 10 2022 Automatic Build System 20220509-1mamba - automatic version update by autodist