From: Nitin A Kamble <[email protected]>

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_PARAMETERS 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 <[email protected]>
---
 .../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..16674a8 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_PARAMETERS ?= ""
+
 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_PARAMETERS} \
+               --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_PARAMETERS} \
+               --overwrite \
+               --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \
+               ${WORKDIR}/microcode.dat
 }
 
 do_install() {
-- 
1.8.1.4

-- 
_______________________________________________
meta-intel mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-intel

Reply via email to