diff options
Diffstat (limited to 'recipes-core/microcode')
3 files changed, 128 insertions, 0 deletions
diff --git a/recipes-core/microcode/intel-microcode_20170707.bb b/recipes-core/microcode/intel-microcode_20170707.bb new file mode 100644 index 00000000..2244088b --- /dev/null +++ b/recipes-core/microcode/intel-microcode_20170707.bb @@ -0,0 +1,66 @@ +SUMMARY = "Intel Processor Microcode Datafile for Linux" +HOMEPAGE = "http://www.intel.com/" +DESCRIPTION = "The microcode data file contains the latest microcode\ + definitions for all Intel processors. Intel releases microcode updates\ + to correct processor behavior as documented in the respective processor\ + specification updates. While the regular approach to getting this microcode\ + update is via a BIOS upgrade, Intel realizes that this can be an\ + administrative hassle. The Linux operating system and VMware ESX\ + products have a mechanism to update the microcode after booting.\ + For example, this file will be used by the operating system mechanism\ + if the file is placed in the /etc/firmware directory of the Linux system." + +LICENSE = "Intel-Microcode-License" +LIC_FILES_CHKSUM = "file://microcode.dat;md5=e5b1dc41901d2de706d4bccee94bbadc" + +SRC_URI = "https://downloadmirror.intel.com/26925/eng/microcode-${PV}.tgz" +SRC_URI[md5sum] = "fe4bcb12e4600629a81fb65208c34248" +SRC_URI[sha256sum] = "4fd44769bf52a7ac11e90651a307aa6e56ca6e1a814e50d750ba8207973bee93" + +DEPENDS = "iucode-tool-native" +S = "${WORKDIR}" + +COMPATIBLE_HOST = "(i.86|x86_64).*-linux" +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 \ + ${UCODE_FILTER_PARAMETERS} \ + --overwrite \ + --write-to=${WORKDIR}/microcode_${PV}.bin \ + ${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() { + install -d ${D}${base_libdir}/firmware/intel-ucode/ + install ${WORKDIR}/microcode_${PV}.bin ${D}${base_libdir}/firmware/intel-ucode/ + cd ${D}${base_libdir}/firmware/intel-ucode/ + ln -sf microcode_${PV}.bin microcode.bin +} + +do_deploy() { + install -d ${DEPLOYDIR} + install ${S}/microcode_${PV}.cpio ${DEPLOYDIR}/ + cd ${DEPLOYDIR} + rm -f microcode.cpio + ln -sf microcode_${PV}.cpio microcode.cpio +} + +addtask deploy before do_build after do_compile + +PACKAGES = "${PN}" + +FILES_${PN} = "${base_libdir}" diff --git a/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch b/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch new file mode 100644 index 00000000..ca97d2ab --- /dev/null +++ b/recipes-core/microcode/iucode-tool/0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch @@ -0,0 +1,29 @@ +From 5f6826b3a59dedf508d5a6122362d69a4813e8e6 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Fri, 3 Feb 2017 16:08:51 -0800 +Subject: [PATCH] Makefile.am: Add arg-parse library for MUSL support + +iucode-tool needs argp-standalone when used with MUSL, so add this +patch to the Makefile to link with argp + +Upstream-Status: Pending +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.am b/Makefile.am +index 415a241..764fb61 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -5,6 +5,7 @@ + sbin_PROGRAMS = iucode_tool + man_MANS = iucode_tool.8 + ++iucode_tool_LDADD = -largp + iucode_tool_SOURCES = intel_microcode.h intel_microcode.c iucode_tool.c + EXTRA_DIST = autogen.sh CONTRIBUTING + +-- +2.7.4 + diff --git a/recipes-core/microcode/iucode-tool_2.1.2.bb b/recipes-core/microcode/iucode-tool_2.1.2.bb new file mode 100644 index 00000000..e1fb56f4 --- /dev/null +++ b/recipes-core/microcode/iucode-tool_2.1.2.bb @@ -0,0 +1,33 @@ +SUMMARY = "Update Intel CPU microcode" + +DESCRIPTION = "iucode_tool is a program to manipulate Intel i686 and X86-64\ + processor microcode update collections, and to use the kernel facilities to\ + update the microcode on Intel system processors. It can load microcode data\ + files in text and binary format, sort, list and filter the microcode updates\ + contained in these files, write selected microcode updates to a new file in\ + binary format, or upload them to the kernel. \ + It operates on microcode data downloaded directly from Intel:\ + http://feeds.downloadcenter.intel.com/rss/?p=2371\ +" +HOMEPAGE = "https://gitlab.com/iucode-tool/" +BUGTRACKER = "https://bugs.debian.org/cgi-bin/pkgreport.cgi?ordering=normal;archive=0;src=iucode-tool;repeatmerged=0" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ + file://iucode_tool.c;beginline=1;endline=15;md5=5d8e3639c3b6a80e7d5e0e073933da16" + +DEPENDS_append_libc-musl = " argp-standalone" + +SRC_URI = "https://gitlab.com/iucode-tool/releases/raw/master/iucode-tool_${PV}.tar.xz" +SRC_URI_append_libc-musl = " file://0001-Makefile.am-Add-arg-parse-library-for-MUSL-support.patch" + +SRC_URI[md5sum] = "c6f131a0b69443f5498782a2335973fa" +SRC_URI[sha256sum] = "01f1c02ba6935e0ac8440fb594c2ef57ce4437fcbce539e3ef329f55a6fd71ab" + +inherit autotools + +BBCLASSEXTEND = "native" + +COMPATIBLE_HOST = "(i.86|x86_64).*-linux" + +UPSTREAM_CHECK_URI = "https://gitlab.com/iucode-tool/releases" |