[meta-intel] [PATCH 07/10] intel-earlyload-microcode-image.bb: new recipe for ealryload microcode image

nitin.a.kamble at intel.com nitin.a.kamble at intel.com
Fri Jun 20 11:52:17 PDT 2014


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

Using the intel-microcode-earlyload package, create a cpio image
which will be bundled with initrd, to support early boot time micricode
loading support.

All the extra rootfs files and functions are stripped to get only the
microcode files in the resulting cpio image file.

Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
---
 .../images/intel-earlyload-microcode-image.bb      | 43 ++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 common/recipes-core/images/intel-earlyload-microcode-image.bb

diff --git a/common/recipes-core/images/intel-earlyload-microcode-image.bb b/common/recipes-core/images/intel-earlyload-microcode-image.bb
new file mode 100644
index 0000000..f404927
--- /dev/null
+++ b/common/recipes-core/images/intel-earlyload-microcode-image.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "A small cpio image containing microcode for intel processors.\
+ This cpio image get concatenated with initrd, which is used by Linux kernel\
+ earlyload microcode driver."
+
+PACKAGE_INSTALL = " intel-microcode-earlyload"
+DEPENDS = " intel-microcode"
+
+LICENSE = "MIT"
+
+export IMAGE_BASENAME = "earlyload_microcode"
+
+IMAGE_FSTYPES = "cpio"
+inherit core-image
+
+# Keep the image size equal to the size of it's contents
+IMAGE_ROOTFS_SIZE = "0"
+IMAGE_OVERHEAD_FACTOR = "1.0"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
+
+#
+# Do not pollute the microcode cpio image with unwanted rootfs files
+#
+IMAGE_FEATURES = ""
+IMAGE_LINGUAS = ""
+# Avoid mklibs_optimize and prelink tasks
+IMAGE_PREPROCESS_COMMAND = ""
+# Avoid tasks like split_and_strip_files
+PACKAGEBUILDPKGD = ""
+# Avoid tasks like ssh_allow_empty_password
+ROOTFS_POSTPROCESS_COMMAND = "remove_unwanted_files; "
+# Avoid tasks like rootfs_runtime_mapping
+do_rootfs[prefuncs] = ""
+# Avoid _run_ldconfig()
+LDCONFIGDEPEND = ""
+# Avoid _generate_kernel_module_deps()
+STAGING_KERNEL_DIR = ""
+
+remove_unwanted_files () {
+	cd ${IMAGE_ROOTFS}
+	# Except kernel/x86/microcode/GenuineIntel.bin remove everything
+	ls -1 | grep -v kernel | xargs rm -rf
+}
+
-- 
1.8.1.4



More information about the meta-intel mailing list