Skip to content

Commit

Permalink
Merge pull request #3340 from foersleo/microcode_update_2023-08-11
Browse files Browse the repository at this point in the history
microcode: Update amd and intel ucode and remove indirection
  • Loading branch information
foersleo authored Aug 29, 2023
2 parents e318340 + f791708 commit 013a6c8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
10 changes: 5 additions & 5 deletions packages/microcode/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ build = "../build.rs"
[lib]
path = "../packages.rs"

# Use latest-srpm-urls.sh to get these.
# Check the two upstream repositories for the latest releases

[[package.metadata.build-package.external-files]]
url = "https://cdn.amazonlinux.com/blobstore/6d7f707779f6aff41c89bad00f7abe69dc70919cee29a8d3e5060f8070efe71d/linux-firmware-20200421-79.git78c0348.amzn2.src.rpm"
sha512 = "d5a62eca6ddd7ff322574f17359681d03a733acc51c334127f291af5d5e39fcdf821c073ddcd977b2ca088cd95d35dc31db2001ca4c312a62dcbd4ea935434fd"
url = "https://www.kernel.org/pub/linux/kernel/firmware/linux-firmware-20230804.tar.xz"
sha512 = "b7fdffd49530223394a0896608a746395cbe9d1a3ca7e4e744bc8381e937845e085f08e2b56854a233426164072f4c365b281db2f0dbb47192a97a94ada8fae6"

[[package.metadata.build-package.external-files]]
url = "https://cdn.amazonlinux.com/blobstore/76e8f9f15ec2b27c70aff3ca15a28df51790b25c73fc8dc1bf1f28a9069b15e8/microcode_ctl-2.1-47.amzn2.0.9.src.rpm"
sha512 = "e1347139d1edbd52d2619d970ba0f03500ba7367d071bb30ab3d209e44b3ff63000fcaa681f7352c79f7d5d2f0753130161b42b0eab7aab97b5b4fc4bfaa1b3b"
url = "https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/refs/tags/microcode-20230808.tar.gz"
sha512 = "8316eb9d35b315e630c6c9fab1ba601b91e72cc42926ef14e7c2b77e7025d276ae06c143060f44cd1a873d3879c067d11ad82e1886c796e6be6bf466243ad85b"
2 changes: 0 additions & 2 deletions packages/microcode/latest-srpm-urls.sh

This file was deleted.

16 changes: 7 additions & 9 deletions packages/microcode/microcode.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# These are specific to the upstream source RPM, and will likely need to be
# updated for each new version.
%global amd_ucode_archive linux-firmware-20200421.tar.gz
%global intel_ucode_archive microcode-20210608-1-amzn.tgz
%global amd_ucode_version 20230804
%global intel_ucode_version 20230808

Name: %{_cross_os}microcode
Version: 0.0
Expand All @@ -18,9 +18,8 @@ License: LicenseRef-scancode-amd-linux-firmware-export AND LicenseRef-scancode-i
# the subpackage definitions.
URL: https://github.com/bottlerocket-os/bottlerocket/tree/develop/packages/microcode

# We use Amazon Linux 2 as our upstream for microcode updates.
Source0: https://cdn.amazonlinux.com/blobstore/6d7f707779f6aff41c89bad00f7abe69dc70919cee29a8d3e5060f8070efe71d/linux-firmware-20200421-79.git78c0348.amzn2.src.rpm
Source1: https://cdn.amazonlinux.com/blobstore/76e8f9f15ec2b27c70aff3ca15a28df51790b25c73fc8dc1bf1f28a9069b15e8/microcode_ctl-2.1-47.amzn2.0.9.src.rpm
Source0: https://www.kernel.org/pub/linux/kernel/firmware/linux-firmware-%{amd_ucode_version}.tar.xz
Source1: https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/refs/tags/microcode-%{intel_ucode_version}.tar.gz

# Lets us install "microcode" to pull in the AMD and Intel updates.
Requires: %{_cross_os}microcode-amd
Expand Down Expand Up @@ -75,11 +74,9 @@ Requires: %{_cross_os}microcode-intel-license
%{summary}.

%prep
rpm2cpio %{SOURCE0} | cpio -iu %{amd_ucode_archive}
rpm2cpio %{SOURCE1} | cpio -iu %{intel_ucode_archive}
mkdir amd intel
tar -C amd -xof %{amd_ucode_archive}
tar -C intel -xof %{intel_ucode_archive}
tar -C amd --strip-components=1 -xof %{SOURCE0}
tar -C intel --strip-components=1 -xof %{SOURCE1}
cp {amd/,}LICENSE.amd-ucode
cp intel/intel-ucode-with-caveats/* intel/intel-ucode
cp intel/license LICENSE.intel-ucode
Expand Down Expand Up @@ -110,6 +107,7 @@ install -p -m 0644 intel/intel-ucode/* %{buildroot}%{_cross_libdir}/firmware/int
%dir %{_cross_libdir}/firmware
%dir %{_cross_libdir}/firmware/intel-ucode
%{_cross_libdir}/firmware/intel-ucode/??-??-??
%exclude %{_cross_libdir}/firmware/intel-ucode/??-??-??_DUPLICATE

%files intel-license
%license LICENSE.intel-ucode LicenseRef-scancode-intel-mcu-2018
Expand Down

0 comments on commit 013a6c8

Please sign in to comment.