wok-next view intel-microcode/receipt @ rev 20674
Up putty (0.70)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat May 12 05:17:48 2018 +0300 (2018-05-12) |
parents | 3e3205b3b68f |
children | e7a485521d6a |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="intel-microcode"
4 VERSION="20180312"
5 CATEGORY="kernel"
6 SHORT_DESC="Intel processor microcode update for Linux"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="other"
9 WEB_SITE="https://downloadcenter.intel.com/search?keyword=processor+microcode+data+file"
10 # See also: https://wiki.archlinux.org/index.php/Microcode
11 # and https://www.archlinux.org/packages/extra/any/intel-ucode/
12 # https://www.kernel.org/doc/Documentation/x86/early-microcode.txt
13 # http://linuxfromscratch.org/blfs/view/svn/postlfs/firmware.html#early-microcode
15 TARBALL="$PACKAGE-$VERSION.tgz"
16 WGET_URL="https://downloadmirror.intel.com/27591/eng/microcode-$VERSION.tgz"
17 TARBALL_MD5="be315cd99a7ca392a2f917ceacbe14f2"
18 SPLIT="intel-microcode-initrd"
20 compile_rules() {
21 mkdir -p $install/lib/firmware/
22 cp -r $src/intel-ucode/ $install/lib/firmware/
24 gcc -Wall $CFLAGS -o intel-microcode2ucode $stuff/intel-microcode2ucode.c
25 ./intel-microcode2ucode ./microcode.dat
26 mkdir -p $install/boot
27 mkdir -p kernel/x86/microcode
28 mv microcode.bin kernel/x86/microcode/GenuineIntel.bin
29 echo kernel/x86/microcode/GenuineIntel.bin \
30 | cpio -o -H newc \
31 > $install/boot/intel-ucode.img
33 install -Dm644 $stuff/LICENSE $install/usr/share/licenses/$PACKAGE/LICENSE
35 cook_pick_docs releasenote
36 }
38 genpkg_rules() {
39 case $PACKAGE in
40 intel-microcode)
41 copy lib/ LICENSE
42 DEPENDS="linux"
43 ;;
44 intel-microcode-initrd)
45 copy boot/ LICENSE
46 CAT="kernel|initrd for early loading"
47 DEPENDS="linux"
48 ;;
49 esac
50 }
52 post_install_intel_microcode() {
53 if [ -z "$1" -a -e /sys/devices/system/cpu/microcode/reload ]; then
54 echo 1 > /sys/devices/system/cpu/microcode/reload
55 fi
56 }
57 post_install_intel_microcode_initrd() {
58 if [ -n "$quiet" ]; then
59 cat <<EOT
61 .------------------------------------------------------------------.
62 | In order to update the Intel CPU microcode on boot, add the file |
63 | /boot/intel-ucode.img |
64 | as the first initrd to your bootloader. |
65 '------------------------------------------------------------------'
67 EOT
68 fi
69 }