Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

sys-kernel/coreos-{kernel,firmware}: include microcode #3010

Merged
merged 6 commits into from Jan 18, 2018

Conversation

ajeddeloh
Copy link
Contributor

Add support for building microcode into the kernel

Copy link
Contributor

@dm0- dm0- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't bump the coreos-modules revision along with the kernel.

SRC_URI="mirror://gentoo/linux-firmware-${PV}.tar.gz"
KEYWORDS="amd64 arm64"
GIT_COMMIT="2eefafb2e9dcbafdf4b83d8c43fcd6b75fd4ac78"
SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to change the tar file's name to coreos-firmware? Seems odd.

@@ -60,6 +61,11 @@ src_prepare() {
# Symlink to bootengine.cpio so we can stick with relative paths in .config
ln -sv "${ROOT}"/usr/share/bootengine/bootengine.cpio build/ || die
config_update 'CONFIG_INITRAMFS_SOURCE="bootengine.cpio"'

# include all intel and amd microcode files, avoiding the signatures
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want this happening on arm64.

KEYWORDS="amd64 arm64"
GIT_COMMIT="2eefafb2e9dcbafdf4b83d8c43fcd6b75fd4ac78"
SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz -> ${P}.tar.gz
mirror://gentoo/microcode_amd_fam17h.tar.gz
Copy link
Contributor

@dm0- dm0- Jan 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 17h microcode isn't being installed.

@@ -4,6 +4,10 @@
 ./lib/firmware/acenic/
 ./lib/firmware/acenic/tg1.bin
 ./lib/firmware/acenic/tg2.bin
+./lib/firmware/amd-ucode/
+./lib/firmware/amd-ucode/microcode_amd.bin
+./lib/firmware/amd-ucode/microcode_amd_fam15h.bin
+./lib/firmware/amd-ucode/microcode_amd_fam16h.bin
 ./lib/firmware/bnx2/
 ./lib/firmware/bnx2/bnx2-mips-06-6.2.3.fw
 ./lib/firmware/bnx2/bnx2-mips-09-6.2.1b.fw
@@ -24,11 +28,11 @@
 ./lib/firmware/cxgb3/t3c_psram-1.1.0.bin
 ./lib/firmware/cxgb3/t3fw-7.12.0.bin
 ./lib/firmware/cxgb4/
-./lib/firmware/cxgb4/t4fw-1.16.45.0.bin
+./lib/firmware/cxgb4/t4fw-1.16.63.0.bin
 ./lib/firmware/cxgb4/t4fw.bin
-./lib/firmware/cxgb4/t5fw-1.16.45.0.bin
+./lib/firmware/cxgb4/t5fw-1.16.63.0.bin
 ./lib/firmware/cxgb4/t5fw.bin
-./lib/firmware/cxgb4/t6fw-1.16.45.0.bin
+./lib/firmware/cxgb4/t6fw-1.16.63.0.bin
 ./lib/firmware/cxgb4/t6fw.bin
 ./lib/firmware/e100/
 ./lib/firmware/e100/d101m_ucode.bin

@@ -26,7 +26,8 @@ DEPEND="${RDEPEND}
sys-fs/e2fsprogs
sys-fs/mdadm
sys-fs/xfsprogs
>=sys-kernel/coreos-firmware-20160331-r1:=
sys-firmware/intel-microcode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be conditional on the architecture.

SRC_URI="mirror://gentoo/linux-firmware-${PV}.tar.gz"
KEYWORDS="amd64 arm64"
GIT_COMMIT="2eefafb2e9dcbafdf4b83d8c43fcd6b75fd4ac78"
SRC_URI="https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${GIT_COMMIT}.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still gives the source a different name than Gentoo uses. It should be linux-firmware-${PV}.tar.gz.

@ajeddeloh ajeddeloh force-pushed the ucode2 branch 2 times, most recently from 69cc837 to e12a6f7 Compare January 17, 2018 18:19
Copy link
Contributor

@dm0- dm0- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay after a rebase to 4.14.14. Needs another test build.

(For linking purposes, depends on coreos/portage-stable#634.)

Andrew Jeddeloh added 5 commits January 17, 2018 13:16
coreos-firmware currently ignores everything not needed by a module.
Update it to not ignore files in the amd-ucode directory.
Gentoo is shipping ucode not in linux-firmware for Spectre mitigation.
We should do the same. Update the ebuild to include their sources as
well.
Include microcode via the CONFIG_EXTRA_FIRMWARE option since prepending
a cpio archive to bootengine.cpio doesn't work (needs to be a seperate
initrd).
The intel-microcode ebuild is broken and attempts to use the host's copy
of iucode_tool, so add it here so it can find it
@ajeddeloh
Copy link
Contributor Author

updated to add iucode_tool in sdk-depends, rebased on top of 4.14.14 kernel

There are reports of instability with intel's new microcode. Hold off on
updating until that clears. See:
 - https://bugzilla.redhat.com/show_bug.cgi?id=1532283#c15
 - https://bugzilla.redhat.com/show_bug.cgi?id=1532216
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants