Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/3] package/intel-microcode: make target installation optional
Date: Tue, 21 May 2019 00:17:12 +0200	[thread overview]
Message-ID: <20190520221712.22564-3-peter@korsgaard.com> (raw)
In-Reply-To: <20190520221712.22564-1-peter@korsgaard.com>

For early microcode loading, there is no need to install the individual
microcode files to /lib/firmware - So make that optional.

Let the option default to y for backwards compatibility, and select it from
iucode-tool as the init script relies on the /lib/firmware files.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/intel-microcode/Config.in          | 9 +++++++++
 package/intel-microcode/intel-microcode.mk | 4 ++++
 package/iucode-tool/Config.in              | 1 +
 3 files changed, 14 insertions(+)

diff --git a/package/intel-microcode/Config.in b/package/intel-microcode/Config.in
index 3f9199ec93..4a45aa1ef3 100644
--- a/package/intel-microcode/Config.in
+++ b/package/intel-microcode/Config.in
@@ -7,3 +7,12 @@ config BR2_PACKAGE_INTEL_MICROCODE
 	  proper kernel support are required to upload the microcode.
 
 	  https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files
+
+config BR2_PACKAGE_INTEL_MICROCODE_INSTALL_TARGET
+	bool "install microcode files to /lib/firmware in target"
+	default y
+	depends on BR2_PACKAGE_INTEL_MICROCODE
+	help
+	  Select this option to have the microcode files installed to
+	  /lib/firmware/intel-ucode in the target root filesystem, in
+	  addition to the images directory.
diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk
index 43cdc3d0b8..dacb619a14 100644
--- a/package/intel-microcode/intel-microcode.mk
+++ b/package/intel-microcode/intel-microcode.mk
@@ -17,10 +17,14 @@ define INTEL_MICROCODE_INSTALL_IMAGES_CMDS
 		$(@D)/intel-ucode/*
 endef
 
+ifeq ($(BR2_PACKAGE_INTEL_MICROCODE_INSTALL_TARGET),y)
 define INTEL_MICROCODE_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/lib/firmware/intel-ucode
 	$(INSTALL) -m 0644 -t $(TARGET_DIR)/lib/firmware/intel-ucode \
 		$(@D)/intel-ucode/*
 endef
+else
+INTEL_MICROCODE_INSTALL_TARGET = NO
+endif
 
 $(eval $(generic-package))
diff --git a/package/iucode-tool/Config.in b/package/iucode-tool/Config.in
index d81dabb196..f9f2521a42 100644
--- a/package/iucode-tool/Config.in
+++ b/package/iucode-tool/Config.in
@@ -2,6 +2,7 @@ config BR2_PACKAGE_IUCODE_TOOL
 	bool "iucode-tool"
 	depends on BR2_x86_64 || BR2_i386
 	select BR2_PACKAGE_INTEL_MICROCODE
+	select BR2_PACKAGE_INTEL_MICROCODE_INSTALL_TARGET
 	select BR2_PACKAGE_ARGP_STANDALONE \
 	       if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL
 	help
-- 
2.11.0

  parent 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 [Buildroot] [PATCH 1/3] package/intel-microcode: install into images for early loading support Peter Korsgaard
2019-05-20 22:17 ` [Buildroot] [PATCH 2/3] linux: build after intel-microcode if enabled " Peter Korsgaard
2019-05-24 21:16   ` Peter Korsgaard
2019-06-06 15:03   ` Peter Korsgaard
2019-05-20 22:17 ` Peter Korsgaard [this message]
2019-05-24 21:16   ` [Buildroot] [PATCH 3/3] package/intel-microcode: make target installation optional 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-3-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