intel-microcode-20150121-r1.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit toolchain-funcs
  5. # Find updates by searching and clicking the first link (hopefully it's the one):
  6. # http://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File
  7. NUM="24661"
  8. DESCRIPTION="Intel IA32 microcode update data"
  9. HOMEPAGE="http://inertiawar.com/microcode/ https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=${NUM}"
  10. SRC_URI="http://downloadmirror.intel.com/${NUM}/eng/microcode-${PV}.tgz"
  11. LICENSE="intel-ucode"
  12. SLOT="0"
  13. KEYWORDS="-* ~amd64 ~x86"
  14. IUSE="initramfs monolithic +split-ucode"
  15. REQUIRED_USE="|| ( initramfs monolithic split-ucode )"
  16. DEPEND="initramfs? ( sys-apps/iucode_tool )"
  17. RDEPEND="!<sys-apps/microcode-ctl-1.17-r2" #268586
  18. S=${WORKDIR}
  19. src_unpack() {
  20. default
  21. cp "${FILESDIR}"/intel-microcode2ucode.c ./ || die
  22. }
  23. src_compile() {
  24. if use initramfs ; then
  25. iucode_tool --write-earlyfw=microcode.cpio microcode.dat || die
  26. fi
  27. if use split-ucode ; then
  28. tc-env_build emake intel-microcode2ucode
  29. ./intel-microcode2ucode microcode.dat || die
  30. fi
  31. }
  32. src_install() {
  33. insinto /lib/firmware
  34. use initramfs && doins microcode.cpio
  35. use monolithic && doins microcode.dat
  36. use split-ucode && doins -r intel-ucode
  37. }