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

Darren Hart dvhart at linux.intel.com
Tue Oct 7 10:39:07 PDT 2014


On 10/3/14, 15:14, "nitin.a.kamble at intel.com" <nitin.a.kamble at intel.com>
wrote:

>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_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.

In general I have concerns about making more packages machine-specific as
it adds another barrier to consolidation of Intel BSPs.

However, since these can only be applied at runtime and are not
persistent, they can't be done once and kept off the production image.

Since we can't rely on firmware updates (where this arguably belongs), I
suppose this is a necessary item.

One suggestion, however, would be to use the intel common package arch, so
that machines using the common kernel, can also use the common microcode
(which would not use any filters). This way, we only have to rebuild the
package for machines that specifically care about making it small.

--
Darren


>
>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..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
>meta-intel at yoctoproject.org
>https://lists.yoctoproject.org/listinfo/meta-intel
>


-- 
Darren Hart
Intel Open Source Technology Center





More information about the meta-intel mailing list