Skip to content

Commit

Permalink
microcode-data: add USE=initramfs #528712
Browse files Browse the repository at this point in the history
This flag quickly generates a small initramfs that the kernel needs to
load the microcode at boot time.  This way people don't have to figure
out the right incantations themselves.
  • Loading branch information
vapier committed Aug 11, 2015
1 parent df93bef commit 9a1061d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions sys-apps/microcode-data/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<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>
Expand Down
9 changes: 7 additions & 2 deletions sys-apps/microcode-data/microcode-data-20150121-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SRC_URI="http://downloadmirror.intel.com/${NUM}/eng/microcode-${PV}.tgz"
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

Expand All @@ -30,6 +30,10 @@ src_unpack() {
}

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
Expand All @@ -38,6 +42,7 @@ src_compile() {

src_install() {
insinto /lib/firmware
use initramfs && doins microcode.cpio
use monolithic && doins microcode.dat
use split-ucode && doins -r intel-ucode
}
Expand Down

0 comments on commit 9a1061d

Please sign in to comment.