wok-next annotate intel-microcode/receipt @ rev 20472
Add new LFS packages meson, ninja; py3k -> python3; gcc49, gcc54, gcc61: fix $ARCH_ARGS, --disable-multilib; misc. unsuccessful patches...
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Mar 10 13:48:53 2018 +0200 (2018-03-10) |
parents | 0e7893ac206d |
children | b19ddba309f9 |
rev | line source |
---|---|
al@20431 | 1 # SliTaz package receipt v2. |
al@20431 | 2 |
al@20431 | 3 PACKAGE="intel-microcode" |
al@20472 | 4 VERSION="20171117" |
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@20472 | 16 WGET_URL="https://downloadmirror.intel.com/27337/eng/microcode-$VERSION.tgz" |
al@20472 | 17 TARBALL_MD5="b294245d1f7f6c20f01edba53185f258" |
al@20443 | 18 SPLIT="intel-microcode-initrd" |
al@20431 | 19 |
al@20431 | 20 compile_rules() { |
al@20431 | 21 mkdir -p $install/lib/firmware/ |
al@20431 | 22 cp -r $src/intel-ucode/ $install/lib/firmware/ |
al@20431 | 23 |
al@20443 | 24 gcc -Wall $CFLAGS -o intel-microcode2ucode $stuff/intel-microcode2ucode.c |
al@20443 | 25 ./intel-microcode2ucode ./microcode.dat |
al@20443 | 26 mkdir -p $install/boot |
al@20443 | 27 mkdir -p kernel/x86/microcode |
al@20443 | 28 mv microcode.bin kernel/x86/microcode/GenuineIntel.bin |
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@20443 | 58 if [ -n "$quiet" ]; then |
al@20443 | 59 cat <<EOT |
al@20472 | 60 |
al@20472 | 61 .------------------------------------------------------------------. |
al@20472 | 62 | In order to update the Intel CPU microcode on boot, add the file | |
al@20472 | 63 | /boot/intel-ucode.img | |
al@20472 | 64 | as the first initrd to your bootloader. | |
al@20472 | 65 '------------------------------------------------------------------' |
al@20472 | 66 |
al@20443 | 67 EOT |
al@20443 | 68 fi |
al@20443 | 69 } |