# Maintainer: Neophytos Kolokotronis # Contributions from Arch: https://projects.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/intel-ucode pkgname=intel-ucode pkgver=20150121 pkgrel=2 pkgdesc="Microcode update files for Intel CPUs" arch=('any') url="http://downloadcenter.intel.com/SearchResult.aspx?lang=eng&keyword=%22microcode%22" replaces=('microcode_ctl') license=('custom') install=$pkgname.install # Some random "download id" that intel has in their downloadcenter _dlid=24661 source=(http://downloadmirror.intel.com/${_dlid}/eng/microcode-${pkgver}.tgz LICENSE intel-microcode2ucode.c) sha256sums=('23353b93bb421971496cea5e9f9d390ce0ed22580a8cc45ae7b3b322dcd8f6b3' '6983e83ec10c6467fb9101ea496e0443f0574c805907155118e2c9f0bbea97b6' '03a13a966316a4d3d9c7e1b46007fd4b80911aea5ddd957ddf33ce660efe03de') build() { cd "$srcdir" gcc -Wall ${CFLAGS} -o intel-microcode2ucode intel-microcode2ucode.c ./intel-microcode2ucode ./microcode.dat } package() { # changed mircocode update to the current Arch way -- disabling TSX can prevent # a late microcode update from working, because systemd crashes before applying the update cd "$srcdir" install -d -m755 "${pkgdir}"/boot mkdir -p kernel/x86/microcode mv microcode.bin kernel/x86/microcode/GenuineIntel.bin echo kernel/x86/microcode/GenuineIntel.bin | bsdcpio -o -H newc -R 0:0 > "${pkgdir}"/boot/intel-ucode.img install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE }