From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] package/intel-microcode: install into images for early loading support
Date: Tue, 21 May 2019 00:17:10 +0200 [thread overview]
Message-ID: <20190520221712.22564-1-peter@korsgaard.com> (raw)
Microcode based security mitigation (E.G. MDS) requires that the microcode
gets loaded very early. This can be handled by one of:
- Concatenating (a subset of) the intel-microcode files and write to
kernel/x86/microcode/GenuineIntel.bin in the initrd. Requires that the
(first) initrd is external from the kernel and NOT compressed.
- Build (a subset of) the intel-microcode files into the kernel using the
CONFIG_EXTRA_FIRMWARE option.
Install the microcode files into images to support these use cases (E.G.
through a post-build script for the initrd, or by pointing
CONFIG_EXTRA_FIRMWARE_DIR to ${BR_BINARIES_DIR}, similar to how we include
the .cpio image inside the kernel).
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/intel-microcode/intel-microcode.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk
index aa3b1f4dbb..43cdc3d0b8 100644
--- a/package/intel-microcode/intel-microcode.mk
+++ b/package/intel-microcode/intel-microcode.mk
@@ -9,6 +9,13 @@ INTEL_MICROCODE_SITE = $(call github,intel,Intel-Linux-Processor-Microcode-Data-
INTEL_MICROCODE_LICENSE = PROPRIETARY
INTEL_MICROCODE_LICENSE_FILES = license
INTEL_MICROCODE_REDISTRIBUTE = NO
+INTEL_MICROCODE_INSTALL_IMAGES = YES
+
+define INTEL_MICROCODE_INSTALL_IMAGES_CMDS
+ mkdir -p $(BINARIES_DIR)/intel-ucode
+ $(INSTALL) -m 0644 -t $(BINARIES_DIR)/intel-ucode \
+ $(@D)/intel-ucode/*
+endef
define INTEL_MICROCODE_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/lib/firmware/intel-ucode
--
2.11.0
next reply other threads:[~2019-05-20 22:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 22:17 Peter Korsgaard [this message]
2019-05-20 22:17 ` [Buildroot] [PATCH 2/3] linux: build after intel-microcode if enabled for early loading support Peter Korsgaard
2019-05-24 21:16 ` Peter Korsgaard
2019-06-06 15:03 ` Peter Korsgaard
2019-05-20 22:17 ` [Buildroot] [PATCH 3/3] package/intel-microcode: make target installation optional Peter Korsgaard
2019-05-24 21:16 ` Peter Korsgaard
2019-06-06 15:03 ` Peter Korsgaard
2019-05-24 21:16 ` [Buildroot] [PATCH 1/3] package/intel-microcode: install into images for early loading support Peter Korsgaard
2019-06-06 15:03 ` Peter Korsgaard
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=20190520221712.22564-1-peter@korsgaard.com \
--to=peter@korsgaard.com \
--cc=buildroot@busybox.net \
/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