package/intel-microcode: make target installation optional
authorPeter Korsgaard <peter@korsgaard.com>
Mon, 20 May 2019 22:17:12 +0000 (00:17 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 24 May 2019 21:15:39 +0000 (23:15 +0200)
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
package/intel-microcode/intel-microcode.mk
package/iucode-tool/Config.in

index 3f9199ec93d9ff5d4547768bbd82b6c5d57b6e8b..4a45aa1ef3e3bd59a04f31fdfb617517fbbe0631 100644 (file)
@@ -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.
index 43cdc3d0b88f45da7d711e3d6b83e891d0c22969..dacb619a14e9e33c1a0acc69e73137b8554de8fe 100644 (file)
@@ -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))
index d81dabb196c520cda51a90b45bc5907fbc02e09f..f9f2521a428863af75216eee23ac9c6f1ff11f5f 100644 (file)
@@ -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