<pkgmetadata>
<herd>base-system</herd>
<use>
+ <flag name='initramfs'>install a small initramfs for use with CONFIG_MICROCODE_EARLY</flag>
<flag name='monolithic'>install the large text microcode.dat (used by older kernels via microcode_ctl)</flag>
<flag name='split-ucode'>install the split binary ucode files (used by the kernel directly)</flag>
</use>
LICENSE="intel-ucode"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
-IUSE="monolithic +split-ucode"
-REQUIRED_USE="|| ( monolithic split-ucode )"
+IUSE="initramfs monolithic +split-ucode"
+REQUIRED_USE="|| ( initramfs monolithic split-ucode )"
RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586
}
src_compile() {
+ if use initramfs ; then
+ iucode_tool --write-earlyfw=microcode.cpio microcode.dat || die
+ fi
+
if use split-ucode ; then
tc-env_build emake intel-microcode2ucode
./intel-microcode2ucode microcode.dat || die
src_install() {
insinto /lib/firmware
+ use initramfs && doins microcode.cpio
use monolithic && doins microcode.dat
use split-ucode && doins -r intel-ucode
}