From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/
Date: Fri, 17 May 2024 12:07:30 +0000 (UTC) [thread overview]
Message-ID: <1715947604.f93d0ab96634750c940e9068324795b5efca20cc.andrewammerlaan@gentoo> (raw)
commit: f93d0ab96634750c940e9068324795b5efca20cc
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
AuthorDate: Wed May 8 06:38:14 2024 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Fri May 17 12:06:44 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f93d0ab9
sys-firmware/intel-microcode: add USE=dist-kernel
The /boot/intel-uc.img is useless when we use a dist-kernel since dracut is
responsible for generating the initramfs, and it (by default) includes the
microcode.
Instead add USE=dist-kernel and enable USE=initramfs by default. The
initramfs flag toggles the early_microcode setting of dracut, and if both flags
are enabled we trigger initramfs re-installation. This ensures that when we
update this package, we also get the latest microcode in our dist-kernel
initramfs or UKI.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
.../intel-microcode-20240312_p20240312.ebuild | 38 ++++++++++++++++++----
.../intel-microcode-20240514_p20240514.ebuild | 38 ++++++++++++++++++----
2 files changed, 62 insertions(+), 14 deletions(-)
diff --git a/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild b/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
index 5992eadefd5f..957da662f92e 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20240312_p20240312.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit linux-info mount-boot
+inherit dist-kernel-utils linux-info mount-boot
# Find updates by searching and clicking the first link (hopefully it's the one):
# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
@@ -44,13 +44,21 @@ S="${WORKDIR}"
LICENSE="intel-ucode"
SLOT="0"
KEYWORDS="-* amd64 x86"
-IUSE="hostonly initramfs +split-ucode vanilla"
-REQUIRED_USE="|| ( initramfs split-ucode )"
+IUSE="dist-kernel hostonly +initramfs +split-ucode vanilla"
+REQUIRED_USE="!dist-kernel? ( || ( initramfs split-ucode ) )"
RESTRICT="binchecks strip"
BDEPEND=">=sys-apps/iucode_tool-2.3"
# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
-RDEPEND="hostonly? ( sys-apps/iucode_tool )"
+RDEPEND="
+ dist-kernel? ( virtual/dist-kernel )
+ hostonly? ( sys-apps/iucode_tool )
+"
+IDEPEND="
+ dist-kernel? (
+ initramfs? ( sys-kernel/installkernel )
+ )
+"
# Blacklist bad microcode here.
# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
@@ -138,9 +146,18 @@ src_install() {
--list
)
+ # Instruct Dracut on whether or not we want the microcode in initramfs
+ # Use here 15 instead of 10, intel-microcode overwrites linux-firmware
+ (
+ insinto /usr/lib/dracut/dracut.conf.d
+ newins - 15-${PN}.conf <<<"early_microcode=$(usex initramfs)"
+ )
+
# The earlyfw cpio needs to be in /boot because it must be loaded before
# rootfs is mounted.
- use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" )
+ if ! use dist-kernel && use initramfs; then
+ dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" )
+ fi
keepdir /lib/firmware/intel-ucode
opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
@@ -194,7 +211,9 @@ pkg_preinst() {
# The earlyfw cpio needs to be in /boot because it must be loaded before
# rootfs is mounted.
- use initramfs && opts+=( --write-earlyfw=${_initramfs_file} )
+ if ! use dist-kernel && use initramfs; then
+ opts+=( --write-earlyfw=${_initramfs_file} )
+ fi
if use split-ucode; then
opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
@@ -265,7 +284,12 @@ pkg_postrm() {
pkg_postinst() {
# Don't forget to umount /boot if it was previously mounted by us.
- use initramfs && mount-boot_pkg_postinst
+ if use initramfs; then
+ if [[ -z ${ROOT} ]] && use dist-kernel; then
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+ fi
+ mount-boot_pkg_postinst
+ fi
# We cannot give detailed information if user is affected or not:
# If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
diff --git a/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild b/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild
index 418ab5cc22e2..c33321a94497 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20240514_p20240514.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit linux-info mount-boot
+inherit dist-kernel-utils linux-info mount-boot
# Find updates by searching and clicking the first link (hopefully it's the one):
# https://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
@@ -44,13 +44,21 @@ S="${WORKDIR}"
LICENSE="intel-ucode"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
-IUSE="hostonly initramfs +split-ucode vanilla"
-REQUIRED_USE="|| ( initramfs split-ucode )"
+IUSE="dist-kernel hostonly +initramfs +split-ucode vanilla"
+REQUIRED_USE="!dist-kernel? ( || ( initramfs split-ucode ) )"
RESTRICT="binchecks strip"
BDEPEND=">=sys-apps/iucode_tool-2.3"
# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
-RDEPEND="hostonly? ( sys-apps/iucode_tool )"
+RDEPEND="
+ dist-kernel? ( virtual/dist-kernel )
+ hostonly? ( sys-apps/iucode_tool )
+"
+IDEPEND="
+ dist-kernel? (
+ initramfs? ( sys-kernel/installkernel )
+ )
+"
# Blacklist bad microcode here.
# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
@@ -138,9 +146,18 @@ src_install() {
--list
)
+ # Instruct Dracut on whether or not we want the microcode in initramfs
+ # Use here 15 instead of 10, intel-microcode overwrites linux-firmware
+ (
+ insinto /usr/lib/dracut/dracut.conf.d
+ newins - 15-${PN}.conf <<<"early_microcode=$(usex initramfs)"
+ )
+
# The earlyfw cpio needs to be in /boot because it must be loaded before
# rootfs is mounted.
- use initramfs && dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" )
+ if ! use dist-kernel && use initramfs; then
+ dodir /boot && opts+=( --write-earlyfw="${ED}/boot/intel-uc.img" )
+ fi
keepdir /lib/firmware/intel-ucode
opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
@@ -194,7 +211,9 @@ pkg_preinst() {
# The earlyfw cpio needs to be in /boot because it must be loaded before
# rootfs is mounted.
- use initramfs && opts+=( --write-earlyfw=${_initramfs_file} )
+ if ! use dist-kernel && use initramfs; then
+ opts+=( --write-earlyfw=${_initramfs_file} )
+ fi
if use split-ucode; then
opts+=( --write-firmware="${ED}/lib/firmware/intel-ucode" )
@@ -265,7 +284,12 @@ pkg_postrm() {
pkg_postinst() {
# Don't forget to umount /boot if it was previously mounted by us.
- use initramfs && mount-boot_pkg_postinst
+ if use initramfs; then
+ if [[ -z ${ROOT} ]] && use dist-kernel; then
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+ fi
+ mount-boot_pkg_postinst
+ fi
# We cannot give detailed information if user is affected or not:
# If MICROCODE_BLACKLIST wasn't modified, user can still use MICROCODE_SIGNATURES
next reply other threads:[~2024-05-17 12:07 UTC|newest]
Thread overview: 181+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 12:07 Andrew Ammerlaan [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-03 17:47 [gentoo-commits] repo/gentoo:master commit in: sys-firmware/intel-microcode/ Nowa Ammerlaan
2025-02-15 14:20 Mike Pagano
2025-02-11 18:37 Mike Pagano
2025-02-11 18:37 Mike Pagano
2025-01-06 20:25 Nowa Ammerlaan
2024-11-26 15:09 Mike Pagano
2024-11-26 15:09 Mike Pagano
2024-11-14 20:41 Mike Pagano
2024-11-13 12:48 Mike Pagano
2024-10-20 18:10 Mike Pagano
2024-10-03 21:18 Mike Pagano
2024-09-15 16:26 Mike Pagano
2024-09-07 18:31 Mike Pagano
2024-09-07 18:31 Mike Pagano
2024-08-15 22:21 Mike Pagano
2024-06-29 8:39 Andrew Ammerlaan
2024-06-26 18:58 Arthur Zamarin
2024-06-26 17:53 Arthur Zamarin
2024-06-01 2:55 Sam James
2024-06-01 2:11 Sam James
2024-06-01 1:00 Sam James
2024-05-15 12:49 Sam James
2024-05-15 12:49 Sam James
2024-05-04 9:48 Arthur Zamarin
2024-05-04 7:20 Arthur Zamarin
2024-03-12 20:25 Mike Pagano
2023-11-17 15:09 Sam James
2023-11-17 13:54 Mike Pagano
2023-11-14 23:41 Mike Pagano
2023-11-12 12:20 Sam James
2023-11-12 8:20 Arthur Zamarin
2023-10-11 16:40 Mike Pagano
2023-08-09 3:20 Sam James
2023-08-08 18:46 Sam James
2023-07-24 4:15 Sam James
2023-06-15 23:44 Sam James
2023-06-15 16:55 Sam James
2023-06-10 13:35 Sam James
2023-06-10 13:35 Sam James
2023-05-12 23:14 Mike Pagano
2023-03-22 5:27 Sam James
2023-03-22 5:27 Sam James
2023-02-15 9:30 Sam James
2023-02-15 1:39 Sam James
2022-12-16 6:28 Sam James
2022-11-09 7:55 Sam James
2022-11-09 3:20 Sam James
2022-08-19 3:38 Sam James
2022-08-10 17:08 Mike Pagano
2022-08-10 17:08 Mike Pagano
2022-08-10 17:07 Mike Pagano
2022-08-10 17:07 Mike Pagano
2022-08-10 17:05 Mike Pagano
2022-08-10 16:24 Mike Pagano
2022-08-10 16:23 Mike Pagano
2022-08-09 22:01 Mike Pagano
2022-08-09 20:43 Mike Pagano
2022-05-10 20:24 Mike Pagano
2022-05-02 20:46 Mike Pagano
2022-03-16 6:33 Ulrich Müller
2022-03-15 20:19 Sam James
2022-02-10 2:02 Thomas Deutschmann
2021-08-30 16:03 Thomas Deutschmann
2021-06-08 22:23 Thomas Deutschmann
2021-05-14 14:58 Thomas Deutschmann
2021-02-21 3:16 Thomas Deutschmann
2020-11-18 23:35 Thomas Deutschmann
2020-11-18 23:35 Thomas Deutschmann
2020-11-15 23:50 Thomas Deutschmann
2020-11-11 1:17 Thomas Deutschmann
2020-09-20 23:41 Thomas Deutschmann
2020-06-29 11:20 Thomas Deutschmann
2020-06-17 16:12 Thomas Deutschmann
2020-06-17 16:12 Thomas Deutschmann
2020-06-14 22:12 Thomas Deutschmann
2020-06-14 22:12 Thomas Deutschmann
2020-06-10 0:59 Thomas Deutschmann
2020-06-10 0:59 Thomas Deutschmann
2020-06-01 22:11 Thomas Deutschmann
2020-06-01 22:11 Thomas Deutschmann
2020-05-08 23:05 Thomas Deutschmann
2020-05-08 23:05 Thomas Deutschmann
2020-04-28 22:26 Thomas Deutschmann
2020-04-28 22:26 Thomas Deutschmann
2020-02-09 14:07 Thomas Deutschmann
2020-02-09 14:07 Thomas Deutschmann
2019-11-15 22:58 Thomas Deutschmann
2019-11-12 21:31 Thomas Deutschmann
2019-11-10 18:48 Thomas Deutschmann
2019-11-10 18:48 Thomas Deutschmann
2019-09-19 18:33 Thomas Deutschmann
2019-09-08 13:34 Thomas Deutschmann
2019-09-08 13:17 Thomas Deutschmann
2019-08-19 21:16 Thomas Deutschmann
2019-08-19 21:16 Thomas Deutschmann
2019-07-22 16:34 Thomas Deutschmann
2019-06-24 21:57 Thomas Deutschmann
2019-06-24 21:57 Thomas Deutschmann
2019-06-10 20:06 Thomas Deutschmann
2019-06-10 20:06 Thomas Deutschmann
2019-05-26 10:09 Thomas Deutschmann
2019-05-26 10:09 Thomas Deutschmann
2019-05-14 18:24 Thomas Deutschmann
2019-05-13 1:57 Thomas Deutschmann
2019-05-13 1:57 Thomas Deutschmann
2019-04-24 22:27 Thomas Deutschmann
2019-04-24 22:27 Thomas Deutschmann
2019-03-13 22:39 Thomas Deutschmann
2019-03-13 22:39 Thomas Deutschmann
2019-02-04 10:58 Thomas Deutschmann
2019-02-04 10:58 Thomas Deutschmann
2019-01-14 2:39 Thomas Deutschmann
2019-01-14 2:39 Thomas Deutschmann
2018-12-16 23:19 Thomas Deutschmann
2018-11-17 23:56 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-10-29 14:54 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-24 14:31 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-16 11:29 Thomas Deutschmann
2018-09-09 11:36 Mikle Kolyada
2018-08-24 19:40 Thomas Deutschmann
2018-08-24 19:40 Thomas Deutschmann
2018-08-23 17:17 Matt Thode
2018-08-08 23:46 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-08 19:00 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-08-04 23:03 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-29 22:54 Thomas Deutschmann
2018-07-24 12:31 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-22 16:25 Thomas Deutschmann
2018-07-08 21:51 Thomas Deutschmann
2018-07-08 21:51 Thomas Deutschmann
2018-07-06 1:04 Thomas Deutschmann
2018-06-23 11:46 Thomas Deutschmann
2018-06-19 13:46 Thomas Deutschmann
2018-06-07 0:02 Thomas Deutschmann
2018-06-02 10:26 Thomas Deutschmann
2018-05-30 22:41 Thomas Deutschmann
2018-05-30 12:57 Thomas Deutschmann
2018-05-29 23:18 Thomas Deutschmann
2018-05-29 23:15 Thomas Deutschmann
2018-05-24 12:30 Thomas Deutschmann
2018-05-23 18:24 Thomas Deutschmann
2018-04-13 23:22 Aaron Bauman
2018-03-15 14:13 Thomas Deutschmann
2018-03-14 11:02 Thomas Deutschmann
2018-02-07 3:26 Thomas Deutschmann
2018-02-07 3:26 Thomas Deutschmann
2018-01-12 19:27 Thomas Deutschmann
2018-01-12 18:53 Mike Gilbert
2018-01-10 22:14 Robin H. Johnson
2018-01-10 0:46 Thomas Deutschmann
2018-01-10 0:46 Thomas Deutschmann
2018-01-07 21:41 Agostino Sarubbo
2018-01-07 21:41 Agostino Sarubbo
2018-01-07 20:48 Thomas Deutschmann
2018-01-06 17:53 Agostino Sarubbo
2018-01-04 16:25 Thomas Deutschmann
2017-11-21 20:08 Thomas Deutschmann
2017-07-14 7:13 Matt Turner
2017-07-04 15:49 Agostino Sarubbo
2017-07-04 10:17 Agostino Sarubbo
2017-06-05 21:23 Robin H. Johnson
2016-12-21 11:23 Thomas Deutschmann
2016-12-20 12:50 Tobias Klausmann
2016-11-24 20:17 Markos Chandras
2016-09-27 13:44 Tony Vroon
2016-06-24 20:12 Doug Goldstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1715947604.f93d0ab96634750c940e9068324795b5efca20cc.andrewammerlaan@gentoo \
--to=andrewammerlaan@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox