[meta-intel] [PATCH 02/12] intel-microcode: allow filtering of microcodes

nitin.a.kamble at intel.com nitin.a.kamble at intel.com
Thu Oct 2 11:27:01 PDT 2014


From: Nitin A Kamble <nitin.a.kamble at intel.com>

By default all the microcodes available in the microcode data file are
bundled in the target image. Provide an easier way to filter the microcodes
of interest for BSPs from the recipe space.

 The new variable, UCODE_FILTER_SIGNATURES is introduced, which can be
redefined containing parameters of the iucode_tool to filter the microcodes
of interest for the BSP under consideration. The information on the
iucode-tool parameters are available here: http://manned.org/iucode-tool .

The filtering makes the generated microcode files very machine specific,
hence making the recipe machine specific.

Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
 .../recipes-core/microcode/intel-microcode_20140624.bb | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/common/recipes-core/microcode/intel-microcode_20140624.bb b/common/recipes-core/microcode/intel-microcode_20140624.bb
index b01d8a5..571b1a2 100644
--- a/common/recipes-core/microcode/intel-microcode_20140624.bb
+++ b/common/recipes-core/microcode/intel-microcode_20140624.bb
@@ -20,14 +20,26 @@ SRC_URI[sha256sum] = "b4662ac780438a7b2d87e6d26a7066feb807f37c6e5b6fa147089f4edb
 DEPENDS = "iucode-tool-native"
 S = "${WORKDIR}"
 
-inherit allarch
+PACKAGE_ARCH = "${MACHINE_ARCH}"
 inherit deploy
 
+# Use any of the iucode_tool parameters to filter specific microcodes from the data file
+# For further information, check the iucode-tool's manpage : http://manned.org/iucode-tool
+UCODE_FILTER_SIGNATURES ?= ""
+
 do_compile() {
 	mkdir -p ${WORKDIR}/ucode/kernel/x86/microcode
-	${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool --overwrite --write-to=${WORKDIR}/microcode_${PV}.bin ${WORKDIR}/microcode.dat
+	${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \
+		${UCODE_FILTER_SIGNATURES} \
+		--overwrite \
+		--write-to=${WORKDIR}/microcode_${PV}.bin \
+		${WORKDIR}/microcode.dat
 
-	${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool --overwrite --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio ${WORKDIR}/microcode.dat
+	${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \
+		${UCODE_FILTER_SIGNATURES} \
+		--overwrite \
+		--write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \
+		${WORKDIR}/microcode.dat
 }
 
 do_install() {
-- 
1.8.1.4



More information about the meta-intel mailing list