summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2014-10-01 01:23:35 (GMT)
committerTom Zanussi <tom.zanussi@linux.intel.com>2014-10-21 20:50:37 (GMT)
commita3a380373b3f47df90f0c585ce9b071f80b216c9 (patch)
treee59d3d6654a977b70ed4bc3b7da88491b6b61a90
parent5ef9be96e7d37c5a6fd0db76b3630706ef186a41 (diff)
downloadmeta-intel-a3a380373b3f47df90f0c585ce9b071f80b216c9.tar.gz
intel-microcode: Add ability to filter microcode
The microcode data file released by Intel has microcode for many Intel processors, which by default all get installed onto the target image. In some situations it may desirable to choose microcode for only a selected processor or processors. This change provides an easier way to filter and select only the microcode of interest for BSPs from recipe space. A new variable, UCODE_FILTER_PARAMETERS, is introduced, which can be defined to contain parameters to the iucode_tool which will filter the microcode of interest for the BSP under consideration. More information on the iucode-tool parameters is available here: http://manned.org/iucode-tool. This filtering makes the generated microcode files very machine-specific, hence making the recipe machine-specific. BSPs using the common Intel kernel will not be using the filtered microcode, and will be able to share the intel-microcode packages with the common Intel package arch for the recipe. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
-rw-r--r--common/recipes-core/microcode/intel-microcode_20140624.bb18
-rw-r--r--conf/machine/include/intel-common-pkgarch.inc1
2 files changed, 16 insertions, 3 deletions
diff --git a/common/recipes-core/microcode/intel-microcode_20140624.bb b/common/recipes-core/microcode/intel-microcode_20140624.bb
index 72aca7d..ca03328 100644
--- a/common/recipes-core/microcode/intel-microcode_20140624.bb
+++ b/common/recipes-core/microcode/intel-microcode_20140624.bb
@@ -21,14 +21,26 @@ RDEPENDS_${PN} = "iucode-tool"
21DEPENDS = "iucode-tool-native" 21DEPENDS = "iucode-tool-native"
22S = "${WORKDIR}" 22S = "${WORKDIR}"
23 23
24inherit allarch 24PACKAGE_ARCH = "${MACHINE_ARCH}"
25inherit deploy 25inherit deploy
26 26
27# Use any of the iucode_tool parameters to filter specific microcodes from the data file
28# For further information, check the iucode-tool's manpage : http://manned.org/iucode-tool
29UCODE_FILTER_PARAMETERS ?= ""
30
27do_compile() { 31do_compile() {
28 mkdir -p ${WORKDIR}/ucode/kernel/x86/microcode 32 mkdir -p ${WORKDIR}/ucode/kernel/x86/microcode
29 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool --overwrite --write-to=${WORKDIR}/microcode_${PV}.bin ${WORKDIR}/microcode.dat 33 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \
34 ${UCODE_FILTER_PARAMETERS} \
35 --overwrite \
36 --write-to=${WORKDIR}/microcode_${PV}.bin \
37 ${WORKDIR}/microcode.dat
30 38
31 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool --overwrite --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio ${WORKDIR}/microcode.dat 39 ${STAGING_DIR_NATIVE}${sbindir_native}/iucode_tool \
40 ${UCODE_FILTER_PARAMETERS} \
41 --overwrite \
42 --write-earlyfw=${WORKDIR}/microcode_${PV}.cpio \
43 ${WORKDIR}/microcode.dat
32} 44}
33 45
34do_install() { 46do_install() {
diff --git a/conf/machine/include/intel-common-pkgarch.inc b/conf/machine/include/intel-common-pkgarch.inc
index cdddcc0..66aac12 100644
--- a/conf/machine/include/intel-common-pkgarch.inc
+++ b/conf/machine/include/intel-common-pkgarch.inc
@@ -2,5 +2,6 @@ INTEL_COMMON_PACKAGE_ARCH ?= "${TUNE_PKGARCH}-intel-common"
2PACKAGE_ARCH_pn-linux-yocto = "${INTEL_COMMON_PACKAGE_ARCH}" 2PACKAGE_ARCH_pn-linux-yocto = "${INTEL_COMMON_PACKAGE_ARCH}"
3PACKAGE_ARCH_pn-linux-yocto-rt = "${INTEL_COMMON_PACKAGE_ARCH}" 3PACKAGE_ARCH_pn-linux-yocto-rt = "${INTEL_COMMON_PACKAGE_ARCH}"
4PACKAGE_ARCH_pn-linux-yocto-dev = "${INTEL_COMMON_PACKAGE_ARCH}" 4PACKAGE_ARCH_pn-linux-yocto-dev = "${INTEL_COMMON_PACKAGE_ARCH}"
5PACKAGE_ARCH_pn-intel-microcode = "${INTEL_COMMON_PACKAGE_ARCH}"
5PACKAGE_EXTRA_ARCHS_append += "${INTEL_COMMON_PACKAGE_ARCH}" 6PACKAGE_EXTRA_ARCHS_append += "${INTEL_COMMON_PACKAGE_ARCH}"
6MACHINEOVERRIDES =. "${INTEL_COMMON_PACKAGE_ARCH}:" 7MACHINEOVERRIDES =. "${INTEL_COMMON_PACKAGE_ARCH}:"