wok-next annotate intel-microcode/receipt @ rev 21051
Small updates.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 30 01:34:53 2018 +0200 (2018-11-30) |
parents | e7a485521d6a |
children | 0cbe4b1f2230 |
rev | line source |
---|---|
al@20431 | 1 # SliTaz package receipt v2. |
al@20431 | 2 |
al@20431 | 3 PACKAGE="intel-microcode" |
al@20905 | 4 VERSION="20180703"; DL_ID="27945" |
al@20431 | 5 CATEGORY="kernel" |
al@20431 | 6 SHORT_DESC="Intel processor microcode update for Linux" |
al@20431 | 7 MAINTAINER="al.bobylev@gmail.com" |
al@20431 | 8 LICENSE="other" |
al@20431 | 9 WEB_SITE="https://downloadcenter.intel.com/search?keyword=processor+microcode+data+file" |
al@20431 | 10 # See also: https://wiki.archlinux.org/index.php/Microcode |
al@20431 | 11 # and https://www.archlinux.org/packages/extra/any/intel-ucode/ |
al@20443 | 12 # https://www.kernel.org/doc/Documentation/x86/early-microcode.txt |
al@20443 | 13 # http://linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html#early-microcode |
al@20431 | 14 |
al@20472 | 15 TARBALL="$PACKAGE-$VERSION.tgz" |
al@20905 | 16 WGET_URL="https://downloadmirror.intel.com/$DL_ID/eng/microcode-$VERSION.tgz" |
al@20905 | 17 TARBALL_MD5="873f2bdd7c0edf317f416f54fee74b42" |
al@20905 | 18 |
al@20905 | 19 BUILD_DEPENDS="iucode-tool" |
al@21020 | 20 SPLIT="$PACKAGE-initrd" |
al@20431 | 21 |
al@20431 | 22 compile_rules() { |
al@20431 | 23 mkdir -p $install/lib/firmware/ |
al@20431 | 24 cp -r $src/intel-ucode/ $install/lib/firmware/ |
al@20431 | 25 |
al@20443 | 26 mkdir -p $install/boot |
al@20443 | 27 mkdir -p kernel/x86/microcode |
al@20905 | 28 iucode_tool -w kernel/x86/microcode/GenuineIntel.bin intel-ucode/ intel-ucode-with-caveats/ |
al@20443 | 29 echo kernel/x86/microcode/GenuineIntel.bin \ |
al@20443 | 30 | cpio -o -H newc \ |
al@20443 | 31 > $install/boot/intel-ucode.img |
al@20443 | 32 |
al@20431 | 33 install -Dm644 $stuff/LICENSE $install/usr/share/licenses/$PACKAGE/LICENSE |
al@20443 | 34 |
al@20443 | 35 cook_pick_docs releasenote |
al@20431 | 36 } |
al@20431 | 37 |
al@20431 | 38 genpkg_rules() { |
al@20443 | 39 case $PACKAGE in |
al@20443 | 40 intel-microcode) |
al@20443 | 41 copy lib/ LICENSE |
al@20443 | 42 DEPENDS="linux" |
al@20443 | 43 ;; |
al@20443 | 44 intel-microcode-initrd) |
al@20443 | 45 copy boot/ LICENSE |
al@20443 | 46 CAT="kernel|initrd for early loading" |
al@20443 | 47 DEPENDS="linux" |
al@20443 | 48 ;; |
al@20443 | 49 esac |
al@20431 | 50 } |
al@20431 | 51 |
al@20443 | 52 post_install_intel_microcode() { |
al@20431 | 53 if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then |
al@20431 | 54 echo 1 > /sys/devices/system/cpu/microcode/reload |
al@20431 | 55 fi |
al@20431 | 56 } |
al@20443 | 57 post_install_intel_microcode_initrd() { |
al@21020 | 58 [ -n "$quiet" ] || cat <<EOT |
al@20472 | 59 |
al@20472 | 60 .------------------------------------------------------------------. |
al@20472 | 61 | In order to update the Intel CPU microcode on boot, add the file | |
al@20472 | 62 | /boot/intel-ucode.img | |
al@20472 | 63 | as the first initrd to your bootloader. | |
al@20472 | 64 '------------------------------------------------------------------' |
al@20472 | 65 |
al@20443 | 66 EOT |
al@20443 | 67 } |