From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Robin H. Johnson" <robbat2@gentoo.org>
Subject: [gentoo-dev] [PATCH v2 2/2] sys-firmware/intel-microcode: check-reqs for /boot space
Date: Sun, 25 Feb 2024 22:31:04 -0800 [thread overview]
Message-ID: <20240226063105.1767-2-robbat2@gentoo.org> (raw)
In-Reply-To: <20240219220832.25919-1-robbat2@gentoo.org>
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
.../intel-microcode-20231114_p20231114.ebuild | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/sys-firmware/intel-microcode/intel-microcode-20231114_p20231114.ebuild b/sys-firmware/intel-microcode/intel-microcode-20231114_p20231114.ebuild
index 5d1ff1e7f4be..30aca9ccbecf 100644
--- a/sys-firmware/intel-microcode/intel-microcode-20231114_p20231114.ebuild
+++ b/sys-firmware/intel-microcode/intel-microcode-20231114_p20231114.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit linux-info mount-boot
+inherit linux-info mount-boot check-reqs
# 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
@@ -52,6 +52,9 @@ BDEPEND=">=sys-apps/iucode_tool-2.3"
# !<sys-apps/microcode-ctl-1.17-r2 due to bug #268586
RDEPEND="hostonly? ( sys-apps/iucode_tool )"
+# Plus a /boot check further down that, based on USE=initramfs.
+CHECKREQS_DISK_RUNTIME=( /lib/firmware/intel-ucode/:30M )
+
# Blacklist bad microcode here.
# 0x000406f1 aka 06-4f-01 aka CPUID 406F1 require newer microcode loader
MICROCODE_BLACKLIST_DEFAULT="-s !0x000406f1"
@@ -164,7 +167,13 @@ pkg_preinst() {
fi
# Make sure /boot is available if needed.
- use initramfs && mount-boot_pkg_preinst
+ if use initramfs; then
+ mount-boot_pkg_preinst
+ CHECKREQS_DISK_RUNTIME+=( /boot:20M )
+ # check-reqs doesn't have any pkg_preinst function today.
+ check-reqs_pkg_setup || die "Not enough room in /boot to install early microcode"
+ fi
+
local _initramfs_file="${ED}/boot/intel-uc.img"
--
2.43.0
prev parent reply other threads:[~2024-02-26 6:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-19 22:08 [gentoo-dev] [PATCH] check-reqs.eclass: more disk checks Robin H. Johnson
2024-02-19 22:14 ` [gentoo-dev] " Robin H. Johnson
2024-02-20 6:16 ` Michał Górny
2024-02-20 4:38 ` [gentoo-dev] " Sam James
2024-02-20 5:53 ` Andrew Ammerlaan
2024-02-26 6:31 ` [gentoo-dev] [PATCH v2 1/2] check-reqs.eclass: runtime disk checks for any path Robin H. Johnson
2024-02-26 7:01 ` zzam
2024-02-26 9:46 ` Robin H. Johnson
2024-02-26 13:50 ` Michał Górny
2024-02-26 6:31 ` Robin H. Johnson [this message]
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=20240226063105.1767-2-robbat2@gentoo.org \
--to=robbat2@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